$ 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?
It looks like the program called 'c++' (is it GCC? clang?) is either
not passing the -arch option down to 'ld' or 'ld' does not respond to
it.
You might try adding
LDFLAGS=-Wl,-arch,x86_64
and/or add '-v' to CXXFLAGS to cause the compiler to dump the details
of what it is doing so you can see the arguments it is passing to the
linker.
Also please check that ./.libs/libxqilla.a really does contain 64-bit
objects. Some linkers use the mode from the first object file they
encounter.
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool