Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93074 - Building openldap-2.2.x when upgrading openldap-2.1.x causes bins to be linked to 2.1.x libs
Summary: Building openldap-2.2.x when upgrading openldap-2.1.x causes bins to be linke...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 93551 94458 95336 96624 96989 104136 105163 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-18 08:06 UTC by Mihai Limbasan
Modified: 2007-02-12 16:46 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Limbasan 2005-05-18 08:06:08 UTC
When upgrading from 2.1.x to 2.2.x, OpenLDAP's own binaries and libraries get 
linked against liblber.so.2 which isn't provided by 2.2.x. Re-emerging OpenLDAP 
a second time right away fixes the problem. This shouldn't happen...

Reproducible: Always
Steps to Reproduce:




revdep-rebuild example output right after upgrading:

  broken /usr/bin/ldapmodify (requires liblber.so.2)
  broken /usr/bin/ldapmodrdn (requires liblber.so.2)
  broken /usr/bin/ldapadd (requires liblber.so.2)
  broken /usr/bin/ldappasswd (requires liblber.so.2)
  broken /usr/bin/ldapsearch (requires liblber.so.2)
  broken /usr/bin/ldapwhoami (requires liblber.so.2)

Sorry for not actual ldd output, but I really, really don't have the time to 
downgrade again to test it (working under a little personal deadline).
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-05-18 18:09:46 UTC
could you please attach your portage logs for the openldap merge?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-05-18 18:37:23 UTC
ok, I can reproduce this now, and I've filed a bug with upstream.
http://www.openldap.org/its/index.cgi/Incoming?id=3734
Comment 3 LuisMi Garcia 2005-05-20 00:36:37 UTC
even after emerging it two times, I have to do this in order for apps linked to 
ldap to work: 
 
ln -s /usr/lib/liblber.so /usr/lib/libldap.so.2 
 
ln -s /usr/lib/liblber.so /usr/lib/liblber.so.2 
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-05-20 01:26:46 UTC
no! do NOT do ln -s /usr/lib/liblber.so /usr/lib/liblber.so.2 - the libraries 
are NOT completely compatible - some of the symbols have been renamed.

I've put in 2.2.26-r1 as a workaround that provides the old liblber.so.2 that 
is needed (nothing should be linked to libldap.so.2), but after this bug is 
resolved by upstream, everybody should be using revdep-rebuild more.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2005-05-22 07:40:02 UTC
*** Bug 93551 has been marked as a duplicate of this bug. ***
Comment 6 SpanKY gentoo-dev 2005-05-30 20:54:51 UTC
*** Bug 94458 has been marked as a duplicate of this bug. ***
Comment 7 DEMAINE Benoît-Pierre, aka DoubleHP 2005-06-04 15:46:34 UTC
emerge is quiet clear about this bug:

# tail 2979-openldap-2.2.26-r2.log
 * machine please see the ebuild for upgrade instructions, otherwise
 * you may corrupt your database!
 * Part of the configuration file syntax has changed:
 * 'access to attribute=' is now 'access to attrs='
 * You must also run revdep-rebuild after upgrading from 2.1 to 2.2:
 * # revdep-rebuild --soname liblber.so.2
 * # revdep-rebuild --soname libldap.so.2
 * # revdep-rebuild --soname libldap_r.so.2

I agree that other app usually complain the bad wa about this, for example
http://forums.gentoo.org/viewtopic-p-2465758.html#2465758 says:
configure: error: *** compiler cannot create working executables, check
config.log *** 

but any user reading CAREFULLY his emerge logs and/or using enotice
http://dev.gentoo.org/~eldad/enotice/enotice would NOT leave this bug open for
more time than required for applying the proposed solution:

revdep-rebuild --soname liblber.so.2 && revdep-rebuild --soname libldap.so.2 &&
revdep-rebuild --soname libldap_r.so.2

and thats all !

Please close this bug.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-06-04 16:08:29 UTC
DoubleHP: I'm waiting for upstream on this, as the openldap binaries themselves 
get bad linking.
Comment 9 Mihai Limbasan 2005-06-06 11:50:19 UTC
Pierre, you misunderstood the scope of this bug. This bug is not about binaries 
belonging to other packages not working anymore because of the linkage change in 
OpenLDAP. That's normal. It's about OpenLDAP's binaries and libraries themselves 
getting linked to the old already-installed libraries, which is clearly a 
problem.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-06-07 05:39:27 UTC
*** Bug 95336 has been marked as a duplicate of this bug. ***
Comment 11 SpanKY gentoo-dev 2005-06-21 06:03:51 UTC
*** Bug 96624 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2005-06-23 03:40:45 UTC
(In reply to comment #8)
> DoubleHP: I'm waiting for upstream on this, as the openldap binaries themselves 
> get bad linking.

The bug has been closed upstream as they were not able to reproduce this on
SUSE. Hmm... :/
Comment 13 Carsten Lohrke (RETIRED) gentoo-dev 2005-06-25 18:38:54 UTC
*** Bug 96989 has been marked as a duplicate of this bug. ***
Comment 14 Ricardo Nuno 2005-06-28 07:44:42 UTC
Just upgraded from openldap-2.1.x to 2.2.26-r2 with no problems.
just follow the upgrade steps:

 * # revdep-rebuild --soname liblber.so.2
 * # revdep-rebuild --soname libldap.so.2
 * # revdep-rebuild --soname libldap_r.so.2

backed up the database, and voila it's running great ;)
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-03 10:12:59 UTC
slight update on this.

x29 openldap # readelf -d `which ldapsearch`

Dynamic section at offset 0xa808 contains 26 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libldap-2.2.so.7]
 0x00000001 (NEEDED)                     Shared library: [liblber-2.2.so.7]
 0x00000001 (NEEDED)                     Shared library: [libssl.so.0.9.7]
 0x00000001 (NEEDED)                     Shared library: [libcrypto.so.0.9.7]
 0x00000001 (NEEDED)                     Shared library: [libcrypt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libresolv.so.2]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
