libtool
[Top][All Lists]
Advanced

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

Libtool is linking the wrong library (location) in and I can't figure ou


From: Jim Lynch
Subject: Libtool is linking the wrong library (location) in and I can't figure out what's causing it.
Date: Fri, 26 Oct 2012 08:35:09 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1

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

whereas the last bit of the one that works has:
libtool: link: g++ -g -O2 -o vaprobe protoarduino.o pdbutil.o timer.o arcserver.o probethread.o protocamera.o protosimple.o vaprobe.o svn_version.o -L/usr/lib64/mysql -limageserver-0.4.1 -lmysqlpp -lboost_regex -lmysqlclient -lpthread -lssl -lccgnu2 -lcurl -lccext2 -ldl -lxml2

In the first case the previous line starts with:

/bin/sh ../libtool --tag=CXX --mode=link g++ -std=c++0x -g -O2 -o loggerd
Followed by the list of .o files and libraries.

In the working one, it's similar:

/bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2   -o vaprobe

One other difference is that in the first (bad) output I see two lines:

libtool: link: warning: library `/usr/local/lib/libimageserver-0.4.1.la' was moved. libtool: link: warning: library `/usr/local/lib/libimageserver-0.4.1.la' was moved.
But not in the good run.

Where exactly is the -Wl flag coming from? The Makefile.am files are essentially identical, except for the extra '-std=c++0x' and file differences.

My configuration in both cases looks like

./configure --prefix=/home/jwl/build/usr/local --sysconf=/home/jwl/build/etc


I do the build via a
make install prefix=~/build/logger/usr/local sysconfdir=~/build/logger/etc
rpmbuild --buildroot=$HOME/build/logger/ -bb logger.spec

And the spec files are structurally the same.

I don't think there are any environment variables set outside of the scripts.

Any information would be most appreciated.

Thanks,
Jim.






reply via email to

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