[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
libFrame.so.1 => /opt/lscsoft/libframe/lib64/libFrame.so.1
(0x00002b2754b3b000)
libm.so.6 => /lib64/libm.so.6 (0x00000036b2600000)
libc.so.6 => /lib64/libc.so.6 (0x00000036b2200000)
/lib64/ld-linux-x86-64.so.2 (0x00000036b1e00000)
$
in the code from the the AC_CHECK_IFELSE the rpath for the
libFrame.so.1 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: libFrame.so.1:
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
automatically?
Cheers
Adam
- checking for header/library mismatch, rpath problem?, Adam Mercer, 2010/06/15
- Re: checking for header/library mismatch, rpath problem?, Ralf Wildenhues, 2010/06/16
- Re: checking for header/library mismatch, rpath problem?,
Adam Mercer <=
- Re: checking for header/library mismatch, rpath problem?, Ralf Wildenhues, 2010/06/16
- Re: checking for header/library mismatch, rpath problem?, Adam Mercer, 2010/06/17
- Re: checking for header/library mismatch, rpath problem?, Adam Mercer, 2010/06/22
- Re: checking for header/library mismatch, rpath problem?, Ralf Wildenhues, 2010/06/26
- Re: checking for header/library mismatch, rpath problem?, Adam Mercer, 2010/06/26
- Re: checking for header/library mismatch, rpath problem?, Ralf Wildenhues, 2010/06/28
- Re: checking for header/library mismatch, rpath problem?, Peter Breitenlohner, 2010/06/29
- Re: checking for header/library mismatch, rpath problem?, Adam Mercer, 2010/06/29
- Re: checking for header/library mismatch, rpath problem?, Ralf Wildenhues, 2010/06/29