Subject: Re: gtk2 built twice?
To: Johnny Lam <jlam@NetBSD.org>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 02/10/2005 21:39:09
[ On Monday, February 7, 2005 at 10:28:20 (-0500), Johnny Lam wrote: ]
> Subject: Re: gtk2 built twice?
> No, there is no mis-detection. The shared libraries in the build
> directory are linked in such a way that (libtool-linked) uninstalled
> executables can be run that are linked against the (libtool-linked)
> uninstalled shared libraries. This is done by embedding the build
> directory into the runtime library search paths for all of the
> libtool-linked objects. When we install the shared libraries and any
> applications linked against them, they must be relinked to have the
> correct runtime library search path.
> This is normal libtool behavior.
If that's the way libtool is now working all of the time then it is broken.
Libtool creates wrapper scripts for un-installed executables which set
up the right runtime environment so that one can run those un-installed
executables that are linked against un-installed shared libraries.
The executable is actually created in the secret `.libs' subdirectory
managed by libtool, and the wrapper script is created in the place where
the executable was expected to be created.
Relinking of dynamic-linked executables or shared libraries should
normally never be necessary during install, provided that they were
all created by libtool, with its proper usage.
The only time a relink during install is ever necessary is when libtool
discovers that the expected installation path "registered" during
"libtool --mode=link" differs from the actuall installation path given
during "libtool --mode=install". Outside fo pkgsrc this will normally
only happen if someone does a "make install DESTDIR=/destdir" (which is
kinda bogus because that's not the traditional expected use of DESTDIR,
but that's libtool for you.... :-) Within pkgsrc I wouldn't expect this
to ever happen, and it shouldn't normally, but I'm not 100% sure that it
My guess though is that sometimes relinking during install might be
happening for some packages because they don't use Automake (properly)
and/or they don't use libtool properly (because they don't use
Automake), and/or they have screwed up something in their makefiles such
that libtool gets confused about the installation path between build
time and install time.
All this Automake, Autoconf, Libtool spaghetti takes code re-use to a
new low. No wonder it's so confusing! :-)
Greg A. Woods
H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <email@example.com>
Planix, Inc. <firstname.lastname@example.org> Secrets of the Weird <email@example.com>