[Top][All Lists]

[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 ( )
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/ -ldl
../common/.libs/ ../olad/.libs/
./.libs/ -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.


reply via email to

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