This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: wrong libgcc_s.so picked up in testsuite


Am Freitag, 28. Februar 2003 04:01 schrieb Tom Tromey:
> >>>>> "Michael" == Michael Ritzert <ritzert at t-online dot de> writes:
> Could you investigate what we should do?  One thing to try would be to
> also set LD_RUN_PATH in the small proc near the end of libjava.exp (in
> testsuite/lib).

I applied the patch added below. Now I still get all the FAILs, but things are 
still different:

PASS: SyncTest compilation from source
FAIL: SyncTest execution - source compiled test

Note: The error that was there the other day is gone. But the test still 
fails. Looking closer I see this:
% ldd libgcj.so.4
libgcj.so.4: /opt/gcc-3.2.2/lib/libgcc_s.so.1: version `GCC_3.3' not found 
(required by 
/var/ritzert/compile/gcc/HEAD/i686-pc-linux-gnu//libjava/.libs/libgcj.so.4)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4082d000)
        libdl.so.2 => /lib/libdl.so.2 (0x40844000)
        libz.so.1 => /lib/libz.so.1 (0x40848000)
        libgcc_s.so.1 => /opt/gcc-3.2.2/lib/libgcc_s.so.1 (0x40857000)
        libc.so.6 => /lib/libc.so.6 (0x4085f000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

/opt/gcc-3.2.2/lib is hardcoded in libgcj.so.4 (as it is in libstdc++.so 
etc.). I guess it would be hard to avoid that given that I explicitely set 
LD_RUN_PATH. So unless you have a brilliant idea I will just not set 
LD_RUN_PATH or LD_LIBRARY_PATH and rely on gcc doing the right thing.

The only thing that I don't quite understand is that /opt/gcc-3.2/lib is 
hardcoded, but all the libs are apparently still linked against the correct 
lib in the build tree. Otherwise I wouldn't expect to see the GCC_3.3 error.

Michael

Index: libjava.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/lib/libjava.exp,v
retrieving revision 1.50
diff -u -3 -p -r1.50 libjava.exp
--- libjava.exp	15 Feb 2003 16:39:28 -0000	1.50
+++ libjava.exp	28 Feb 2003 08:58:03 -0000
@@ -133,6 +133,7 @@ proc libjava_init { args } {
     global GCJ_UNDER_TEST
     global TOOL_EXECUTABLE
     global original_ld_library_path
+    global original_ld_run_path
     global env objdir
     global env libgcj_jar
     global tool_root_dir
@@ -181,6 +182,12 @@ proc libjava_init { args } {
 	}
     }
 
+    if [info exists env(LD_RUN_PATH)] {
+	set original_ld_run_path $env(LD_RUN_PATH)
+    } else {
+	set original_ld_run_path ""
+    }
+
     set wrapper_file "";
     set wrap_compile_flags "";
     if [target_info exists needs_status_wrapper] {
@@ -373,10 +380,13 @@ proc libjava_arguments {{mode compile}} 
 
     # Set variables the dynamic linker looks at.
     global original_ld_library_path
+    global original_ld_run_path
     setenv LD_LIBRARY_PATH "$ld_library_path:$original_ld_library_path"
+    setenv LD_RUN_PATH "$ld_library_path:$original_ld_run_path"
     setenv SHLIB_PATH "$ld_library_path:$original_ld_library_path"
 
     verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
+    verbose "LD_RUN_PATH = $env(LD_RUN_PATH)"
 
     # Set the CLASSPATH environment variable
     verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$libgcj_jar"


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