On 15/3/2012 12:46 μμ, Nikolaos Milas wrote:
Subsequently, build was successful!
I used:
AUXLIBS="${AUXLIBS} -L/usr/local/openldap/lib64 -lldap -llber"
I've found that building Postfix RPMs like this, does NOT use the simple
ldap library symlinks; in fact it uses:
# ldd /usr/sbin/postfix
...
libldap-2.4.so.2 => /usr/local/openldap/lib64/libldap-2.4.so.2
(0x00002b87de28c000)
liblber-2.4.so.2 => /usr/local/openldap/lib64/liblber-2.4.so.2
(0x00002b87de4d0000)
...
while we would want it to use just:
libldap.so
liblber.so
Here is the lib dir content:
# ls -la /usr/local/openldap/lib64/
total 4312
drwxr-xr-x 2 ldap ldap 4096 Mar 22 18:01 .
drwxr-xr-x 10 ldap ldap 4096 Mar 22 18:01 ..
lrwxrwxrwx 1 ldap ldap 20 Mar 22 18:01 liblber-2.4.so.2 ->
liblber-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 171360 Mar 9 19:43 liblber-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 99046 Mar 9 19:50 liblber.a
-rw-r--r-- 1 ldap ldap 864 Mar 9 19:43 liblber.la
lrwxrwxrwx 1 ldap ldap 20 Mar 22 18:01 liblber.so ->
liblber-2.4.so.2.8.3
lrwxrwxrwx 1 ldap ldap 20 Mar 22 18:01 libldap-2.4.so.2 ->
libldap-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 1096041 Mar 9 19:43 libldap-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 533294 Mar 9 19:50 libldap.a
-rw-r--r-- 1 ldap ldap 924 Mar 9 19:43 libldap.la
lrwxrwxrwx 1 ldap ldap 22 Mar 22 18:01 libldap_r-2.4.so.2 ->
libldap_r-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 1201498 Mar 9 19:43 libldap_r-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 589700 Mar 9 19:50 libldap_r.a
-rw-r--r-- 1 ldap ldap 947 Mar 9 19:43 libldap_r.la
lrwxrwxrwx 1 ldap ldap 22 Mar 22 18:01 libldap_r.so ->
libldap_r-2.4.so.2.8.3
lrwxrwxrwx 1 ldap ldap 20 Mar 22 18:01 libldap.so ->
libldap-2.4.so.2.8.3
lrwxrwxrwx 1 ldap ldap 21 Mar 22 18:01 libslapi-2.4.so.2 ->
libslapi-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 442804 Mar 9 19:44 libslapi-2.4.so.2.8.3
-rw-r--r-- 1 ldap ldap 208404 Mar 9 19:50 libslapi.a
-rw-r--r-- 1 ldap ldap 862 Mar 9 19:44 libslapi.la
lrwxrwxrwx 1 ldap ldap 21 Mar 22 18:01 libslapi.so ->
libslapi-2.4.so.2.8.3
This causes problems, if we update ldap package and the actual library
files change (it already happened to me once).
Questions:
1. Why Postfix, when being built, does not simply use liblber.so and
libldap.so but it registers a "longer" name of the library files, even
if the latter is still a symlink?
I built using:
CCARGS="${CCARGS} -DHAS_LDAP -I/usr/local/openldap/include"
AUXLIBS="${AUXLIBS} -L/usr/local/openldap/lib64 -lldap -llber"
2. Can someone please clarify how we can build Postfix requiring/forcing
the use of (generic lib symlinks) libldap.so and liblber.so so that (the
exact name of the library will not be used by the RPM build mechanism
and) upgrade problems can be avoided?
Please advise.
Best regards,
Nick