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

rpath in 2.4.8



Hi,

I'm installing 2.4.x on a server which already has earlier openldap
shared libraries installed.  There are various workarounds for this kind
of thing, but the one I prefer is to use -rpath when linking so that the
app has built-in knowledge of where to look for it's own shared
libraries.

I was able to do this in 2.4.7, but I cannot accomplish the same in
2.4.8.

My build script includes a line like this:

LDFLAGS="-Wl,-rpath /local/apps/openldap2.4/lib"

Even in 2.4.7, I have to run my build script twice.  The first time I
must build without the above LDFLAGS statement, as the the configure
step will choke on the compiler check otherwise.  From config.log:

configure:4436: gcc   -Wl,-rpath /local/apps/openldap2.4/lib conftest.c  >&5
gcc: /local/apps/openldap2.4/lib: No such file or directory

I can add my LDFLAGS statement after one compile pass and not run into
this problem.

However, when I try the same thing with 2.4.8, liblber never gets
created properly, and my compile errors out with:

/usr/bin/ld: liblber-2.4.so.2: No such file: No such file or directory

When I check openldap-2.4.8/libraries/liblber/.libs/, liblber... just
isn't there.

I could just revert to using environment variables, but I find that more
error-prone than getting the path set right once during compile.

??

-- 
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso