[Top][All Lists]

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

Re: [Tinycc-devel] How to install tcc on Mac?

From: Jonne Ransijn
Subject: Re: [Tinycc-devel] How to install tcc on Mac?
Date: Mon, 25 Feb 2019 09:42:16 +0100

I don't think Mac natively supports ELF, and it looks like it's system headers and libraries don't support TCC either. To solve the first problem, you will have to run a VM, or I have seen people talk about a kernel module to run ELF, so maybe try that. Otherwise you unfortunately have to use another compiler. For the second problem, you can probably use the headers and libraries provided by GCC, and it sounds like Apple provides development packages as well. You might be able to use "tcc -run" without having to do all this, if that is what you want.

On Sun, Feb 24, 2019, 15:07 Peng Yu <address@hidden> wrote:

I just used configure/make to install tcc. I got the following error
when I run tcc.

Homebrew installation also has the same problem (see the comment on
the following URL).


Could anybody show me how to install tcc on Mac OS X? Thanks.

$ cat main.c
#include <stdio.h>

int main() {
        puts("Hello World!");
        return 0;
$ tcc -v
tcc version 0.9.27 (x86_64 Darwin)
$ tcc main.c
/usr/lib/crt1.o: error: unrecognized file type
tcc: error: file 'crt1.o' not found
tcc: error: file 'crti.o' not found
In file included from main.c:2:
In file included from /usr/include/stdio.h:64:
In file included from /usr/include/_stdio.h:68:
/usr/include/sys/cdefs.h:81: warning: #warning "Unsupported compiler detected"
/usr/lib/libc.dylib: error: bad architecture
tcc: error: library 'c' not found
tcc: error: file 'crtn.o' not found
tcc: error: undefined symbol 'puts'


Tinycc-devel mailing list

reply via email to

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