gEDA-dev: Using libtool to link gschem.... RPATH header for library search
Peter Clifton
pcjc2 at cam.ac.uk
Sun Nov 11 09:02:42 EST 2007
Hi,
I was thinking a bit about the need to set LD_LIBRARY_PATH for the
common case where a user installs gEDA in their home directory. It
represents one more barrier to getting things working, and stops users
being able to create desktop launchers pointing directly at the
application. (You'd need a wrapper script).
It turns out that linking with libtool:
libtool --mode=link gcc .....
will add an appropriate RPATH entry for the libraries we link with. This
should solve the problem, and as we already (IIRC) hard-code a path to
the GEDADATADIR in libgeda anyway.
Is this a good idea?
(Another alternative might be to add a relative RPATH entry,
"$ORIGIN/../lib" although this does assume a /xxx/bin/../lib/ path to
find the libraries. This isn't necessarily true for all builds.)
Should we consider using libtool to link gschem?
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
More information about the geda-dev
mailing list