Re: Libtool is linking the wrong library (location) in and I can't figure out what's causing it.
On 10/26/2012 07:22 PM, Dan Nicholson wrote: Sorry if this is terse, I'm on my phone. In the first case, you're using a library, liblog4cplus.so, that's installed in your home directory. Libtool sees this as outside the dynamic linker's path and adds a runpath so you're program will find the library at runtime without setting any environment variables. This is either helpful or a nuisance depending on your perspective. One thing I'd suggest is rather than toying with prefix, which tells the tools where you're going to run the program from, use the DESTDIR make variable to stage the installation into your home directory. Dan Hi, Dan, Thanks for the input. While the liblog4cplus.so was in my home directory, it was also in /usr/lib. Libtool is just too smart I guess. The solution was to clear the build directory before the make. You're observation was key to that solution. I suspect the DESTDIR would have also worked but since I didn't need the files in the build directory once the rpmbuild was completed, it made sense to clean them up. Thank you very much, Jim. ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: Libtool is linking the wrong library (location) in and I can't figure out what's causing it.
On Oct 27, 2012 1:25 AM, Jim Lynch j...@k4gvo.com wrote: I have two fairly identical gnu make/build projects. One of them works fine but the other is looking for the library in the wrong place. The difference I see is that one of them has this: ibtool: link: g++ -std=c++0x -g -O2 -o loggerd loggerd-fieldlist.o loggerd-t2m.o loggerd-loggercounters.o loggerd-loggerbase.o loggerd-dbutil.o loggerd-ftplogparser.o loggerd-infocache.o loggerd-inputqueue.o loggerd-outputqueue.o loggerd-imagenode.o loggerd-arcmessage.o loggerd-xmlrpc_client.o loggerd-emailthread.o ... -lxmlrpc++ -lxmlrpc -lxmlrpc_util /home/jwl/build/usr/local/lib/liblog4cplus.so -pthread -Wl,-rpath -Wl,/home/jwl/build/usr/local/lib -Wl,-rpath -Wl,/home/jwl/build/usr/local/lib Sorry if this is terse, I'm on my phone. In the first case, you're using a library, liblog4cplus.so, that's installed in your home directory. Libtool sees this as outside the dynamic linker's path and adds a runpath so you're program will find the library at runtime without setting any environment variables. This is either helpful or a nuisance depending on your perspective. One thing I'd suggest is rather than toying with prefix, which tells the tools where you're going to run the program from, use the DESTDIR make variable to stage the installation into your home directory. Dan ___ https://lists.gnu.org/mailman/listinfo/libtool