Why does ld insist on /lib/libgcc_so.so1

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

 



I have installed GCC 3.3.2 in /usr/local/gcc-3.3.2 in order to not clobber
things in /lib and /usr/lib.  I even installed binutils, too.
Problem I'm running into now is that I can't shake dependence of
/lib/libgcc_s.so.1 .

I can compile a simple test c++ program, but it will not run, citing an
inability to locate a library, which is both old (why is it trying to find this
library?) and there (why can't it find it?).

I do not understand this.  I have searched around and found that others have run
into the same problem, but I have not found that they have found either an
explanation or a solution.  Therefore, I am committing to document whatever
explanation I find, and whatever solution I find, so that I may serve the
community that has so beautifully served me.  Please help me.  I am going quite
mad.  I will drive beer to you within a 100 mile radius of Austin, TX.  Cold
beer.

First, let us begin with the environment:  Here is g++
[ssuehs@ache openh323]$ g++ -v
Reading specs from
/usr/local/gcc-3.3.2/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --prefix /usr/local/gcc-3.3.2
Thread model: posix
gcc version 3.3.2

The path:
[ssuehs@ache openh323]$ echo $PATH
/usr/local/gcc-3.3.2/bin:/usr/java/j2sdk1.4.1_02/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

LD_LIBRARY_PATH is not set:
[ssuehs@ache openh323]$ printenv | grep LD_
[ssuehs@ache openh323]$

The program:
[ssuehs@ache openh323]$ cat > gooftest.cc
#include <stdio.h>
#include <stdlib.h>

int
main()
{

;
return 0;
}
[ssuehs@ache openh323]$ g++ gooftest.cc
[ssuehs@ache openh323]$ ./a.out
./a.out: /lib/libgcc_s.so.1: version `GCC_3.3' not found (required by
/usr/local/gcc-3.3.2/lib/libstdc++.so.5)


What does the ldd tool say about it?  Why, it confirms the problem
[ssuehs@ache openh323]$ ldd a.out
./a.out: /lib/libgcc_s.so.1: version `GCC_3.3' not found (required by
/usr/local/gcc-3.3.2/lib/libstdc++.so.5)
	libstdc++.so.5 => /usr/local/gcc-3.3.2/lib/libstdc++.so.5 (0x40034000)
	libm.so.6 => /lib/i686/libm.so.6 (0x400ef000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40112000)
	libc.so.6 => /lib/i686/libc.so.6 (0x4011a000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[ssuehs@ache openh323]$ which as
/usr/local/bin/as
[ssuehs@ache openh323]$ which ld
/usr/local/bin/ld
[ssuehs@ache openh323]$ which ldd
/usr/bin/ldd
[ssuehs@ache openh323]$ ls -lh /usr/local/bin/ld
lrwxrwxrwx    1 root     root           23 Dec  3 12:56 /usr/local/bin/ld ->
../binutils-2.14/bin/ld
[ssuehs@ache openh323]$

[ssuehs@ache openh323]$



I have added /usr/local/gcc-3.3.2/lib to /etc/ld.so.conf as follows
/usr/local/gcc-3.3.2/lib
/usr/local/binutils-2.14/lib
/usr/local/lib
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/sane
/usr/lib/qt-1.45/lib
/usr/lib/wine
/usr/lib/mysql

I tried adding them to the bottom, too.
Each time, I did run ldconfig as root


At work we are required to stay at RedHat 7.2 .
Some woes regarding Oracle 8.1.7, and our software and kernel versions, and more
grief.
[ssuehs@ache openh323]$ cat /etc/redhat-release
Red Hat Linux release 7.2 (Enigma)

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux