This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: libgij and libgcj link to different libgcc_s.so
- From: Andrew Haley <aph at redhat dot com>
- To: Hanno Meyer-Thurow <h dot mth at web dot de>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 25 Aug 2006 12:40:13 +0100
- Subject: Re: libgij and libgcj link to different libgcc_s.so
- References: <20060825133413.ddfc010d.h.mth@web.de>
Hanno Meyer-Thurow writes:
> Hi list,
> it looks like this:
>
> # ldd /opt/gcj-4.2.0_alpha20060819/lib/libgij.so.8.0.0
> libgcc_s.so.1 => /opt/gcj-4.2.0_alpha20060819/lib/libgcc_s.so.1 (0xb636a000)
>
> # ldd /opt/gcj-4.2.0_alpha20060819/lib/libgcj.so.8.0.0
> /opt/gcj-4.2.0_alpha20060819/lib/libgcj.so.8.0.0: /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /opt/gcj-4.2.0_alpha20060819/lib/libgcj.so.8.0.0)
> libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1 (0xb6376000)
>
>
> Shouldn't libgcj also link to the correct one?
Looks like libgij has an RPATH entry and libgcj doesn't:
zorro:~ $ readelf -d /usr/local/lib64/libgij.so
Dynamic section at offset 0x2028 contains 25 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libgcj.so.7rh]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libgij.so.7rh]
0x0000000000000010 (SYMBOLIC) 0x0
0x000000000000000f (RPATH) Library rpath: [/usr/local/lib/../lib64]
zorro:~ $ readelf -d /usr/local/lib64/libgcj.so
Dynamic section at offset 0x211e128 contains 26 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
0x000000000000000e (SONAME) Library soname: [libgcj.so.7rh]
In general, we don't have absolute RPATH entries for libraries because
it causes a ton of other problems, particularly as it makes it
impossible to move libraries around. If you're running gcj in a
nonstandard place, you'll just have to se LD_LIBRARY_PATH when you run
a program.
Andrew.