...
x29 openldap # readelf -d /usr/lib/libldap-2.2.so.7

Dynamic section at offset 0x39224 contains 25 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [liblber.so.2]
 0x00000001 (NEEDED)                     Shared library: [libresolv.so.2]
 0x00000001 (NEEDED)                     Shared library: [libssl.so.0.9.7]
 0x00000001 (NEEDED)                     Shared library: [libcrypto.so.0.9.7]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000e (SONAME)                     Library soname: [libldap-2.2.so.7]
...
Comment 16 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-03 10:17:48 UTC
from the build process (blank lines added for readability):

/bin/sh /var/tmp/portage/openldap-2.2.27/work/openldap-2.2.27/libtool  --
mode=link cc -O3 -march=athlon-xp -ggdb3 -pipe    -release 2.2 -version-info 
7:20:0 -rpath /usr/lib -o libldap.la bind.lo open.lo result.lo error.lo 
compare.lo search.lo controls.lo messages.lo references.lo extended.lo cyrus.lo 
modify.lo add.lo modrdn.lo delete.lo abandon.lo sasl.lo sbind.lo kbind.lo 
unbind.lo cancel.lo filter.lo free.lo sort.lo passwd.lo whoami.lo getdn.lo 
getentry.lo getattr.lo getvalues.lo addentry.lo request.lo os-ip.lo url.lo 
sortctrl.lo vlvctrl.lo init.lo options.lo print.lo string.lo util-int.lo 
schema.lo charray.lo tls.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo 
version.lo  ../../libraries/liblber/liblber.la -lresolv    -lssl -lcrypto

rm -fr .libs/libldap.la .libs/libldap.* .libs/libldap-2.2.*

cc -shared  bind.lo open.lo result.lo error.lo compare.lo search.lo controls.lo 
messages.lo references.lo extended.lo cyrus.lo modify.lo add.lo modrdn.lo 
delete.lo abandon.lo sasl.lo sbind.lo kbind.lo unbind.lo cancel.lo filter.lo 
free.lo sort.lo passwd.lo whoami.lo getdn.lo getentry.lo getattr.lo 
getvalues.lo addentry.lo request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo 
init.lo options.lo print.lo string.lo util-int.lo schema.lo charray.lo tls.lo 
os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo version.lo  -Wl,--rpath -
Wl,/var/tmp/portage/openldap-2.2.27/work/openldap-
2.2.27/libraries/liblber/.libs  ../../libraries/liblber/.libs/liblber.so -
lresolv -lssl -lcrypto   -Wl,-soname -Wl,libldap-2.2.so.7 -o .libs/libldap-
2.2.so.7.0.20

(cd .libs && rm -f libldap-2.2.so.7 && ln -s libldap-2.2.so.7.0.20 libldap-
2.2.so.7)

(cd .libs && rm -f libldap.so && ln -s libldap-2.2.so.7.0.20 libldap.so)
Comment 17 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-03 10:54:23 UTC
yay, found the solution now.
it was the ancient libtool that upstream used...
this is fixed in the 2.2.27 ebuild, entering the tree shortly.

(however revdep-rebuild is still required for anybody upgrading).
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2005-08-29 07:33:28 UTC
*** Bug 104136 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2005-09-08 02:14:18 UTC
*** Bug 105163 has been marked as a duplicate of this bug. ***
Comment 20 ivo welch 2006-02-05 13:44:34 UTC
should the ebuild of openssh not automatically force a rebuild of openldap (at least once, if it were to fail)?  I had an up-to-date tree, and just ran into the openssh / pam bug myself today.

regards,

/iaw
Comment 21 Mihai Limbasan 2006-02-11 06:59:12 UTC
No, that would be a very bad idea indeed. Besides violating the principle of least astonishment, there's no telling what other things may break on users' systems if a package like OpenLDAP, against which a *lot* of things link, would get forcibly rebuilt.