From owner-freebsd-ports Thu May 3 10:50:11 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8338237B424 for ; Thu, 3 May 2001 10:50:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f43Ho0F59358; Thu, 3 May 2001 10:50:00 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 016FB37B422 for ; Thu, 3 May 2001 10:47:30 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f43HlTc59144; Thu, 3 May 2001 10:47:29 -0700 (PDT) (envelope-from nobody) Message-Id: <200105031747.f43HlTc59144@freefall.freebsd.org> Date: Thu, 3 May 2001 10:47:29 -0700 (PDT) From: bpederson@geocities.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/27065: databases/db3 shared libraries & symbolic links turned around Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27065 >Category: ports >Synopsis: databases/db3 shared libraries & symbolic links turned around >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 03 10:50:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Barry Pederson >Release: 4.2-Release >Organization: >Environment: >Description: The shared libraries created by the databases/db3 port currently end up in /usr/local/lib like this: -r--r--r-- 1 root wheel 524855 May 2 12:08 libdb3.so lrwxr-xr-x 1 root wheel 9 May 2 12:08 libdb3.so.2 -> libdb3.so Which seems backwards. The libdb3.so.2 should be the real library, and libdb3.so should be the symlink. Unfortunately it's not just a matter of renaming the files, the library seems to need to be built with that version number for everything to work correctly. For example, running ldd against a program such as Cyrus imapd linked to this db3 setup comes up with: imapd: libsasl.so.8 => /usr/local/lib/libsasl.so.8 (0x28115000) libdb3.so => /usr/local/lib/libdb3.so (0x28209000) Bad news - the previous port of db3 (3.1.17) also called its library libdb3.so (and had a symlink to it named libdb3.so.1 - which seemed pretty worthles), so upgrading the db3 port to 3.2.9 broke my cyrus imap :( So the 'configure' file, and 'Makefile.in' need to be slightly tweaked. After rebuilding with my proposed patch files below, I ended up with: lrwxr-xr-x 1 root wheel 11 May 3 12:16 libdb3.so -> libdb3.so.2 -r--r--r-- 1 root wheel 524855 May 3 12:16 libdb3.so.2 and ldd on a rebuilt cyrus imapd now shows: imapd: libsasl.so.8 => /usr/local/lib/libsasl.so.8 (0x28115000) libdb3.so.2 => /usr/local/lib/libdb3.so.2 (0x28209000) So hopefully any future db3 updates (3.3.x?) won't break other previously installed ports. >How-To-Repeat: make and install the databases/db3 port, check out what's put in your /usr/local/lib directory. >Fix: Use these updated patch files (patch-aa and patch-ab) I apologize if this is in the wrong format, or gets screwed up in this PR webpage - first time I've tried this. ##########------ cut here patch-aa ------------ --- ../dist/Makefile.in.orig Thu Nov 30 17:07:33 2000 +++ ../dist/Makefile.in Thu May 3 11:49:23 2001 @@ -34,11 +34,11 @@ libdb= libdb.a libso_base= libdb -libso_linkname= $(libso_base)-$(SOVERSION).la -libso= $(libso_base)-$(SOVERSION).@SOSUFFIX@ -libso_target= $(libso_base)-$(SOVERSION).la +libso_linkname= $(libso_base)$(SOMAJOR).la +libso= $(libso_base)$(SOMAJOR).@SOSUFFIX@ +libso_target= $(libso_base)$(SOMAJOR).la libso_default= $(libso_base).@SOSUFFIX@ -libso_major= $(libso_base)-$(SOMAJOR).@SOSUFFIX@ +libso_major= $(libso_base)$(SOMAJOR).@SOSUFFIX@.2 ################################################## # C++ @@ -49,10 +49,10 @@ ################################################## libcxx= libdb_cxx.a libxso_base= libdb_cxx -libxso= $(libxso_base)-$(SOVERSION).@SOSUFFIX@ -libxso_target= $(libxso_base)-$(SOVERSION).la +libxso= $(libxso_base)$(SOMAJOR).@SOSUFFIX@ +libxso_target= $(libxso_base)$(SOMAJOR).la libxso_default= $(libxso_base).@SOSUFFIX@ -libxso_major= $(libxso_base)-$(SOMAJOR).@SOSUFFIX@ +libxso_major= $(libxso_base)$(SOMAJOR).@SOSUFFIX@.2 ################################################## # JAVA @@ -115,7 +115,7 @@ bindir= @bindir@ includedir=@includedir@ libdir= @libdir@ -docdir= $(prefix)/docs +docdir= $(prefix)/share/doc/db3 dmode= 755 emode= 555 @@ -452,8 +452,8 @@ @cd $(libdir) && $(rm) -f \ $(libso_target) $(libso) $(libso_default) $(libso_major) @$(INSTALLER) $(libso_target) $(libdir) - @cd $(libdir) && $(ln) -s $(libso) $(libso_default) - @cd $(libdir) && $(ln) -s $(libso) $(libso_major) + @cd $(libdir) && $(chmod) $(fmode) $(libso_major) + @cd $(libdir) && $(ln) -s $(libso_major) $(libso_default) @$(LIBTOOL) --mode=finish $(libdir) install_dynamic_cxx: @@ -463,8 +463,8 @@ @cd $(libdir) && $(rm) -f \ $(libxso_target) $(libxso) $(libxso_default) $(libxso_major) @$(INSTALLER) $(libxso_target) $(libdir) - @cd $(libdir) && $(ln) -s $(libxso) $(libxso_default) - @cd $(libdir) && $(ln) -s $(libxso) $(libxso_major) + @cd $(libdir) && $(chmod) $(fmode) $(libxso_major) + @cd $(libdir) && $(ln) -s $(libxso_major) $(libxso_default) install_tcl: @echo "Installing DB Tcl library: $(libdir) ..." ##########------ cut here patch-ab ------------ --- ../dist/configure.orig Wed Jan 24 09:16:18 2001 +++ ../dist/configure Thu May 3 11:46:27 2001 @@ -1626,9 +1626,9 @@ echo $ac_n "checking libtool configuration""... $ac_c" 1>&6 echo "configure:1628: checking libtool configuration" >&5 echo "$ac_t""" 1>&6 - ${CONFIG_SHELL-/bin/sh} $srcdir/ltconfig \ - --no-verify $srcdir/ltmain.sh \ - --output=./libtool $host_os \ + ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ + --no-verify $ac_aux_dir/ltmain.sh $target \ + --output=./libtool \ --disable-static \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } @@ -1644,7 +1644,7 @@ INSTALLER="\$(LIBTOOL) --mode=install cp" POSTLINK="\$(LIBTOOL) --mode=execute true" - SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC} -avoid-version" + SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC} -version-info ${DB_VERSION_MINOR}" SOFLAGS="-rpath \$(libdir)" o=".lo" fi ##########------ cut here >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message