[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checking for header/library mismatch, rpath problem?

From: Adam Mercer
Subject: Re: checking for header/library mismatch, rpath problem?
Date: Wed, 16 Jun 2010 10:25:02 -0500

On Tue, Jun 15, 2010 at 23:12, Ralf Wildenhues <address@hidden> wrote:

> I'm not sure I understand this paragraph.

I'll try to be a bit clearer. One of our libraries liblalframe depends
on libframe, on our systems libframe is usually installed in
/opt/lscsoft/libframe, during the configuration process of liblalframe
the location of libframe is determined using either pkg-config or the
FRAME_CFLAGS and FRAME_LIBS environment variables. libframe also
includes an environment setup script with sets PATH, LD_LIBRARY_PATH,
and PKG_CONFIG_PATH to point to the appropriate location so that the
libraries can be found.

However some of out users do not like setting LD_LIBRARY_PATH and
relay on the rpath linked into the binary to locate the library, i.e.:

$ ldd FrCheck => /opt/lscsoft/libframe/lib64/
(0x00002b2754b3b000) => /lib64/ (0x00000036b2600000) => /lib64/ (0x00000036b2200000)
        /lib64/ (0x00000036b1e00000)

in the code from the the AC_CHECK_IFELSE the rpath for the library doesn't seem to be embedded into the binary, so
as this library is not present in LD_LIBRARY_PATH it can't be found
when run and the test fails:

./conftest: error while loading shared libraries:
cannot open shared object file: No such file or directory

Is that clearer?

>> Is there a way that the rpaths can be embedded into the test code, or
>> is there a way that I can rework this test to support these users?
> Well, things should work with
>  ./configure LDFLAGS=-Wl,-rpath,/foo/bar
> or a platform-specific variation thereof.  If that's not what was meant,
> then please show an example invocation that fails, including setup and
> relevant config.log parts, please.

Thats the workaround that I've recommended they use (or setting
LD_LIBRARY_PATH) but, we have users on both Linux and Macs which have
slightly different versions so the above isn't a catch all solution.

Is there a way the appropriate platform-specific options can be added



reply via email to

[Prev in Thread] Current Thread [Next in Thread]