Subject: Re: Shared object "" not found
To: None <port-alpha@NetBSD.ORG>
From: Zdenek Salvet <>
List: tech-userlevel
Date: 07/21/1998 13:50:50
> > I am trying to build various packages, and the X programs won't
> > run due to:
> > Shared object "" 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.
> 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/
> 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?

I think it would be better to enhance the ELD so that it could
consult /var/run/ (like a.out ports do) unless -R/-rpath 
is specified. Then one can move libraries without relinking apps.

Zdenek Salvet                                     
           If God had meant for us to be in the Army,
         we would have been born with green, baggy skin.