tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] build fails on mac os x 10.


From: Milutin Jovanović
Subject: Re: [Tinycc-devel] build fails on mac os x 10.
Date: Sat, 7 Apr 2012 22:22:22 -0400


Hi Ben,

Hmm... I followed your instructions and it worked. Below is the output I get. It would be appreciated if you would take a look what is going on on your side. The biggest difference I see is that you are running a 32 bit OS. Maybe the make/config rules for 64/32 are out of sync.

address@hidden ~/projects
$ mkdir mob && cd mob

address@hidden ~/projects/mob
$ git clone git://repo.or.cz/tinycc.git
Cloning into 'tinycc'...
remote: Counting objects: 4189, done.
remote: Compressing objects: 100% (1291/1291), done.
remote: Total 4189 (delta 2885), reused 4189 (delta 2885)
Receiving objects: 100% (4189/4189), 1.99 MiB | 187 KiB/s, done.
Resolving deltas: 100% (2885/2885), done.

address@hidden ~/projects/mob
$ cd tinycc/

address@hidden ~/projects/mob/tinycc (master)
$ git checkout mob
Branch mob set up to track remote branch mob from origin.
Switched to a new branch 'mob'

address@hidden ~/projects/mob/tinycc (mob)
$ ./configure
Binary  directory   /usr/local/bin
TinyCC directory    /usr/local/lib/tcc
Library directory   /usr/local/lib
Include directory   /usr/local/include
Manual directory    /usr/local/share/man
Info directory      /usr/local/share/info
Doc directory       /usr/local/share/doc/tcc
Target root prefix 
Source path      /Users/miki/projects/mob/tinycc
C compiler       gcc
Target OS        Darwin
CPU              x86-64
Big Endian       no
gprof enabled    no
cross compilers  no
use libgcc       no
Creating config.mak and config.h

address@hidden ~/projects/mob/tinycc (mob)
$ make
gcc -o tcc.o -c tcc.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o libtcc.o -c libtcc.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o tccpp.o -c tccpp.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o tccgen.o -c tccgen.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o tccelf.o -c tccelf.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o tccasm.o -c tccasm.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o tccrun.o -c tccrun.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o x86_64-gen.o -c x86_64-gen.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
gcc -o i386-asm.o -c i386-asm.c -DTCC_TARGET_X86_64  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
ar rcs libtcc.a libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o x86_64-gen.o i386-asm.o
gcc -o tcc tcc.o libtcc.a -lm -ldl -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64 
gcc -o tiny_libmaker win32/tools/tiny_libmaker.c -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -m64
mkdir -p x86_64
../tcc -B.. -m64 -D_ANSI_SOURCE -c libtcc1.c -o x86_64/libtcc1.o -DTCC_TARGET_X86_64
../tcc -B.. -m64 -D_ANSI_SOURCE -c alloca86_64.S -o x86_64/alloca86_64.o -DTCC_TARGET_X86_64
gcc -Os -s -w -o x86_64/tiny_libmaker ../win32/tools/tiny_libmaker.c -DTCC_TARGET_X86_64
x86_64/tiny_libmaker rcs ../libtcc1.a x86_64/libtcc1.o x86_64/alloca86_64.o
./texi2pod.pl tcc-doc.texi tcc.pod
pod2man --section=1 --center=" " --release=" " tcc.pod > tcc.1
texi2html -monolithic -number tcc-doc.texi
makeinfo tcc-doc.texi

address@hidden ~/projects/mob/tinycc (mob)
$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


address@hidden ~/projects/mob/tinycc (mob)
$ sw_vers
ProductName:    Mac OS X
ProductVersion:    10.7.3
BuildVersion:    11D50b





Miki.



On 7 April 2012 05:43, ben <address@hidden> wrote:
hi

I try to build tinycc from the mob branch for mac os x snow leopard without success.

error:
-------
ld: warning: in libtcc.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
 "_tcc_free", referenced from:

system infos:
--------------------
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.6.8
BuildVersion:   10K549

$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)


error reproduction
-------------------------
   $ mkdir mob && cd mob
   $ git clone git://repo.or.cz/tinycc.git
   $ cd tinycc/
   $ git checkout mob
   $ ./configure
Binary  directory   /usr/local/bin
TinyCC directory    /usr/local/lib/tcc
Library directory   /usr/local/lib
Include directory   /usr/local/include
Manual directory    /usr/local/share/man
Info directory      /usr/local/share/info
Doc directory       /usr/local/share/doc/tcc
Target root prefix
Source path      /homes/ben/local/tcc/mob/tinycc
C compiler       gcc
Target OS        Darwin
CPU              x86
Big Endian       no
gprof enabled    no
cross compilers  no
use libgcc       no
Creating config.mak and config.h

   $ make 1> log
ld: warning: in libtcc.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
 "_tcc_free", referenced from:
     _parse_option_D in tcc.o
     _main in tcc.o
     _main in tcc.o
     _main in tcc.o
     _main in tcc.o
 "_cstr_free", referenced from:
     _main in tcc.o
 "_tcc_print_stats", referenced from:
     _main in tcc.o
 "_tcc_new", referenced from:
[...]

   $ tail -4 log
gcc -o i386-gen.o -c i386-gen.c -DTCC_TARGET_I386  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -m32gcc -o i386-asm.o -c i386-asm.c -DTCC_TARGET_I386  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -m32ar rcs libtcc.a libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o i386-gen.o i386-asm.ogcc -o tcc tcc.o libtcc.a -lm -ldl -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -m32

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


reply via email to

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