tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Unable to find include directories by tcc on Catalina


From: Peng Yu
Subject: Re: [Tinycc-devel] Unable to find include directories by tcc on Catalina
Date: Sun, 28 Mar 2021 10:10:20 -0500

On 3/28/21, Christian Jullien <eligis@orange.fr> wrote:
> There is no specific instruction for macOS, here is what I use:
>
> git clone -b mob https://repo.or.cz/r/tinycc.git
> # Ensure configure is an executable
> chmod 755 tinycc/configure
> cd tinycc
> ./configure
> make
> make install-strip

Thanks. Will this be in conflict with any version installed by homebrew?

> But mob is currently broken for -b option (bound checking)
>
> Use
> https://repo.or.cz/tinycc.git/snapshot/e4f151c4cda30fd4c06655d87c3df02b6513fb54.tar.gz
> instead which fully works.
>
> See: https://repo.or.cz/w/tinycc.git
>
>
> C.
>
> -----Original Message-----
> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org]
> On Behalf Of Peng Yu
> Sent: Sunday, March 28, 2021 16:41
> To: jullien@eligis.com
> Cc: tinycc-devel
> Subject: Re: [Tinycc-devel] Unable to find include directories by tcc on
> Catalina
>
> Thanks. Where is the up-to-date installation instruction on macOS?
>
> On Sun, Mar 28, 2021 at 12:57 AM Christian Jullien <eligis@orange.fr> wrote:
>>
>> Hi,
>> I don't know who maintains tcc for homebrew. You'd better ask him/her.
>> Please note that tcc is de facto a source code mob package and it is
>> generally advised to compile tcc form last mod.
>> It appears that brew uses official 0.9.27 which is more than 3 years old.
>> A lot of work has been made on mob, especially on macOS which, among
>> others, now generates macho executables.
>>
>> For info, tcc compiled from mob gives:
>> jullien@byas:~ $ tcc -vv
>> tcc version 0.9.27 (x86_64 Darwin)
>> install: /usr/local/lib/tcc
>> include:
>>   /usr/local/lib/tcc/include
>>   /usr/local/include
>>   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
>> libraries:
>>   /usr/lib
>>   /lib
>>   /usr/local/lib
>> libtcc1:
>>   /usr/local/lib/tcc/libtcc1.a
>> crt:
>>   /usr/lib
>> elfinterp:
>>   /lib64/ld-linux-x86-64.so.2
>>
>> However, I reported yesterday a regression bug on mod with macOS. The last
>> macOS fully working version is
>>
>> https://repo.or.cz/tinycc.git/snapshot/e4f151c4cda30fd4c06655d87c3df02b6513fb54.tar.gz
>> "
>> 2021-02-18 grischka tccgen: fix "Allow declared arrays to be
>> initialized..."
>>
>> Christian
>>
>> -----Original Message-----
>> From: Peng Yu [mailto:pengyu.ut@gmail.com]
>> Sent: Saturday, March 27, 2021 22:16
>> To: jullien@eligis.com; tinycc-devel@nongnu.org
>> Subject: Re: [Tinycc-devel] Unable to find include directories by tcc on
>> Catalina
>>
>> I prefer to use homebrew as it is a systematic way to handle packages
>> on macOS. Are you able to help to fix the bug in the homebrew tcc
>> formula?
>>
>> On 3/27/21, Christian Jullien <eligis@orange.fr> wrote:
>> > Hi can you please compile tcc using the latest source code from mod and
>> > try
>> > again?
>> >
>> > I use it daily this way.
>> >
>> > C.
>> >
>> > -----Original Message-----
>> > From: Tinycc-devel
>> > [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org]
>> > On Behalf Of Peng Yu
>> > Sent: Friday, March 26, 2021 23:39
>> > To: tinycc-devel
>> > Subject: [Tinycc-devel] Unable to find include directories by tcc on
>> > Catalina
>> >
>> > Hi,
>> >
>> > tcc can not find the include directory correctly. It seems that the
>> > include directories are hardcoded in the tcc binary. Should they be
>> > put in a configuration file?
>> >
>> > How to fix this problem? Thanks.
>> >
>> > $ cat main.c
>> > #include <stdio.h>
>> >
>> > int main() {
>> >       puts("Hello World!");
>> >       return 0;
>> > }
>> > $ tcc -run main.c
>> > main.c:2: error: include file 'stdio.h' not found
>> > $ brew info tcc
>> > tcc: stable 0.9.27 (bottled)
>> > Tiny C compiler
>> > https://bellard.org/tcc/
>> > /usr/local/Cellar/tcc/0.9.27_1 (19 files, 721KB) *
>> >   Poured from bottle on 2021-03-26 at 17:21:54
>> > From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tcc.rb
>> > License: LGPL-2.0-or-later
>> > ==> Analytics
>> > install: 49 (30 days), 138 (90 days), 544 (365 days)
>> > install-on-request: 49 (30 days), 138 (90 days), 539 (365 days)
>> > build-error: 0 (30 days)
>> > $ tcc -vv
>> > tcc version 0.9.27 (x86_64 Darwin)
>> > install: /usr/local/Cellar/tcc/0.9.27_1/lib/tcc
>> > include:
>> >   /usr/local/include
>> >
>> > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include
>> >   /usr/local/Cellar/tcc/0.9.27_1/lib/tcc/include
>> > libraries:
>> >   /usr/lib
>> >   /lib
>> >   /usr/local/lib
>> > libtcc1:
>> >   /usr/local/Cellar/tcc/0.9.27_1/lib/tcc/libtcc1.a
>> > crt:
>> >   /usr/lib
>> > elfinterp:
>> >   /lib64/ld-linux-x86-64.so.2
>> > $ strings $(which tcc) | grep /include
>> > /usr/local/include:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include:{B}/include
>> > $ ls -l
>> > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include
>> > ls: cannot access
>> > '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include':
>> > No such file or directory
>> >
>> > --
>> > Regards,
>> > Peng
>> >
>> > _______________________________________________
>> > Tinycc-devel mailing list
>> > Tinycc-devel@nongnu.org
>> > https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>> >
>> >
>> > _______________________________________________
>> > Tinycc-devel mailing list
>> > Tinycc-devel@nongnu.org
>> > https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>> >
>>
>>
>> --
>> Regards,
>> Peng
>>
>
>
> --
> Regards,
> Peng
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>


-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]