[Top][All Lists]

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

[Tinycc-devel] tcc compilation problems

From: Mark Hewitt
Subject: [Tinycc-devel] tcc compilation problems
Date: Fri, 30 Oct 2009 09:22:34 +0000
User-agent: Thunderbird (X11/20090625)

I'm having problems getting TCC version 0.9.25 working. I'm using Red Hat Linux 4.5 on an x86_64 platform.
It appears to compile, test and install without any problems.

If I got to the bin directory where it's installed and issue
tcc -run hello.c
I get the expected output "Hello World!"

But if I try to compile and executable
tcc -o hello hello.c

I get this:
/usr/lib/crt1.o: error: invalid object file
/usr/lib/crti.o: error: invalid object file
/lib/libc.so.6: error: bad architecture
/usr/lib/crtn.o: error: invalid object file
tcc: error: undefined symbol 'printf'

Is there some configuration or run option that I've missed out?

Here is the output from my installation:

# ./configure --prefix=/wrg/software/SL4.x86_64/tcc-0.925
Binary  directory   /wrg/software/SL4.x86-64/tcc-0.9.25//bin
TinyCC directory    /wrg/software/SL4.x86-64/tcc-0.9.25//lib/tcc
Library directory   /wrg/software/SL4.x86-64/tcc-0.9.25//lib
Include directory   /wrg/software/SL4.x86-64/tcc-0.9.25//include
Manual directory    /wrg/software/SL4.x86-64/tcc-0.9.25//man
Doc directory       /wrg/software/SL4.x86-64/tcc-0.9.25//share/doc/tcc
Target root prefix Source path /root/tinyccfix/tinycc
C compiler       gcc
CPU              x86-64
Big Endian       no
gprof enabled    no
cross compilers  no
use libgcc       no
Creating config.mak and config.h

# make
gcc -o tcc tcc.c -DTCC_TARGET_X86_64 -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -lm -ldl gcc -o libtcc.o -c libtcc.c -DTCC_TARGET_X86_64 -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0
ar rcs libtcc.a libtcc.o
gcc -o libtcc_test tests/libtcc_test.c libtcc.a -I. -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -lm -ldl

# make test
make -C tests test
make[1]: Entering directory `/root/tinyccfix/tinycc/tests'
gcc -o libtcc_test libtcc_test.c ../libtcc.a -I.. -O2 -g -Wall -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -lm -ldl
------------ libtest ------------
./libtcc_test lib_path=..
Hello World!
fib(32) = 2178309
add(32, 64) = 96
------------ test3 ------------
../tcc -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -DTCC_TARGET_X86_64 -run ../tcc.c -B.. -run tcctest.c > test.out3
Auto Test3 OK
make[1]: Leaving directory `/root/tinyccfix/tinycc/tests'

# make install
mkdir -p "/wrg/software/SL4.x86-64/tcc-0.9.25//bin"
install -s -m755 tcc "/wrg/software/SL4.x86-64/tcc-0.9.25//bin"
mkdir -p "/wrg/software/SL4.x86-64/tcc-0.9.25//man/man1"
install tcc.1 "/wrg/software/SL4.x86-64/tcc-0.9.25//man/man1"
mkdir -p "/wrg/software/SL4.x86-64/tcc-0.9.25//lib/tcc"
mkdir -p "/wrg/software/SL4.x86-64/tcc-0.9.25//lib/tcc/include"
install -m644 libtcc1.a "/wrg/software/SL4.x86-64/tcc-0.9.25//lib/tcc"
install -m644 include/stdarg.h include/stddef.h include/stdbool.h include/float.h include/varargs.h include/tcclib.h "/wrg/software/SL4.x86-64/tcc-0.9.25//lib/tcc/include"
mkdir -p "/wrg/software/SL4.x86-64/tcc-0.9.25//share/doc/tcc"
install -m644 tcc-doc.html "/wrg/software/SL4.x86-64/tcc-0.9.25//share/doc/tcc"
mkdir -p "/wrg/software/SL4.x86-64/tcc-0.9.25//lib"
install -m644 libtcc.a "/wrg/software/SL4.x86-64/tcc-0.9.25//lib"
mkdir -p "/wrg/software/SL4.x86-64/tcc-0.9.25//include"
install -m644 libtcc.h "/wrg/software/SL4.x86-64/tcc-0.9.25//include"

Many thanks for your help!

Mark Hewitt

reply via email to

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