LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-18-2011, 09:22 AM   #1
beihaghian
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Rep: Reputation: Disabled
/usr/bin/ld: cannot find -lgcc_s


Hello
I want to make daophot fortran codes, so i type make.But after making some codes this error apears:
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make: *** [daophot] Error 1
By the way i added libraries to /etc/apt/sources.list and i have ubunto11.04 and i installed f77.
please help me
thank you
 
Old 12-18-2011, 09:58 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
lgcc_s = libgcc_s.so

The old g77 package from Ubuntu 8.04 Hardy assumes /lib/libgcc_s.so.1

Ubuntu 11.** uses a hideaway location, like :
/lib/i386-linux-gnu/libgcc_s.so.1
http://packages.ubuntu.com/natty/i386/libgcc1/filelist
http://packages.ubuntu.com/natty/libgcc1

The libgcc_s.so link is inside your gcc-3.4 :
/usr/lib/gcc/i486-linux-gnu/3.4.6/libgcc_s.so
http://packages.ubuntu.com/hardy-upd...c-3.4/filelist


Solution : Some applications will accept a link :
cd /lib/ && sudo ln -s i386-linux-gnu/libgcc_s.so.1

Or : If it must be Ubuntu, use a version,
more suitable for development : Ubuntu 10.04 .

Several special applications can only be compiled in 11.04
by using specially built compilers.
Ubuntu 11.10 is even worse. No extra compilers seem to work.

..

Last edited by knudfl; 12-18-2011 at 10:01 AM.
 
Old 12-18-2011, 11:27 AM   #3
beihaghian
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
thanks for your help.
I do your solution but still this error exists.
is there another solution???
my laptop is hp probook and it can not install ubuntu10.10 or 9.10 or ... .It just can install ubuntu11.04.
please take me your help.

thanks a lot
 
Old 12-18-2011, 11:46 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
OK, I did create a gcc34-compat, g++34-compat for Ubuntu 11.04,
32bits, some months ago. But with no g77 / f77.
gcc34 https://docs.google.com/open?id=0B7S...gxNGI0MTQ4YTY4
g++34 https://docs.google.com/open?id=0B7S...RkMWIxMzIyNDEz


I will try, if it is possible to include g77 in a new build.
Is your OS 32bits or 64bits ?
( The command 'uname -m' will tell.)

..

Last edited by knudfl; 12-18-2011 at 11:50 AM.
 
Old 12-18-2011, 01:14 PM   #5
beihaghian
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
it's 32bit
my version of gcc is 4.5.2 and it's upper than your version.
How i can change gcc version?

thank you
 
Old 12-18-2011, 05:13 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
You can have as many versions of gcc / g++ as you want,
installed at the same time.

The default Ubuntu 11.04 compilers are gcc-4.4, g++-4.4,
gcc-4.5, g++-4.5, gfortran-4.4, gfortran-4.5 .

When g77 was installed, gcc-3.4 was also installed, as dependency.
Binary name = gcc-3.4 . The gcc34-compat : gcc34 ( g++34 ).
I.e. all default and extra compilers have unique binary names :
The commands 'ls /usr/bin/gcc*' and 'ls /usr/bin/g++*' will show.

Using, example :
export CC=gcc-4.4 CXX=g++-4.4 F=gfortran-4.4 && <other-command>

..
 
Old 08-09-2013, 01:13 PM   #7
jaybrau
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Rep: Reputation: Disabled
I was getting this same error, "/usr/bin/ld: cannot find -lgcc_s" trying to run configure on an emacs 24.3 bundle on an Amazon Linux box with gcc 4.7.2. knudfl's first response was my best clue as to what the problem was, but I had to dig to find the specifics.

I isolated the problem by creating the simple test file that was failing during configure, conftest.c, and ran:
strace -f gcc conftest.c > strace.dump 2>&1
so I could see what /usr/bin/ld was looking for and where. Ultimately the solution was:
cd /lib64
sudo ln -s libgcc_s-4.7.2-20120921.so.1 libgcc_s.so.1
sudo ln -s libgcc_s-4.7.2-20120921.so.1 libgcc_s.so
 
  


Reply



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
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 02:59 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 12:08 AM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM
Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? DigaMe Linux - Security 2 11-12-2004 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:34 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration