Subject: Re: Shared object "libX11.so.6" not found
To: Ross Harvey <ross@teraflop.com>
From: Joseph Sarkes <joe@js.ne.mediaone.net>
List: port-alpha
Date: 07/12/1998 21:37:27
Ross Harvey writes:
> > 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?
> 

yes, these are packages from the netbsd -current pkgsrc sup. the ones that build
ok and don't run afterwards due to not finding libX11.so.6 are wish (tk8.0) and
xosview. I can run xterm, etc from the snapshot ok though. Other packages will not
link due to the flag -Bforcearchive not existing in the alpha version of ld. 

-- 
Joseph Sarkes                   mailto:joe@mediaone.net