libtool
[Top][All Lists]
Advanced

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

Re: Libtool is linking the wrong library (location) in and I can't figur


From: Dan Nicholson
Subject: Re: Libtool is linking the wrong library (location) in and I can't figure out what's causing it.
Date: Fri, 26 Oct 2012 16:22:53 -0700

On Oct 27, 2012 1:25 AM, "Jim Lynch" <address@hidden> 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


reply via email to

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