Re: [wmii] patches for shared object libixp and Sun compiler

From: Chris Foster <foster_AT_physics.uq.edu.au>
Date: Fri, 12 Jan 2007 23:23:38 +1000

On Fri, Jan 12, 2007 at 10:04:14AM +0100, Stefan Tibus wrote:
> On Fri, 12 Jan 2007 11:09:42 +1000 Chris Foster wrote:
> > > BTW, on Linux there has to be added some "runtime library
> > > search path" option as well, as it is now, I have to
> > > set LD_LIBRARY_PATH=/usr/local/lib before starting up wmii.
> >
> > If you've added shared objects to a library path, you should run
> > ldconfig to update ld.so.cache IIRC. That's a job for a package
> > manager rather than the Makefile I guess?
>
> Well... at least there are some people around suggesting the
> specification of runtime search paths at compile-time:
> http://www.blastwave.org/standards/build.html
> http://linuxmafia.com/faq/Admin/ld-lib-path.html
> http://xahlee.org/UnixResource_dir/_/ldpath.html
> I know the articles are about LD_LIBRARY_PATH, but they
> suggest the linker option instead of modifying e.g.
> /var/ld/ld.conf on Solaris.

Thanks, interesting links (just showing my ignorance here ;-)

> The point is, at compilation time you already know where
> the library is, so you code that into the executable.
> Things only get complicated if you move the library elsewhere
> afterwards. Then you still may fix that with the ld config.
> But the -R<path> option avoids having to edit that config
> in the default case. So at least it's not bad. And e.g.
> on a system where I don't have root access, I cannot change
> the ld config, while I can specify any path I want at compile
> time... If $PREFIX is within my home dir, it would work
> just out of the box with the linker option.
> This leads me to the conclusion that it is indeed a job for
> the Makefile.

Well, that sounds fair. A large proportion of wmii users are likely to
install wmii from source in a local directory on systems they don't
control (me too). Using -rpath in the makefile would save plenty of
hassle and I'll admit that running ldconfig is a pretty crap solution
unless it's being automatically handled by a package manager.

~Chris.
Received on Fri Jan 12 2007 - 14:23:45 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:18:19 UTC