libtool
[Top][All Lists]
Advanced

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

Re: libjava testsuite problem under i686-pc-linux-gnu


From: John David Anglin
Subject: Re: libjava testsuite problem under i686-pc-linux-gnu
Date: Sat, 26 May 2001 18:14:46 -0400 (EDT)

This seems to be a libtool problem.  Array_1 is one of the testsuite
programs for libjava.  It is built with libtool.  The problem appears
appears to be that in building the relink command for the Array_1
script, libtool doesn't add `rpath' options for gcc (in this case
gcj) `-B' options.  It only seems to look at `-L' options.  As a
result, the pre-install version of Array_1 (lt-Array_1) has an
incorrect runtime location for libgcc_s.so.0.  It uses the old
version in the install directory rather than the new version in
the gcc build directory.

The result is many testsuite FAILs if there are incompatible differences
between the two libraries.

> Ah, I see  the problem.  It's the relink command in Array_1.  We have
> the following dependencies pre-install:
> 
> address@hidden:~/gnu/gcc-3.0/objdir/i686-pc-linux-gnu/libjava/testsuite > ldd 
> .libs
> /lt-Array_1
>         libgcj.so.2 => 
> /home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//libjava/.libs/libgcj.so.2 
> (0x40015000)
>       libdl.so.2 => /lib/libdl.so.2 (0x40467000)
>       libgcjgc.so.1 => 
> /home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//boehm-gc/.libs/libgcjgc.so.1 
> (0x4046a000)
>       libpthread.so.0 => /lib/libpthread.so.0 (0x4048a000)
>       libzgcj.so.0 => 
> /home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//zlib/.libs/libzgcj.so.0 
> (0x4049c000)
>       libm.so.6 => /lib/libm.so.6 (0x404aa000)
>       libgcc_s.so.0 => /usr/local/lib/libgcc_s.so.0 (0x404c7000)
>       libc.so.6 => /lib/libc.so.6 (0x404d1000)
>       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> 
> This is how a relink is done:
> 
> /home/dave/gnu/gcc-3.0/objdir/gcc/gcj -B/home/dave/gnu/gcc-3.0/objdir/gcc/ 
> --encoding=UTF-8 
> -B/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu/libjava/testsuite/../ 
> /home/dave/gnu/gcc-3.0/libjava/testsuite/libjava.lang/Array_1.java 
> --main=Array_1 -g -o 
> /home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu/libjava/testsuite/.libs/20712-lt-Array_1
>  -Wl,--verbose 
> /home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//libjava/.libs/libgcj.so 
> -L/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu/libjava -ldl 
> /home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//boehm-gc/.libs/libgcjgc.so 
> -lpthread 
> /home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//zlib/.libs/libzgcj.so 
> -L/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//libjava/.libs 
> -L/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//boehm-gc/.libs 
> -L/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//zlib/.libs -lm -Wl,--rpath 
> -Wl,/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//libjava/.libs 
> -Wl,--rpath -Wl,/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//!
boehm-gc/.libs -Wl,--rpath 
-Wl,/home/dave/gnu/gcc-3.0/objdir/i686-pc-linux-gnu//zlib/.libs -Wl,--rpath 
-Wl,/usr/local/lib
> 
> There is no `rpath' for `/home/dave/gnu/gcc-3.0/objdir/gcc/'.  Thus, even
> though ld finds libgcc in this directory, the runtime location is set to
> `/usr/local/lib'.
> 
> This suggests that libtool should look at `-B' options as well as `-L'
> options when it generates `rpath' options in the preinstall case.

Dave
-- 
J. David Anglin                                  address@hidden
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



reply via email to

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