Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34717 - nss_ldap compiles against the wrong db_185.h
Summary: nss_ldap compiles against the wrong db_185.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High major
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
: 33388 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-29 12:02 UTC by Chet McNeill
Modified: 2004-03-26 08:29 UTC (History)
2 users (show)

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


Attachments
nss_ldap-207-db4-headers.patch (nss_ldap-207-db4-headers.patch,1.51 KB, patch)
2004-02-28 05:35 UTC, Holger Thon
Details | Diff
nss_ldap-207-r1.ebuild (nss_ldap-207-r1.ebuild,1.16 KB, text/plain)
2004-02-28 05:36 UTC, Holger Thon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chet McNeill 2003-11-29 12:02:48 UTC
Two versions of sleepycat's db libraries are required for nss_ldap to be built.
This actually means there are at least three copies of db_185.h:

/usr/include/db_185.h (symlink to /usr/include/db4.1/db_185.h
/usr/include/db4/db_185.h
/usr/include/db4.1/db_185.h
/usr/include/db3/db_185.h

The nss_ldap configuration step recognizes /usr/include/db_185.h and
/usr/include/db3/db_185.h.  It defaults to using the latter, which causes
dynamic linking errors when used.

One way to fix the problem is to move /usr/include/db3/db_185.h and create a
symlink from /usr/include/db4.1/db_185.h to /usr/include/db3/db_185.h.  After
doing this nss_ldap compiles and runs correctly.

I originally ranked the bug as major due to the fact that when nss_ldap stops
working *really* nasty things happen to your entire system.

Reproducible: Always
Steps to Reproduce:
1. emerge nss_ldap
2. change nsswitch.conf to contain "passwd: ldap files" and "group: ldap files"
3.logged in as a user listed in ldap but not in the passwd file type the command
"id"

Actual Results:  
dynamic linking error, missing function __db_185_open__db410 (I do not recall
the function name exactly).


Emerge info:

Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.21_rc8-gss)
=================================================================
System uname: 2.4.21_rc8-gss i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.3.12
distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc sandbox"
GENTOO_MIRRORS="rsync://somedec.sdecent.org/gentoo http://gentoo.noved.org/
ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/
http://oss.redundant.com/pub/gentoo http://gentoo.oregonstate.edu"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://localhost/gentoo-portage"
USE="3dnow X alsa apache2 apm arts avi berkdb cdr crypt cups curl directfb dvd
emacs encode esd ethereal fbcon foomaticdb gdbm gif gnome gpm gtk imap imlib
jpeg kde ldap libg++ libwww mad maildir mikmod mmx motif mpeg mysql ncurses nls
odbc oggvorbis opengl oss pam pdflib perl php png python qt quicktime readline
samba sasl sdl slang spell sse ssl svga tcltk tcpd tiff truetype usb wmf x86 xml
xml2 xmms xv zeo zlib"
Comment 1 Nick Hadaway 2004-01-29 22:58:23 UTC
I have loosened the dependancy on db to be >=db-3 for nss_ldap-215... As you are running the unstable profile, you shouldn't need db3 installed on your system...  and in fact >=openldap-2.1 specifically needs db4... but you probably already know that. :)

Please let me know if you find any problems with this new build.
Comment 2 Holger Thon 2004-02-28 05:33:04 UTC
I've got the same problem with both nss_ldap-207 and latest nss_ldap-215.

-----------------------------------------------------------------------------
Problem description: nss_ldap.so lacks symbol __db185_open 
                     when linked against libdb-4.1.so

~ $ ldd -r /lib/libnss_ldap.so.2
        linux-gate.so.1 =>  (0xffffe000)
        libldap.so.2 => /usr/lib/libldap.so.2 (0x40038000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0x40071000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0x4007e000)
        libdl.so.2 => /lib/libdl.so.2 (0x40143000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40147000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x4015c000)
        libc.so.6 => /lib/libc.so.6 (0x4016e000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x4029e000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x402b3000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x402e5000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
undefined symbol: __db185_open  (/lib/libnss_ldap.so.2)

~ $ emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040207-r0, 2.6.3)
=================================================================
System uname: 2.6.3 i686 Intel(R) Celeron(R) CPU 2.40GHz
Gentoo Base System version 1.4.3.13
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache nostrip sandbox"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage.overlay"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage"
USE="X aalib acl alsa apache2 apm arts avi berkdb bonobo cdr crypt cscope cups dga directfb doc dvd dvdr encode esd evo exiscan-acl fbcon flash foomaticdb freetds gb gd gdbm ggi gif gnome gphoto2 gpm gtk gtk2 gtkhtml guile hbci imap imlib innodb ipv6 java jikes jpeg junit kde kerberos lame ldap libg++ libwww linguas_de linguas_en_GB mad maildir mbox mcal mikmod mitshm mmx motif mozcalendar mozilla mozp3p mozsvg mozxmlterm mpeg mysql ncurses nls nptl odbc ofx oggvorbis opengl oss pam pdflib perl png postgres ppds python qt qtmt quicktime readline rpm ruby samba sasl scanner sdl slang spell ssl svga tcltk tcpd tetex tiff truetype unicode usb x86 xml xml2 xmms xv zlib"

Additionally packages installed (unmasked through portage.overlay):
~ $ ( cd /usr/portage.overlay ; find . -iname "*.ebuild" )
./dev-util/ddd/ddd-3.3.7.ebuild
./dev-util/rapidsvn/rapidsvn-0.5.0.ebuild
./dev-util/subversion/subversion-0.37.0.ebuild
./media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild
./media-video/nvidia-glx/nvidia-glx-1.0.5336-r1.ebuild
./net-libs/nss_ldap/nss_ldap-207-r1.ebuild
./net-misc/neon/neon-0.24.4.ebuild
./net-news/inn/inn-2.4.1-r1.ebuild
./net-news/tin/tin-1.6.2.ebuild
./sys-devel/autoconf/autoconf-2.59-r3.ebuild
./sys-kernel/linux-headers/linux-headers-2.6.1.ebuild
./sys-libs/glibc/glibc-2.3.3_pre20040207.ebuild

-----------------------------------------------------------------------------
Solution: Patches against nss_ldap-207 follows.

nss_ldap-207-r1.ebuild: ebuild using db4-headers patch
db4-headers just contains the headers modifications

The patch can be applied against nss_ldap-215, too:
nss_ldap-215 $ patch -p1 < ../nss_ldap-207-db4-headers.patch
patching file configure.in
Hunk #1 succeeded at 133 (offset 17 lines).
patching file ldap-nss.c
Hunk #1 succeeded at 72 with fuzz 2 (offset 2 lines).
patching file util.c
Hunk #1 succeeded at 84 (offset -8 lines).
Comment 3 Holger Thon 2004-02-28 05:35:58 UTC
Created attachment 26514 [details, diff]
nss_ldap-207-db4-headers.patch

prefers db4's 1.85 headers over any other older db headers
Comment 4 Holger Thon 2004-02-28 05:36:56 UTC
Created attachment 26515 [details]
nss_ldap-207-r1.ebuild

modified ebuild utilizing above patch
Comment 5 Nick Hadaway 2004-03-18 17:59:36 UTC
i have added nss_ldap-215-r1 to portage incorporating your suggested changes in some form. :)  Thank you for wading through the .in files and finding a good solution to this issue.  Please test this latest build as I would like to put it to stable real soon now.
Comment 6 Holger Thon 2004-03-21 03:07:33 UTC
i tested nss_ldap-215-r1; it works! 
Comment 7 Bart Lauwers (RETIRED) gentoo-dev 2004-03-26 08:29:37 UTC
*** Bug 33388 has been marked as a duplicate of this bug. ***