I'm experiencing a problem linking with static libraries on Darwin (Mountain Lion). I'm getting this warning:
> ld: warning: ignoring file ./.libs/libxqilla.a, file was built for archive > which is not the architecture being linked (x86_64): ./.libs/libxqilla.a …even though I'm pretty confident that the objects in libxqilla.a were built with "-arch x86_64" (like everything else built here). Backing up a bit, I have doctored things in the xqilla build a bit in order to create a static library and use some static libraries as dependencies. configure was run thusly: > $ ../../Source/XQilla/configure --with-xerces=$HOME/build/my/install/root > --disable-shared CC=cc CXX=c++ CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' > LDFLAGS="-framework CoreFoundation -framework CoreServices > -L$HOME/build/my/install/root/lib" > LIBS="$HOME/build/my/install/root/lib/libxerces-c.a > $HOME/build/my/install/root/lib/libcurl.a > $HOME/build/my/install/root/lib/libssl.a > $HOME/build/my/install/root/lib/libcrypto.a" …and when I build, I override CFLAGS, CXXFLAGS, and LDFLAGS (to account for problematic settings of these variables in the Makefile): > $ make CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' LDFLAGS='-framework > CoreFoundation -framework CoreServices > -L$HOME/build/sfAgent/libs/Release_Static/lib' But when the build goes to link an executable: > /bin/sh ./libtool --tag=CXX --mode=link c++ -arch x86_64 -framework > CoreFoundation -framework CoreServices > -L/Users/bradenmcdaniel/build/sfAgent/libs/Release_Static/lib -o xqilla > xqilla-commandline.o libxqilla.la -lpthread > /Users/bradenmcdaniel/build/my/install/root/lib/libxerces-c.a > /Users/bradenmcdaniel/build/my/install/root/lib/libcurl.a > /Users/bradenmcdaniel/build/my/install/root/lib/libssl.a > /Users/bradenmcdaniel/build/my/install/root/lib/libcrypto.a > libtool: link: c++ -arch x86_64 -o xqilla xqilla-commandline.o > -Wl,-bind_at_load -L/Users/bradenmcdaniel/build/my/install/root/lib > ./.libs/libxqilla.a -lpthread > /Users/bradenmcdaniel/build/my/install/root/lib/libxerces-c.a > /Users/bradenmcdaniel/build/my/install/root/lib/libcurl.a > /Users/bradenmcdaniel/build/my/install/root/lib/libssl.a > /Users/bradenmcdaniel/build/my/install/root/lib/libcrypto.a -framework > CoreServices -framework CoreFoundation > ld: warning: ignoring file ./.libs/libxqilla.a, file was built for archive > which is not the architecture being linked (x86_64): ./.libs/libxqilla.a > Undefined symbols for architecture x86_64: > "NSFixupFilter::NSFixupFilter(EventHandler*, XPath2MemoryManager*)", > referenced from: > _main in xqilla-commandline.o > "NSFixupFilter::~NSFixupFilter()", referenced from: > _main in xqilla-commandline.o (…and many more symbols that would be resolved by libxqilla.) Has anyone else seen this sort of thing? And might this warning from the linker indicate something other than what it claims? Braden _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool