automake
[Top][All Lists]
Advanced

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

`make check` linking against installed copies of the libraries


From: Simon Newton
Subject: `make check` linking against installed copies of the libraries
Date: Mon, 17 Feb 2014 12:58:54 -0800

My apologies if this is not the correct list. I'm not sure which one
of automake or libtool is causing the trouble here.

I maintain a project ( https://github.com/OpenLightingProject/ola )
that uses autoconf / automake / libtool. I've noticed that if I add a
new symbol to one of our libraries, the `make check` target will fail
with  "undefined reference to " to the new symbol. I realized that
it's trying to link against the older version of the library installed
in /usr/local/lib rather than the one in the builddir.

The tests in ola/ are usually the first to fail. The linker command line is:

$ g++ -I../include -I../include -I.. -I.. -Wall -Wformat -W
-fvisibility-inlines-hidden -pthread -Werror -DTEST_SRC_DIR=\".\" -g
-O2 -pthread -o .libs/OlaClientTester
OlaClientTester-StreamingClientTest.o  /usr/lib/libcppunit.so -ldl
../common/testing/.libs/libolatesting.a
../common/testing/.libs/libtestmain.a
../plugins/artnet/.libs/libolaartnet.so
../plugins/dummy/.libs/liboladummy.so
../plugins/e131/.libs/libolae131.so
../plugins/espnet/.libs/libolaespnet.so
../plugins/ftdidmx/.libs/libolaftdidmx.so
../plugins/karate/.libs/libolakarate.so
../plugins/kinet/.libs/libolakinet.so
../plugins/milinst/.libs/libolamilinst.so
../plugins/opendmx/.libs/libolaopendmx.so
../plugins/osc/.libs/libolaosc.so
../plugins/pathport/.libs/libolapathport.so
../plugins/renard/.libs/libolarenard.so
../plugins/sandnet/.libs/libolasandnet.so
../plugins/shownet/.libs/libolashownet.so
../plugins/spi/.libs/libolaspi.so
../plugins/stageprofi/.libs/libolastageprofi.so
../plugins/usbpro/.libs/libolausbpro.so
../plugins/usbdmx/.libs/libolausbdmx.so
../common/.libs/libolacommon.so ../olad/.libs/libolaserver.so
./.libs/libola.so -pthread -Wl,-rpath -Wl,/usr/local/lib/olad

I've found by removing the trailing -Wl,-rpath -Wl,/usr/local/lib/olad
the linker will succeed.  However I can't figure out where -rpath
/usr/local/lib/olad is coming from.

Simon



reply via email to

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