From: Alexander H. <ale...@gm...> - 2013-02-18 16:17:46
|
On 2/18/13 8:27 AM, Hanspeter Niederstrasser wrote: > On 2/18/2013 9:26 AM, Jack Howarth wrote: >> On x86_64 fink 10.6, the new python26-2.6.8-2 build fails with the error... >> >> ld: in /usr/lib/libncurses.5.dylib, missing required architecture x86_64 in file for architecture x86_64 >> collect2: ld returned 1 exit status >> >> The problem is that compile line... >> >> gcc -bundle libpython2.6.dylib build/temp.macosx-10.6-x86_64-2.6/sw/src/fink.build/python26-2.6.8-2/Python-2.6.8/Modules/readline.o -lreadline -lncursesw -o build/lib.macosx-10.6-x86_64-2.6/readline.so -I. -IInclude -I./Include -I/sw/include -L/sw/lib/system-openssl/lib -L/sw/lib -L/sw/lib/system-openssl/lib -L/sw/lib -L/sw/lib/system-openssl/lib -L/sw/lib -L/usr/lib/termcap >> >> which is placing -lreadline --lncursesw before any of the instance of -L/sw/lib. > > To add to the record, it is more than just the order of -l and -L flags, > because on 10.7/xcode4.6, this is the linker line (note -L/sw/lib at > beginning which seems to be set by SetLDFLAGS): > > gcc -L/sw/lib/system-openssl/lib -L/sw/lib -bundle libpython2.6.dylib > -L/sw/lib/system-openssl/lib -L/sw/lib -I. -IInclude -I./Include > -I/sw/include > build/temp.macosx-10.7-x86_64-2.6/sw/build.build/python26-2.6.8-2/Python-2.6.8/Modules/readline.o > -L/usr/lib/termcap -L/sw/lib/system-openssl/lib -L/sw/lib -lreadline > -lncursesw -o build/lib.macosx-10.7-x86_64-2.6/readline.so > > and it gives the same error you see since /usr/lib/libncurses.5.dylib is > i386 only. *But* if I downgrade to use our readline5, then the build > succeeds. Both of Fink's readline dylibs link to > /sw/lib/libncurses.5.dylib. So something beyond flag ordering is happening. > > Hanspeter > > addendum: On a 10.6/x86_64 system here, I get this (with successful > completion): > > gcc -L/sw64/lib/system-openssl/lib -L/sw64/lib -bundle > libpython2.6.dylib -L/sw64/lib/system-openssl/lib -L/sw64/lib -I. > -IInclude -I./Include -I/sw64/include > build/temp.macosx-10.6-x86_64-2.6/sw64/build.build/python26-2.6.8-2/Python-2.6.8/Modules/readline.o > -L/usr/lib/termcap -L/sw64/lib/system-openssl/lib -L/sw64/lib -lreadline > -lncursesw -o build/lib.macosx-10.6-x86_64-2.6/readline.so > > What Xcode versions do you guys have for 10.6? The build succeeds for me on 10.6/x86_64 with Xcode 3.2.6. -- Alexander Hansen, Ph.D. Fink User Liaison My package updates: http://finkakh.wordpress.com/ |