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

Re: Compilation 2.3.39 on SunOS 5.8.



vincent.blondel@ing.be wrote:
Hello,

I am trying to compile OpenLDAP 2.3.39 on my sun box. Below details on
my compilation environment :

[...]


PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
LD_LIBRARY_PATH=/usr/local/lib
PKG=openldap-2.3.39
PREFIX=/usr/local

export PATH PKG PREFIX LD_LIBRARY_PATH

/usr/bin/env \
CC="/usr/local/bin/cc" \
CXX="/usr/local/bin/c++" \
CFLAGS="-O2 -pipe" \
LDFLAGS="-L/usr/local/ssl/lib/libssl.a
-L/usr/local/ssl/lib/libcrypto.a -L/usr/local/ssl/lib -L/usr/local/lib
-R/usr/local/lib" \

Under LDFLAGS, you include several library directories for use at compile time (-L) but only /usr/local/lib for runtime (-R).


While you have no problems compiling, the ldd output shows that the binaries can't find the appropriate libraries when run (i.e. in runtime).

Add the ssl library path (/usr/local/ssl/lib) as a runtime library path as well and you should be OK.

By the way, if I remember correctly, -L is for directories only, in which case it makes no sense to add libssl.a or libcrypto.a with -L. If the compile process can't identify by itself which libraries it needs, which it should, these should be specified with -l (lowercase L).

For further details, your favourite search engine should be more than helpful as long as you feed it the right keywords.


-- Bjørn