LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-29-2004, 04:12 AM   #1
gkiagia
Member
 
Registered: Oct 2003
Location: Greece
Distribution: Debian sid
Posts: 248

Rep: Reputation: 30
Problem compiling gcc


I am trying to compile gcc 3.4 and I get this error message:

./genmodes: error in loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
make[2]: *** [s-modes] Error 127
make[2]: Leaving directory `/home/gcc-build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/home/gcc-build/gcc'
make: *** [bootstrap] Error 2

The library libgcc_s.so.1 is in the directory /home/gcc-build/gcc.
Why it says "No such file or directory" ?
 
Old 05-29-2004, 05:07 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Probably because the directory where libgcc_s.so.1 sits, is not known by the dynamic linker as a place to search for .so files.

Try to fix this by entering:

export LD_LIBRARY_PATH=/home/gcc-build/gcc

before compiling. See also:
man 1 ldd
man 8 ld.so
man 8 ldconfig
 
Old 05-29-2004, 09:58 AM   #3
gkiagia
Member
 
Registered: Oct 2003
Location: Greece
Distribution: Debian sid
Posts: 248

Original Poster
Rep: Reputation: 30
Thanks. It works.
 
Old 05-29-2004, 12:25 PM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
I wonder though, if it will still work after installing...
 
Old 05-31-2004, 04:18 AM   #5
gkiagia
Member
 
Registered: Oct 2003
Location: Greece
Distribution: Debian sid
Posts: 248

Original Poster
Rep: Reputation: 30
You are right. It doesn't work.
gcc -v command gives this output:
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/specs
gcc version 2.95.3 19991030 (prerelease)

I tried to uninstall the old gcc using kpackage and ran again gcc -v. I got this:
Can't exec "/usr/bin/gcc-2.95.2": No such file or directory at /usr/lib/perl5/5.6.0/IPC/Open3.pm line 217
open3: exec of /usr/bin/gcc-2.95.2 -v failed at /usr/bin/gcc line 211

What do I have to do?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with gcc compiling courier-authlib? Please help! strimp099 Linux - Software 3 07-20-2005 08:03 PM
Problem compiling code in g++ works for gcc juan_de_margo Programming 3 02-24-2005 04:41 AM
gcc compiling problem chiahsin Linux - Software 2 12-02-2004 07:33 PM
GCC compiling problem C, SuSE 9.1 Bill Chandler Linux - Software 3 11-24-2004 02:30 AM
GCC compiling problem webwolf70 Linux From Scratch 3 09-25-2004 09:51 PM


All times are GMT -5. The time now is 04:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration