Logged in as guest
Viewing Build/5929 Full headers
Major security issue: yes no
Notes: wontfix Notification:
Date: Sat, 7 Feb 2009 04:15:59 GMT From: h.b.furuseth@usit.uio.no To: openldap-its@OpenLDAP.org Subject: 'make test' uses installed libldap_r/liblber
Full_Name: Hallvard B Furuseth Version: HEAD OS: RedHat Linux x86_64 URL: Submission from: (NULL) (129.240.6.233) Submitted by: hallvard "make test" uses installed instead of newly built libraries, with ./configure --enable-dynamic LDFLAGS=<installed lib>. It works if either --enable-dynamic or LDFLAGS is omitted. Minimal test: p=/site/ldap/install # ...or wherever OpenLDAP is installed ./configure --quiet --prefix=$p --enable-dynamic \ --disable-databases --disable-overlays --enable-ldap \ CPPFLAGS="-I$p/include" LDFLAGS="-L$p/lib -Wl,-rpath,$p/lib" make -s depend all Edit servers/slapd/slapd (a wrapper script from libtool): Insert echo "" ldd "$progdir/$program" | grep libl >&2 printenv | egrep '^(GCC|[A-Z_0-9]*PATH).*/' >&2 before exec "$progdir/$program" ${1+"$@"} cd tests ./run -b ldif test029-ldapglue Now "./run -b ldif test029-ldapglue" shows libldap_r-2-devel.so.0 => /site/ldap/install/lib/libldap_r-2-devel.so.0 liblber-2-devel.so.0 => /site/ldap/install/lib/liblber-2-devel.so.0 LD_LIBRARY_PATH=/usit/bombur/site/ldap/HEAD-commit/tests/../libraries:/usit/bombur/site/ldap/HEAD-commit/tests/../libraries: slapd#2 crashes unless the installed OpenLDAP is from February, otherwise testrun/slapd.2.log says symbol ldap_pvt_search is missing.
Date: Sat, 07 Feb 2009 17:35:18 -0800 From: Howard Chu <hyc@symas.com> To: h.b.furuseth@usit.uio.no CC: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
h.b.furuseth@usit.uio.no wrote: > Full_Name: Hallvard B Furuseth > Version: HEAD > OS: RedHat Linux x86_64 > URL: > Submission from: (NULL) (129.240.6.233) > Submitted by: hallvard > > > "make test" uses installed instead of newly built libraries, > with ./configure --enable-dynamic LDFLAGS=<installed lib>. Don't do that. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no> Date: Sun, 8 Feb 2009 21:08:40 +0100 To: hyc@symas.com Cc: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
hyc@symas.com writes: >> "make test" uses installed instead of newly built libraries, >> with ./configure --enable-dynamic LDFLAGS=<installed lib>. > > Don't do that. Then what do I do? Some libraries OpenLDAP needs are there, including DB 4.4. Without LDFLAGS and corresponding CPPFLAGS I get the system's DB 4.3, so configure doesn't magically look in <--prefix>/lib/ on its own. Or with CPPFLAGS but without LDFLAGS I get DB version mismatch. I don't want to require $LD_LIBRARY_PATH to be set before running OpenLDAP programs, nor to mess with /etc/ld.so.conf. -- Hallvard
Date: Sun, 08 Feb 2009 19:15:12 -0800 From: Howard Chu <hyc@symas.com> To: Hallvard B Furuseth <h.b.furuseth@usit.uio.no> CC: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
Hallvard B Furuseth wrote: > hyc@symas.com writes: >>> "make test" uses installed instead of newly built libraries, >>> with ./configure --enable-dynamic LDFLAGS=<installed lib>. >> Don't do that. > > Then what do I do? Some libraries OpenLDAP needs are there, including > DB 4.4. Without LDFLAGS and corresponding CPPFLAGS I get the system's > DB 4.3, so configure doesn't magically look in<--prefix>/lib/ on its > own. Or with CPPFLAGS but without LDFLAGS I get DB version mismatch. > > I don't want to require $LD_LIBRARY_PATH to be set before running > OpenLDAP programs, nor to mess with /etc/ld.so.conf. Note that scripts/defines.sh already explicitly sets LD_LIBRARY_PATH to point at the newly built libraries. What else do you expect us to do? -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Date: Sun, 08 Feb 2009 21:54:10 -0800 From: Howard Chu <hyc@symas.com> To: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
hyc@symas.com wrote: > Hallvard B Furuseth wrote: >> hyc@symas.com writes: >>>> "make test" uses installed instead of newly built libraries, >>>> with ./configure --enable-dynamic LDFLAGS=<installed lib>. >>> Don't do that. >> Then what do I do? Some libraries OpenLDAP needs are there, including >> DB 4.4. Without LDFLAGS and corresponding CPPFLAGS I get the system's >> DB 4.3, so configure doesn't magically look in<--prefix>/lib/ on its >> own. Or with CPPFLAGS but without LDFLAGS I get DB version mismatch. >> >> I don't want to require $LD_LIBRARY_PATH to be set before running >> OpenLDAP programs, nor to mess with /etc/ld.so.conf. > > Note that scripts/defines.sh already explicitly sets LD_LIBRARY_PATH to point > at the newly built libraries. What else do you expect us to do? > Hmm. The export in defines.sh is useless now, because build/lib-shared.mk's rules to symlink the shared libraries into place was removed in rev 1.16. (See the lib-shared/mk CVS log...) Seems to me we need to reinstate those commands. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Date: Sun, 08 Feb 2009 22:36:31 -0800 From: Howard Chu <hyc@symas.com> To: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
hyc@symas.com wrote: > Hmm. The export in defines.sh is useless now, because build/lib-shared.mk's > rules to symlink the shared libraries into place was removed in rev 1.16. > > (See the lib-shared/mk CVS log...) > > Seems to me we need to reinstate those commands. > Fixed now in HEAD -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no> Date: Mon, 9 Feb 2009 08:39:05 +0100 To: hyc@symas.com Cc: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
hyc@symas.com writes: >> Seems to me we need to reinstate those commands. > > Fixed now in HEAD Didn't help. But I'm not sure it was necessary anyway - after all it did find the libraries when I did not set LDPATH, even though there were no symlinks. Something is being quite magical. -- Hallvard
Date: Sun, 08 Feb 2009 23:51:40 -0800 From: Howard Chu <hyc@symas.com> To: Hallvard B Furuseth <h.b.furuseth@usit.uio.no> CC: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
Hallvard B Furuseth wrote: > hyc@symas.com writes: >>> Seems to me we need to reinstate those commands. >> Fixed now in HEAD > > Didn't help. But I'm not sure it was necessary anyway - after all it > did find the libraries when I did not set LDPATH, even though there > were no symlinks. Something is being quite magical. > Eh. I'd forgotten. The libtool script generates a wrapper script for each binary that sets LD_LIBRARY_PATH already. So really we should remove the LD_LIBRARY_PATH export from scripts/defines.sh. And that means your problem is a libtool problem. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Date: Mon, 09 Feb 2009 00:56:23 -0800 From: Howard Chu <hyc@symas.com> To: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
hyc@symas.com wrote: > Hallvard B Furuseth wrote: >> hyc@symas.com writes: >>>> Seems to me we need to reinstate those commands. >>> Fixed now in HEAD >> Didn't help. But I'm not sure it was necessary anyway - after all it >> did find the libraries when I did not set LDPATH, even though there >> were no symlinks. Something is being quite magical. >> > Eh. I'd forgotten. The libtool script generates a wrapper script for each > binary that sets LD_LIBRARY_PATH already. So really we should remove the > LD_LIBRARY_PATH export from scripts/defines.sh. > > And that means your problem is a libtool problem. I played with this a bit more. The situation is this: The ELF linker doesn't store the absolute pathnames of dependent dynamic libraries, so it relies entirely on compiled-in runpaths and environment runpaths. Our default invocations of libtool never supply a runpath. Since you're adding one explicitly to your build, without any other settings, your runpath is the only one in effect. Since you're setting both -L and -rpath, your binaries will be linked and executed against your installed libs, regardless of what the libtool wrapper script does. If you want this to work you'll have to provide both the build directory and your installed directory in your -rpath. The symlinks would then help a little, because you only need to set one build rpath instead of 3. Go ahead and restore the build rules in your source tree to set the symlinks if you want them. At the moment it looks like they're not generally useful, and I'm tired of committing/reverting, so I'm not touching those files any more today. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no> Date: Tue, 10 Feb 2009 12:43:19 +0100 To: hyc@symas.com Cc: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
Thanks for checking this out. > If you want this to work you'll have to provide both the build > directory and your installed directory in your -rpath. Doesn't sound good either. Then I presume the installed binaries may later use libraries from a test build. > The symlinks would then help a little, because you only need to set > one build rpath instead of 3. Go ahead and restore the build rules in > your source tree to set the symlinks if you want them. At the moment > it looks like they're not generally useful, and I'm tired of > committing/reverting, so I'm not touching those files any more today. I don't have time for this now either, but I'll hopefully get to it soon. I wonder if a fix will be to revert the recent libtool upgrade:-( Of course it may be that this situation has existed for ages but I only noticed because of the missing ldap_pvt_search symbol. -- Hallvard
Date: Tue, 10 Feb 2009 04:14:41 -0800 From: Howard Chu <hyc@symas.com> To: h.b.furuseth@usit.uio.no CC: openldap-its@openldap.org Subject: Re: (ITS#5929) 'make test' uses installed libldap_r/liblber
h.b.furuseth@usit.uio.no wrote: > Thanks for checking this out. > >> If you want this to work you'll have to provide both the build >> directory and your installed directory in your -rpath. > > Doesn't sound good either. Then I presume the installed binaries may > later use libraries from a test build. Probably. You can of course edit the relink commands in the wrapper to eliminate the build runpath, but it's a lot of manual intervention no matter how you slice it. > >> The symlinks would then help a little, because you only need to set >> one build rpath instead of 3. Go ahead and restore the build rules in >> your source tree to set the symlinks if you want them. At the moment >> it looks like they're not generally useful, and I'm tired of >> committing/reverting, so I'm not touching those files any more today. > > I don't have time for this now either, but I'll hopefully get to it > soon. I wonder if a fix will be to revert the recent libtool upgrade:-( > > Of course it may be that this situation has existed for ages but I only > noticed because of the missing ldap_pvt_search symbol. > The build rules were changed in OL 2.1, it's been like this for ages... -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
______________ © Copyright 2009, OpenLDAP Foundation, info@OpenLDAP.org