[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LD_LIBRARY_PATH for make test

Howard Chu wrote:
> Hallvard B Furuseth wrote:
>> Michael Ströder writes:
>>> So this works great for you. But this won't work for others. And I'd
>>> really like to know what's wrong with my suggestion to generally set
>>> LD_LIBRARY_PATH in tests/scripts/defines.sh like this:
> Setting LD_LIBRARY_PATH in defines.sh was always lame at best.

Well, it works in my setup. Maybe I will add it to my build script
before make test.

> In
> particular, it does nothing for systems like HPUX or AIX (which use
> SHLIB_PATH and LIBPATH, respectively) and I imagine there are many other
> systems in the same boat. Part of the point in using libtool is to avoid
> having to muck with this kind of stuff directly in our own scripts.


> That's on a build with no special linker flags configured.

Ok, now I can see the problem. My build script (see below, lines
wrapped) has vars set for the case when BDB or SASL are installed in
different prefixes. At the moment I'm building against the pre-installed
ones and set these prefixes to /usr. Because of this /usr/lib gets
prepended to rpath:

 0x0000000f (RPATH)                      Library rpath:
 0x0000001d (RUNPATH)                    Library runpath:

Any idea how to change the order without having to remove the linker
flags completely? It's so convenient just to change a prefix.

Ciao, Michael.

-------------------------------- snip --------------------------------

export CPPFLAGS="-I${SSL_PREFIX}/include -I${BDB_PREFIX}/include
-I${KRB5_PREFIX}/include -I${SASL_PREFIX}/include"
#export CPPFLAGS="-I${SSL_PREFIX}/include -I${BDB_PREFIX}/include"
export LDFLAGS="-L${BDB_PREFIX}/lib -L${SSL_PREFIX}/lib
-L${KRB5_PREFIX}/lib -L${SASL_PREFIX}/lib -Wl,-R${SSL_PREFIX}/lib

make distclean
./configure \
  --prefix=${OPENLDAP_PREFIX} \
  --enable-dynamic=yes \
  --enable-ndb=no \
  --enable-backends=mod \
  --enable-overlays=mod \
  --enable-perl=no \
  --enable-shell=no \
  --enable-local=yes \
  --with-cyrus-sasl=yes \
  --with-kerberos=yes \
  --with-tls=yes \
  --with-threads=yes \
  --with-odbc=auto \
  --enable-crypt=yes \
  --enable-spasswd=yes \
  --enable-lmpasswd=yes \

make depend
ulimit -c unlimited
make test