Mantis - gcc4g++rt
|
Viewing Issue Advanced Details |
|
ID:
|
Category:
|
Severity:
|
Reproducibility:
|
Date Submitted:
|
Last Update:
|
3694 |
regular use |
major |
always |
2009-05-29 10:20 |
2014-03-12 10:46 |
|
Reporter:
|
kamilradz |
Platform:
|
|
|
Assigned To:
|
dam |
OS:
|
|
|
Priority:
|
normal |
OS Version:
|
|
|
Status:
|
closed |
Product Version:
|
|
|
Product Build:
|
|
Resolution:
|
fixed |
|
Projection:
|
none |
|
|
|
ETA:
|
none |
Fixed in Version:
|
|
|
|
Summary:
|
0003694: libstdc++.so.6.0.10 doesn't see libgcc_s.so.1 |
Description:
|
/opt/csw/gcc4/lib/libstdc++.so.6.0.10 looks for libgcc_s.so.1 dependency in system runtime linking environment, instead of linking to /opt/csw/gcc4/lib/libgcc_s.so.1
|
Steps To Reproduce:
|
|
Additional Information:
|
# pkg-get -c | grep gcc
gcc4corert 4.3.3,REV=2009.05.07 SAME
gcc4g++rt 4.3.3,REV=2009.05.07 SAME
# file /opt/csw/gcc4/lib/libstdc++.so.6.0.10
/opt/csw/gcc4/lib/libstdc++.so.6.0.10: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped
# file /opt/csw/gcc4/lib/libgcc_s.so.1
/opt/csw/gcc4/lib/libgcc_s.so.1: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped
# ldd /opt/csw/gcc4/lib/libstdc++.so.6.0.10
libm.so.1 => /lib/libm.so.1
libgcc_s.so.1 => (file not found)
libm.so.2 => /lib/libm.so.2
libc.so.1 => /lib/libc.so.1
# crle
Default configuration file (/var/ld/ld.config) not found
Default Library Path (ELF): /lib:/usr/lib (system default)
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
|
Relationships | |
Attached Files:
|
|
|
Issue History |
Date Modified |
Username |
Field |
Change |
2009-05-29 10:20 |
kamilradz |
New Issue |
|
2009-05-29 11:57 |
dam |
Note Added: 0006222 |
|
2009-06-21 20:38 |
mwatters |
Status |
new => assigned |
2009-06-21 20:38 |
mwatters |
Assigned To |
=> mwatters |
2010-03-04 02:57 |
hson |
Note Added: 0007596 |
|
2014-03-12 10:45 |
dam |
Assigned To |
mwatters => dam |
2014-03-12 10:46 |
dam |
Note Added: 0010766 |
|
2014-03-12 10:46 |
dam |
Status |
assigned => closed |
2014-03-12 10:46 |
dam |
Resolution |
open => fixed |
Notes |
|
(0006222)
|
dam
|
2009-05-29 11:57
|
|
For the library to be self-sufficient the runtime linker path must be compiled into the shared lib. No RUNPATH there:
build8s% dump -Lv /opt/csw/gcc4/lib/libstdc++.so.6.0.10
/opt/csw/gcc4/lib/libstdc++.so.6.0.10:
**** DYNAMIC SECTION INFORMATION ****
.dynamic:
[INDEX] Tag Value
[1] NEEDED libm.so.1
[2] NEEDED libgcc_s.so.1
[3] INIT 0x5c0f0
[4] FINI 0x5c10c
[5] SONAME libstdc++.so.6
[6] HASH 0x94
[7] STRTAB 0x16fc0
[8] STRSZ 0x2a5f2
[9] SYMTAB 0x7b00
[10] SYMENT 0x10
[11] CHECKSUM 0x9ea4
[12] VERNEED 0x415b4
[13] VERNEEDNUM 0x2
[14] PLTSZ 0x2088
[15] PLTREL 0x7
[16] JMPREL 0x54398
[17] RELA 0x415f4
[18] RELASZ 0x14e2c
[19] RELAENT 0xc
[20] FEATURE_1 PARINIT
[21] FLAGS 0
[22] FLAGS_1 DISPRELDONE
[23] PLTGOT 0xedb04
However, as libstdc++.so.6.0.10 is always linked to a binary, that binary itself needs to have this runtime linker path also. So there is a slight flaw inside the shared lib which should be fixed some time, bit it shouldn't be visible when you compile something as '-R/opt/csw/gcc4/lib' is mandatory. |
|
|
(0007596)
|
hson
|
2010-03-04 02:57
|
|
Well, the problem isn't that small.
As seen below, a binary, correctly linked to libstdc++ with correct RUNPATH, can't find libgcc_s.so.1
ldd mono/mini/mono
/usr/lib/secure/s8_preload.so.1
libstdc++.so.6 => /opt/csw/gcc4/lib/libstdc++.so.6
libgthread-2.0.so.0 => /opt/csw/lib/sparcv8/libgthread-2.0.so.0
libthread.so.1 => /usr/lib/libthread.so.1
libglib-2.0.so.0 => /opt/csw/lib/sparcv8/libglib-2.0.so.0
libintl.so.8 => /opt/csw/lib/sparcv8/libintl.so.8
librt.so.1 => /usr/lib/librt.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libxnet.so.1 => /usr/lib/libxnet.so.1
libpthread.so.1 => /usr/lib/libpthread.so.1
libm.so.1 => /usr/lib/libm.so.1
libsunmath.so.1 => /opt/csw/lib/sparcv8/libsunmath.so.1
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => (file not found)
libiconv.so.2 => /opt/csw/lib/sparcv8/libiconv.so.2
libsec.so.1 => /usr/lib/libsec.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1
>dump -Lv mono/mini/mono
mono/mini/mono:
**** DYNAMIC SECTION INFORMATION ****
.dynamic:
[INDEX] Tag Value
[1] NEEDED libstdc++.so.6
[2] NEEDED libgthread-2.0.so.0
[3] NEEDED libthread.so.1
[4] NEEDED libglib-2.0.so.0
[5] NEEDED libintl.so.8
[6] NEEDED librt.so.1
[7] NEEDED libdl.so.1
[8] NEEDED libsocket.so.1
[9] NEEDED libnsl.so.1
[10] NEEDED libxnet.so.1
[11] NEEDED libpthread.so.1
[12] NEEDED libm.so.1
[13] NEEDED libsunmath.so.1
[14] NEEDED libc.so.1
[15] INIT 0x1e1058
[16] FINI 0x1e1074
[17] RUNPATH /opt/csw/gcc4/lib:/opt/csw/X11/lib/$ISALIST:/opt/csw/X11/lib:/opt/csw/lib/$ISALIST:/opt/csw/lib
[18] RPATH /opt/csw/gcc4/lib:/opt/csw/X11/lib/$ISALIST:/opt/csw/X11/lib:/opt/csw/lib/$ISALIST:/opt/csw/lib |
|
|
(0010766)
|
dam
|
2014-03-12 10:46
|
|
The library has been relocated and the issue is fixed in the current release:
unstable10x% ldd /opt/csw/lib/libstdc++.so.6.0.18
libm.so.2 => /lib/libm.so.2
libc.so.1 => /lib/libc.so.1
libgcc_s.so.1 => /opt/csw/lib/i386/libgcc_s.so.1
unstable10x% pkginfo -x CSWlibstdc++6
CSWlibstdc++6 libstdc++6 - The GNU Compiler Collection, libstdc++.so.6
(i386) 4.8.2,REV=2013.11.08 |
|