newbie compile problems

Marcus Brinkmann Marcus.Brinkmann at ruhr-uni-bochum.de
Mon Feb 24 21:28:07 CET 2003


On Mon, Feb 24, 2003 at 02:48:01PM -0500, Daniel Packer wrote:
> I was unable to run the binary executable produced by gcc, because I got the
> error (quoted from my prior email below), but when I set LD_LIBRARY_PATH, it
> ran without a problem. I'm not a unix library expert, but from what I have
> read, it seems that the run-time loader path is not being compiled into my
> executable, so the loader can't find my shared library when I run the
> program.

That's right.
 
> Is there some way to ensure that my gpgme executables are compiled with
> proper run time loader paths? Or am I barking up the wrong tree? I don't
> know if this is directly related to gpgme-conf or not, but I thought I'd go
> through it, if just to learn something.

This is a canonical problem in ELF.

For the ELF standard in the current version as supported by the tool, your
only way to do it if you use non-standard paths (paths not searched
automatically by the linker) is to use the --rpath linker option (something
like "-Wl,-rpath=/home/daniel/install/lib", but that has the undesired side
effect that it is not overridable at runtime later-on.

The upcoming new version of the ELF standard allows with runpath a similar
effect, but with lower precedence.

In a strict sense, gpgme-config should add rpath for non-standard paths. 
People hate that, though, because of the precedence problem.

You have digged out a hot potato here :)

Thanks,
Marcus


-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus at gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/




More information about the Gnupg-devel mailing list