[2742] in SIPB_Linux_Development

home help back first fref pref prev next nref lref last post

Re: third/wcl

daemon@ATHENA.MIT.EDU (Aaron M. Ucko)
Wed Jun 2 12:11:07 1999

To: Greg Hudson <ghudson@MIT.EDU>
Cc: linux-dev@MIT.EDU
From: amu@MIT.EDU (Aaron M. Ucko)
Date: 02 Jun 1999 11:02:41 -0500
In-Reply-To: Greg Hudson's message of "Wed, 2 Jun 1999 00:20:05 -0400 (EDT)"

Greg Hudson <ghudson@MIT.EDU> writes:

> ld: warning: libSM.so.6, needed by /usr/X11R6/lib/libXmu.so, not found (try using --rpath)
> ld: warning: libICE.so.6, needed by /usr/X11R6/lib/libXmu.so, not found (try using --rpath)

Oh, I think I know what's happening.  Because the dynamic loader can't
tell whether an ELF shared library with no dependency information was
built with libc5 or libc6, some programs were getting libraries built
with the wrong version of libc.  For Red Hat-Athena 5.2/8.2, we worked
around this problem by switching to a version of ldconfig that
supported an extended ld.so.conf syntax that allowed us to associate a
default library generation with each directory, solving the runtime
problem.

What we forgot was that ld uses ld.so.conf when linking in shared
libraries containing dependency information and the version of ld
we're using *doesn't* support the extended syntax mentioned above and
ends up not looking in /usr/X11R6/lib when trying to resolve
shared-library dependencies.

Here are some solutions which strike me as at least vaguely
reasonable, from most preferred to least preferred:

* Replace ld, like ldconfig, with a version that can deal with the
  extended ld.so.conf syntax.

	This is the best solution in most ways, but kind of feels like
	overkill.

* Change /usr/X11R6/lib=libc6 back to /usr/X11R6/lib in /etc/ld.so.conf.

	This unconfuses ld about /usr/X11R6/lib, and should be safe
	unless people install poorly built third-party libraries in
	that directory.  (Every library a Red Hat 5.2 package installs
	in /usr/X11R6/lib contains proper dependency information; I
	*assume* the same is true of 6.0, but would need to check to
	be sure.)

* Work around the problem in the build system.

	These "solutions" all leave the problem around for people not
	using our build system, and are included only for completeness.

  **  Have do.sh set LD_LIBRARY_PATH to /usr/X11R6/lib on Linux.

  **  Arrange for the wcl Makefiles to run ld with the flag
      "-rpath-link /usr/X11R6/lib"

  **  Arrange for the wcl Makefiles to link against -lSM -lICE
      explicitly.

home help back first fref pref prev next nref lref last post