Installing The Gnu Compiler

From Biowiki
Jump to: navigation, search

This gave me the following error message

/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libstdc++.so: undefined reference to `_Unwind_Resume_or_Rethrow@GCC_3.3'
  • Found this post and this followup
    • suggested removing old gcc libraries due to debian's crusty gcc
    • this didn't work for me so I went back and rebuilt gcc, this time using the following syntax

./configure --disable-threads

...actually, what I ended up typing was this:

./configure --disable-threads --disable-libgcj --enable-languages=c,c++

...because who really needs java anyway? :-p (See also Why Dart Is Not In Java)

---

This should probably be (e.g. if the gcc source distro is unzipped and untarred into /usr/local/src/gcc-3.4.3)

mkdir /usr/local/gcc-3.4.3
cd /usr/local/gcc-3.4.3
/usr/local/src/gcc-3.4.3/configure --prefix=/usr/gcc  --disable-threads --disable-libgcj --enable-languages=c,c++
make
make install

then e.g.

setenv PATH /usr/gcc/bin:$PATH

to ensure that the new gcc is found before any others (verify with gcc -v)

Hmmmm, even this is still giving the same Unwind_Resume_or_Rethrow error. Maybe need to rebuild libstdc++?

-- Ian Holmes - 18 Mar 2005

---

It appears to be sufficient to:
1) have a gcc-3.4.3 built version of libstdc++.so.6 in /usr/lib
(e.g., copy in the libstdc++.so.6.0.3 file built in making gcc, 
ln -s libstdc++.so.6.0.3 libstdc++.so.6)
2) have a gcc-3.4.3 built version of libgcc_s.so.1 in /lib 
(copy in libgcc_s.so.1.3.4.3 from the gcc build, 
ln -s libgcc_s.so.1.3.4.3 libgcc_s.so.1).

Note that neither /usr/lib nor /lib need be in your path for these changes
to work.

-- Pete Klosterman - 21 Mar 2005

---

This did indeed help. Instead of copying libstdc++.so.6 I was able to just set LD_LIBRARY_PATH as follows

setenv LD_LIBRARY_PATH /usr/gcc/lib

This may be sufficient for the libgcc_s.so.1 problem as well. Ian Holmes, March 22, 2005

---