Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2006 23:40:36 +0100
From:      Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        freebsd-ports-bugs@FreeBSD.org, bug-libtool@gnu.org, bug-followup@FreeBSD.org, libtool-patches@gnu.org
Subject:   Re: ports/94826: [patch] Very slow startup for libtool ltdl clients (eg gnucash)
Message-ID:  <20060323224036.GA7697@iam.uni-bonn.de>
In-Reply-To: <20060322184233.GC688@turion.vk2pj.dyndns.org>
References:  <200603220827.k2M8RVE0076913@server.vk2pj.dyndns.org> <20060322162811.GB7573@iam.uni-bonn.de> <20060322184233.GC688@turion.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Peter Jeremy wrote on Wed, Mar 22, 2006 at 07:42:33PM CET:
> On Wed, 2006-Mar-22 17:28:11 +0100, Ralf Wildenhues wrote:
> 
> >Thanks for the patch.  A question before I apply it: this should work on
> >DragonFly as well, right?  Could somebody confirm this, to avoid another
> >bug report to this end?
> 
> joerg found the problem using KDE on DragonFly.
> 
> >Also, has the FreeBSD rtld always supported loading dependent libraries
> >upon dlopen() (including honoring DT_RPATH entries in the module) or was
> >this not working at some point in the past?
> 
> AFAIK, it's worked since FreeBSD transitioned to ELF (FreeBSD3.0).  I'm
> not sure about the a.out rtld but FreeBSD 2.x is ancient history.

OK, thanks.  FWIW, for the historically interested,
http://www.freebsd.org/cgi/cvsweb.cgi/src/libexec/rtld-aout/Attic/rtld.c?hideattic=0
indicates this to be working in aout from rev. 1.25, backported to
FreeBSD 2.1.

I've applied the following patches into Libtool branch-1-5 and HEAD,
respectively.  Thanks again.

Cheers,
Ralf

branch-1-5:
	* ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS) [ freebsd, dragonfly ]:
	Set libltdl_cv_sys_dlopen_deplibs to yes.  Fixes excessive
	lt_dlopen times on these systems.
	* NEWS, THANKS: Update.
	Bug reported by Peter Jeremy <peterjeremy@optushome.com.au>,
	patch by Joerg Sonnenberger <joerg@netbsd.org>.

Index: NEWS
===================================================================
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.109.2.44
diff -u -r1.109.2.44 NEWS
--- NEWS	16 Mar 2006 20:48:52 -0000	1.109.2.44
+++ NEWS	23 Mar 2006 19:27:05 -0000
@@ -6,6 +6,9 @@
 * Fix regression on OpenBSD, NetBSD, DragonFly, and other systems
   with hardcode_direct=yes that wrongly removed paths to uninstalled
   libraries during link mode.
+* Let libltdl know that FreeBSD and DragonFly dlopen causes dependent
+  modules to be loaded.  This fixes excessive load times for modules
+  with large library dependency graphs.
 * Bug Fixes.
 
 New in 1.5.22: 2005-12-18; CVS version 1.5.21a, Libtool team:
Index: THANKS
===================================================================
RCS file: /cvsroot/libtool/libtool/THANKS,v
retrieving revision 1.34.2.17
diff -u -r1.34.2.17 THANKS
--- THANKS	16 Mar 2006 20:48:52 -0000	1.34.2.17
+++ THANKS	23 Mar 2006 19:27:05 -0000
@@ -102,6 +102,7 @@
   Patrick Welche		prlw1@newn.cam.ac.uk
   Paul Eggert			eggert@twinsun.com
   Peter Eisentraut		peter_e@gmx.net
+  Peter Jeremy			peterjeremy@optushome.com.au
   Rainer Orth			ro@TechFak.Uni-Bielefeld.DE
   Ralf Menzel			menzel@ls6.cs.uni-dortmund.de
   Robert Ögren			lists@roboros.com
Index: ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltdl.m4,v
retrieving revision 1.47.2.11
diff -u -r1.47.2.11 ltdl.m4
--- ltdl.m4	18 Dec 2005 22:14:06 -0000	1.47.2.11
+++ ltdl.m4	23 Mar 2006 19:27:05 -0000
@@ -127,6 +127,9 @@
     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
     libltdl_cv_sys_dlopen_deplibs=yes
     ;;
+  freebsd* | dragonfly*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
     # GNU and its variants, using gnu ld.so (Glibc)
     libltdl_cv_sys_dlopen_deplibs=yes


HEAD:
	* libltdl/m4/ltdl.m4 (LT_SYS_DLOPEN_DEPLIBS) [ freebsd ]
	[ dragonfly ]: Set libltdl_cv_sys_dlopen_deplibs to yes.
	Fixes excessive lt_dlopen times on these systems.
	* NEWS, THANKS: Update.
	Bug reported by Peter Jeremy <peterjeremy@optushome.com.au>,
	patch by Joerg Sonnenberger <joerg@netbsd.org>.

Index: NEWS
===================================================================
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.191
diff -u -r1.191 NEWS
--- NEWS	12 Jan 2006 22:02:55 -0000	1.191
+++ NEWS	23 Mar 2006 09:47:43 -0000
@@ -20,7 +20,7 @@
 * Support for linux-dietlibc (`diet' as well as `diet-dyn', separately).
 * Shell optimizations which break use of the stdin file descriptor in libtool.
 * `libtoolize --install' now also installs `install-sh'.
-* Support (mostly) for DragonFly BSD.
+* Support for DragonFly BSD, improved support for FreeBSD.
 * Allow shell special characters like `$' in source file names, but not
   in object names, to enhance GCJ support.
 * Detection of compiler wrappers like distcc/ccache and $host_alias prefix.
Index: THANKS
===================================================================
RCS file: /cvsroot/libtool/libtool/THANKS,v
retrieving revision 1.54
diff -u -r1.54 THANKS
--- THANKS	16 Mar 2006 20:47:54 -0000	1.54
+++ THANKS	23 Mar 2006 09:47:43 -0000
@@ -102,6 +102,7 @@
   Patrick Welche		prlw1@newn.cam.ac.uk
   Paul Eggert			eggert@twinsun.com
   Peter Eisentraut		peter_e@gmx.net
+  Peter Jeremy			peterjeremy@optushome.com.au
   Rainer Orth			ro@TechFak.Uni-Bielefeld.DE
   Ralf Menzel			menzel@ls6.cs.uni-dortmund.de
   Robert Ögren			lists@roboros.com
Index: libltdl/m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/ltdl.m4,v
retrieving revision 1.25
diff -u -r1.25 ltdl.m4
--- libltdl/m4/ltdl.m4	20 Nov 2005 08:45:54 -0000	1.25
+++ libltdl/m4/ltdl.m4	23 Mar 2006 09:47:43 -0000
@@ -341,6 +341,9 @@
     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
     lt_cv_sys_dlopen_deplibs=yes
     ;;
+  freebsd* | dragonfly*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
     # GNU and its variants, using gnu ld.so (Glibc)
     lt_cv_sys_dlopen_deplibs=yes



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060323224036.GA7697>