rtld or lang/gcc cannot find libgcc_s.so.1
kostikbel at gmail.com
Tue Feb 21 22:19:28 UTC 2012
On Tue, Feb 21, 2012 at 10:28:50AM -0800, Steve Kargl wrote:
> Sorry about the cross post, but I can't tell if this
> a -current issue of a -ports issue. Unfortunately,
> I updated my freebsd 10.0 systems and the lang/gcc
> port during the same timeframe.
> I have compiled my math library and several programs
> with gfortran, which is installed by lang/gcc (pkg_info
> shows gcc-4.6.2_1). When I try running the program
> I get
> troutmask:kargl halfspace
> /lib/libgcc_s.so.1: version GCC_4.6.0 required by /home/kargl/bin/halfspace
> not foundtroutmask:kargl
> (Note, the annoying absense of a newline character after the error
> message, which is a completely different issue.)
> I see this problem on both freebsd-i386 and freebsd-amd64.
> troutmask:kargl ldd ~/bin/halfspace
> liblapack.so.4 => /usr/local/lib/liblapack.so.4 (0x2008c3000)
> libblas.so.2 => /usr/local/lib/libblas.so.2 (0x201463000)
> libgfortran.so.3 => /usr/local/lib/gcc46/libgfortran.so.3 (0x20175d000)
> libm.so.5 => /lib/libm.so.5 (0x201a70000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x201c95000)
> libquadmath.so.0 => /usr/local/lib/gcc46/libquadmath.so.0 (0x201ea2000)
> libc.so.7 => /lib/libc.so.7 (0x2020d6000)
> troutmask:kargl ldconfig -r | grep libgcc_s
> 29:-lgcc_s.1 => /lib/libgcc_s.so.1
> 723:-lgcc_s.1 => /usr/local/lib/gcc46/libgcc_s.so.1
> So, it appears that rtld is finding the wrong libgcc_s.so.1 or
> the lang/gcc port is no longer providing sufficient information
> for rtld to choose the correct library.
> I have reverted revisions 230784, 299768, and 229508 (and
> various combinitions of these revisions) from rtld-elf. The
> result does not change the above error.
> I can work around the problem by specifying -static during
> the building of my programs. Or, I can work around the
> problem by *explicitly* adding '-rpath /usr/local/lib' to the
> command line, which I have never had to do.
I highly suspect that you just happen to not need a symbol from the
newest namespace before.
The thing to look first is the library search path in the ld.so hints,
which is output at the second line of ldconfig -r. I think that you have
/lib before /usr/local/lib/gcc46 in your setup. This guess is confirmed
by the numeration of the two instances of gcc_s above. Either change
the config, or use -rpath. AFAIR, ldconfig -m adds the directory
at the end of the search list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120221/86272247/attachment.pgp
More information about the freebsd-ports