bug-gnulib
[Top][All Lists]
Advanced

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

Gnulib use of -Wl,-rpath


From: Jeffrey Walton
Subject: Gnulib use of -Wl,-rpath
Date: Tue, 14 May 2019 01:20:03 -0400

Hi Everyone,

I'm trying to track down a failure in building libidn. IDN uses
Gnulib, and IDN's 'make check' is failing on the Gnulib test runner.
IDN's earlier test runners pass, and I think the issue is related
Gnulib.

First, here is a successful runner. IDN's runners 1 and 2 do this:

libtool: link: gcc -g2 -O2 -fsanitize=address -fno-omit-frame-pointer
-march=native -fPIC -pthread -fsanitize=address -Wl,-R
-Wl,/var/sanitize/lib64 -Wl,--enable-new-dtags -o test-verify
test-verify.o -Wl,--no-as-needed  -L/var/sanitize/lib64 libtests.a
../../lib/gl/.libs/libgnu.a libtests.a -ldl -lpthread -pthread
gmake[4]: Leaving directory '/home/build/libidn-1.35/lib/gltests'
gmake  check-TESTS
gmake[4]: Entering directory '/home/build/libidn-1.35/lib/gltests'
gmake[5]: Entering directory '/home/build/libidn-1.35/lib/gltests'
PASS: test-alloca-opt
PASS: test-c-ctype
...

Second, here is a failed Gnulib runner. IDN's runner 3 does this:

libtool: link: gcc -g2 -O2 -fsanitize=address -fno-omit-frame-pointer
-march=native -fPIC -pthread -fsanitize=address -Wl,-R
-Wl,/var/sanitize/lib64 -Wl,--enable-new-dtags -o tst_tld tst_tld.o
-Wl,--no-as-needed  -L/var/sanitize/lib64 libutils.a
../lib/.libs/libidn.so ../gl/.libs/libgnu.a -ldl -lpthread -pthread
-Wl,-rpath -Wl,/home/build/libidn-1.35/lib/.libs -Wl,-rpath
-Wl,/var/sanitize/lib64
gmake[2]: Leaving directory '/home/build/libidn-1.35/tests'
gmake  check-TESTS
gmake[2]: Entering directory '/home/build/libidn-1.35/tests'
gmake[3]: Entering directory '/home/build/libidn-1.35/tests'
FAIL: tst_stringprep
FAIL: tst_punycode
...

In the failed run, notice two things.

(1) my LDFLAGS (Wl,-R -Wl,/var/sanitize/lib64 -Wl,--enable-new-dtags)
got overridden by Gnulib's LDFLAGS (-Wl,-rpath
-Wl,/var/sanitize/lib64).
(2) Gnulib's path does not include /home/build/libidn-1.35/gl/.libs,
which is where Gnulib is located

As I understand things an RPATH cannoth be overridden by
LD_LIBRARY_PATH, while a RUNPATH can be overridden by a
LD_LIBRARY_PATH.

My question are,

(1) why id Gnulib using a rpath instead of a runpath?
(2) why is Gnulib omitting <locations>/gl/.libs frm the runpath?
And maybe a third...
(3) why are runpaths being set for a static archive?

Thanks in advance

==========

This may be relevant:

$ cd libidn-1.35
$ find . -name 'libgnu.*'
./lib/gl/.libs/libgnu.a
./lib/gl/.libs/libgnu.la
./lib/gl/libgnu.la
./gl/.libs/libgnu.a
./gl/.libs/libgnu.la
./gl/libgnu.la



reply via email to

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