Subject: Re: Shared object "libX11.so.6" not found
To: None <joe@js.ne.mediaone.net, port-alpha@NetBSD.ORG>
From: Ross Harvey <ross@teraflop.com>
List: port-alpha
Date: 07/12/1998 17:56:00
> From port-alpha-owner-ross=teraflop.com@NetBSD.ORG Sun Jul 12 11:16:45 1998
> From: Joseph Sarkes <joe@js.ne.mediaone.net>
> Subject: Shared object "libX11.so.6" not found
> To: port-alpha@NetBSD.ORG
> Date: Sun, 12 Jul 1998 14:18:17 -0400 (EDT)
>
> I am trying to build various packages, and the X programs won't
> run due to:
> Shared object "libX11.so.6" not found
> The programs included in the snapshot DO work, and i don't see
> anything different about them. Is there a flag i need to set 
> somewhere so the shared libraries will be found? Or does the 
> mount point of the directory that i build the packages in matter somehow?
> My platform is a dec alpha (multia) box, running the latest current snapshot.
> -- 
> Joseph Sarkes                   mailto:joe@mediaone.net
>


>  Is there a flag...?

No, it's something that needs to be done at link time.

> ...does the mount point ... that i build the packages in matter...?

I don't think so.

It's highly likely that those packages aren't ELF-aware.

So, as a wild guess, I would direct you to the file that defined the
dynamic library build rules for those nicely working X distribution
programs:

	/usr/X11R6/lib/X11/config/NetBSD.cf

which does a #include <bsdLib.rules>, which contains (line 156)

	#define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIR)

The key thing is that for an ELF executable to find the shared library
at run-time, it needs to know the version to look for and it needs to
know all the possible directories it might be in. The -Wl is just Posix
syntax for passing a flag through to the linker, and the -rpath is telling
it that the following argument $(USRLIBDIR) is a directory to be added to
the rpath. You can have multiple rpaths if you want, they are concatenated
to make a search path.

Are these NetBSD packages?! Not even being linked correctly?!  Or are they
things you are importing independently?  What programs?