newbie compile problems

Daniel Packer dpacker at psionik.com
Mon Feb 24 22:53:02 CET 2003


Marcus,

Oddly, /usr/local/lib seems to be one of the standard search paths for ELF,
yet until I add it via LD_LIBRARY_PATH, I can't load the so at runtime.
Remember, I said that after installed locally, I installed to the default
directory, which is /usr/local/lib. Is there more at work here than ELF
being crippled?

Thanks,
Daniel

----- Original Message -----
From: "Marcus Brinkmann" <Marcus.Brinkmann at ruhr-uni-bochum.de>
To: "Daniel Packer" <dpacker at psionik.com>
Cc: <gnupg-devel at gnupg.org>
Sent: Monday, February 24, 2003 3:29 PM
Subject: Re: newbie compile problems


> 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/
>
> _______________________________________________
> Gnupg-devel mailing list
> Gnupg-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-devel





More information about the Gnupg-devel mailing list