logo       

LD_LIBRARY_PATH does not supersede /usr/lib for AC_CHECK_LIB ?: msg#00041

sysutils.autoconf.general

Subject: LD_LIBRARY_PATH does not supersede /usr/lib for AC_CHECK_LIB ?

Hi,

I have got a development system with library x, version 0, installed
under /usr/lib, and library x, version 2 installed somewhere locally,
added to the library path via LD_LIBRARY_PATH.

On this development setup, I run a standard AC_CHECK_LIB test:

AC_CHECK_LIB(x, symbol_only_in_version_2,, [ AC_MSG_ERROR(need lib x, version
2.) ])

This check fails (unresolved symbol), obviously (?) as "-L/usr/lib" is
listed _before_ the libraries in LD_LIBRARY_PATH when running collect
internally:

(...)
GNU assembler version 2.14.90.0.7 (i386-linux) using BFD version 2.14.90.0.7
20031029 Debian GNU/Linux
/usr/lib/gcc-lib/i486-linux/3.3.4/collect2 (...) -L/usr/lib -L/usr/lib
-Lmy_local_path/.libs (...)
(...)

The check works fine when I remove the old library from /usr/lib.

Afaik, LD_LIBRARY_PATHs, if set, should have precedence over standard
paths. So, is this a bug in the AC_CHECK_LIB macro, or do I have to
configure something differently?

Could not find any hint in the archives...

Thanks,

Stephan

Please CC to me, I am not on the list.
--
Stephan A Suerken <suerken|absurd@xxxxxxxxxx>

Schlund + Partner AG, Karlsruhe


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise