libprelude-config doesn't provide information for runtime linking
Till Dörges <[email protected]> Sun, 19 Jul 2009 09:35:16 +0200
| Newsgroups | gmane.comp.security.ids.prelude.devel |
|---|---|
| Organization | PRESENSE Technologies GmbH |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------070903030002050604090004
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hello everybody,
the executive summary is, that the output from 'libprelude-config --ldfla=
gs' is empty
where I believe it shouldn't. IMHO it should return the information that'=
s needed for
the run-time linker (see attached patch, feel free to use it as you wish)=
.
In more detail:
Using libprelude-0.9.24 and the included libprelude.m4, I'm trying to com=
pile an
application against libprelude-0.9.24.
libprelude itself was installed into a non-standard path using
--- snip ---
./configure --prefix=3D/some/path/libprelude-0.9.24
make install
--- snap ---
Compiling the application is tried as follows, but fails:
--- snip ---
./configure --enable-libprelude --with-libprelude-prefix=3D/some/path/lib=
prelude-0.9.24
[...]
checking for libprelude - version >=3D 0.9.21... no
*** Could not run libprelude test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding LIBPRELUDE or finding the wro=
ng
*** version of LIBPRELUDE. If it is not finding LIBPRELUDE, you'll need t=
o set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to poin=
t
*** to the installed location Also, make sure you have run ldconfig if t=
hat
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, althou=
gh
*** you may also be able to get things to work by modifying LD_LIBRARY_PA=
TH
--- snap ---
This is because LIBPRELUDE_LDFLAGS in libprelude.m4 is empty:
--- snip ---
LIBPRELUDE_LDFLAGS=3D`$LIBPRELUDE_CONFIG $libprelude_config_args --ld=
flags`
--- snap ---
It again is empty because libprelude-config returns an empty string, when=
asked for
linker flags:
--- snip ---
/some/path/libprelude-0.9.24/bin/libprelude-config --ldflags
<empty>
--- snap ---
LD_LIBRARY_PATH - as mentioned by configure - solves the problem as well,=
but it
should only be a measure of last resort. Providing individual run-time li=
nking
information is the cleaner way to go.
Regards -- Till
--=20
Dipl.-Inform. Till D=C3=B6rges [email protected]
PRESENSE Technologies GmbH Sachsenstr. 5, D-20097 HH
Gesch=C3=A4ftsf=C3=BChrer/Managing Directors AG Hamburg, HRB 107844
Till D=C3=B6rges J=C3=BCrgen Sander Axel Theilmann
--------------070903030002050604090004
Content-Type: text/x-patch;
name="libprelude-config.in.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="libprelude-config.in.patch"
*** libprelude-config.in 2009-07-19 08:59:14.000000000 +0200
--- libprelude-config.in.orig 2009-05-12 09:49:42.000000000 +0200
***************
*** 70,76 ****
;;
--ldflags)
- echo "-Wl,-rpath -Wl,@libdir@"
;;
--c++)
--- 70,75 ----
--------------070903030002050604090004
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Prelude-devel site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-devel
--------------070903030002050604090004--