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.
??
2008-02-26_11:17:11-0500 Ron Peterson rpeterso@MtHolyoke.edu:
I was able to do this in 2.4.7, but I cannot accomplish the same in 2.4.8.
I'm still a little bit intellectually curious about the difference, but I'm going to forgo using rpath for now. As far as I can tell, openldap binaries themselves don't use the openldap shared libraries, so it's really only other apps I need to worry about anyway..
Ron Peterson wrote:
2008-02-26_11:17:11-0500 Ron Petersonrpeterso@MtHolyoke.edu:
I was able to do this in 2.4.7, but I cannot accomplish the same in 2.4.8.
I'm still a little bit intellectually curious about the difference, but I'm going to forgo using rpath for now. As far as I can tell, openldap binaries themselves don't use the openldap shared libraries, so it's really only other apps I need to worry about anyway..
Right, by default the binaries are statically linked to the libraries. If you build slapd with dynamic module support though, it typically works better to link slapd dynamically as well. (configure --enable-dynamic --enable-modules)
openldap-software@openldap.org