vlang / tccbin

45 stars 18 forks source link

"GLIBC_2.11" not found #41

Open yingshaoxo opened 5 months ago

yingshaoxo commented 5 months ago

When I run "./tcc" in ubuntu8, I got "glibc_2.11" not found error.

I think you guys should use alpine + musl-gcc to do the compile.

It is as simple as:

musl-gcc main.c -o main.run -static

Don' forget about the static flag.

yingshaoxo commented 5 months ago

I just found "https://github.com/vlang/tccbin/tree/thirdparty-linuxmusl-amd64"

Which has musl staticlly compiled tcc, I can run the tcc in ubuntu8 now.


But when I compile main.c, I got another error: "crt1.o not found \n include file stdio.h not found"

I think there should has a install.sh script without rely on make, because ubuntu8 does not have make installed by default

I am still try to figure out how to install the tccbin by copy and paste, working on...

yingshaoxo commented 5 months ago

I suddenly found the tccbin does not have those files: "crt1.o" and "stdio.h"

According to my memory, even if I use gcc or make to compile the tcc, it will still not have a file called "crt1.o" or "stdio.h"

So the thirdpart-linuxmusl-amd64 branch is not a fully version that could let you compile a c file without install make or gcc or any other package

Am I right? Can anyone do a explain?