This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

rpath and libtool == testsuite woes


Why do we use rpath anywhere in the gcc build process?  In particular,
using --rpath /usr/local/lib on a linux system doesn't make much sense,
the major problem being that DT_RPATH takes precedence over
LD_LIBRARY_PATH.

I'm seeing lots of libjava testsuite failures with a powerpc-linux
native build, gcc-3.3 installed as the system compiler.  eg.

Executing on host: /usr/tmp/ppc/gcc-curr/powerpc-linux/libjava/testsuite/../libtool --silent --tag=GCJ --mode=link /usr/tmp/ppc/gcc-curr/gcc/gcj -B/usr/tmp/ppc/gcc-curr/gcc/ --encoding=UTF-8 -B/usr/tmp/ppc/gcc-curr/powerpc-linux/./libjava/ /src/gcc-current/libjava/testsuite/libjava.jni/cxxtest.java   -no-install -fjni -L. -lcxxtest -L/usr/tmp/ppc/gcc-curr/powerpc-linux/./libstdc++-v3/src -lstdc++ --main=cxxtest -g  -L/usr/tmp/ppc/gcc-curr/powerpc-linux/./libjava/.libs -L/usr/tmp/ppc/gcc-curr/powerpc-linux/./boehm-gc/.libs -lm   -o cxxtest    (timeout = 300)
PASS: linking cxxtest
./cxxtest: /usr/local/lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/tmp/ppc/gcc-curr/powerpc-linux/./libstdc++-v3/src/.libs/libstdc++.so.6)
./cxxtest: /usr/local/lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/tmp/ppc/gcc-curr/powerpc-linux/./libjava/.libs/libgcj.so.4)
FAIL: cxxtest run

Obviously, we're picking up the wrong libgcc_s.so.  Turns out this is
because libtool is passing --rpath /usr/local/lib to the linker.

/usr/tmp/ppc/gcc-curr/gcc/gcj -B/usr/tmp/ppc/gcc-curr/gcc/ --encoding=UTF-8 -B/usr/tmp/ppc/gcc-curr/powerpc-linux/./libjava/ /src/gcc-current/libjava/testsuite/libjava.jni/cxxtest.java -fjni --main=cxxtest -g -o cxxtest  -L/usr/tmp/ppc/gcc-curr/powerpc-linux/libjava/testsuite -lcxxtest -L/usr/tmp/ppc/gcc-curr/powerpc-linux/./libstdc++-v3/src /usr/tmp/ppc/gcc-curr/powerpc-linux/./libstdc++-v3/src/.libs/libstdc++.so -L/usr/tmp/ppc/gcc-curr/powerpc-linux/libstdc++-v3/src -L/usr/tmp/ppc/gcc-curr/powerpc-linux/libstdc++-v3/src/.libs -lm -lm -lm -L/usr/tmp/ppc/gcc-curr/gcc -L/usr/local/powerpc-linux/bin -L/usr/local/powerpc-linux/lib -L/usr/local/lib/../powerpc-linux/lib -L/usr/local/lib -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s -L/usr/tmp/ppc/gcc-curr/powerpc-linux/./libjava/.libs -L/usr/tmp/ppc/gcc-curr/powerpc-linux/./boehm-gc/.libs -lm -Wl,--rpath -Wl,/usr/tmp/ppc/gcc-curr/powerpc-linux/./libstdc++-v3/src/.libs -Wl,--rpath -Wl,/usr/local/lib

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]