LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2021, 11:00 PM   #1
gksrb500
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Rep: Reputation: Disabled
gcc compile error


I'm a linux newbie user and I'm trying to compile a source code (not made by me) with g77

g77 -c -O3 reac.f
g77 -c -O3 poten.f
g77 -c -O3 ffopt.f
g77 -c -O3 shanno.f
g77 -c -O3 version.f
g77 -c -O3 vibra.f
g77 -c -O3 blas.f
g77 -o reac reac.o poten.o ffopt.o shanno.o version.o vibra.o blas.o
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
makefile:11: recipe for target 'reac' failed
make: *** [reac] Error 1

This is the error I want to solve. I've already googled a lot, and done what they say.

But it didn't work.

input: gcc -v
output : gcc version 3.4.6 (Ubuntu 3.4.6-6ubuntu5)

input : -L/usr/lib/gcc/x86_64-linux-gnu/3.4.6/ -lgcc_s
output : -bash: -L/usr/lib/gcc/x86_64-linux-gnu/3.4.6/: No such file or directory

input : find /usr/ -name libgcc*
output : /usr/lib/gcc/x86_64-linux-gnu/3.4.6/32/libgcc.a
/usr/lib/gcc/x86_64-linux-gnu/3.4.6/32/libgcc_eh.a
/usr/lib/gcc/x86_64-linux-gnu/3.4.6/32/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/3.4.6/32/libgcc_s_32.so
/usr/lib/gcc/x86_64-linux-gnu/3.4.6/libgcc.a
/usr/lib/gcc/x86_64-linux-gnu/3.4.6/libgcc_eh.a
/usr/lib/gcc/x86_64-linux-gnu/3.4.6/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/3.4.6/libgcc_s_32.so
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_eh.a
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc.a
/usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc_eh.a
/usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc_s.so.1
/usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a
/usr/lib/gcc/x86_64-linux-gnu/7/libgcc_eh.a
/usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1
/usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s_32.so
/usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s_x32.so
/usr/lib/gcc/x86_64-linux-gnu/7/x32/libgcc.a
/usr/lib/gcc/x86_64-linux-gnu/7/x32/libgcc_eh.a
/usr/lib/gcc/x86_64-linux-gnu/7/x32/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/7/x32/libgcc_s.so.1
/usr/lib32/libgcc_s.so.1
/usr/libx32/libgcc_s.so.1
/usr/share/doc/libgcc-4.8-dev
/usr/share/doc/libgcc-7-dev
/usr/share/doc/libgcc1
/usr/share/lintian/overrides/libgcc1

How to solve this problem??

Thanks

Last edited by gksrb500; 04-07-2021 at 12:33 AM.
 
Old 04-07-2021, 01:53 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
this is not a command:
Code:
-L/usr/lib/gcc/x86_64-linux-gnu/3.4.6/ -lgcc_s
but part of the previous one. Probably that was split into two [or more] lines, but you need to execute it in one.
So try this:
Code:
g77 -o reac reac.o poten.o ffopt.o shanno.o version.o vibra.o blas.o -L/usr/lib/gcc/x86_64-linux-gnu/3.4.6/ -lgcc_s
If this does not help please give us more details about what's going on. Dropping in an error message is usually not enough to diagnose.
 
  


Reply

Tags
compile error, gcc



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
step 5.10 gcc/limitx.h gcc/glimits.h gcc/limity.h no such file or directory iambrj Linux From Scratch 7 08-07-2018 11:22 AM
LXer: GCC 4.9 vs. GCC 5.1 vs. GCC 6.0 SVN Compiler Benchmarks LXer Syndicated Linux News 0 06-08-2015 01:00 PM
[SOLVED] SEGMENTATION FAULT using gcc 4.4.4 -O2 , works with gcc 4.1.0 -O2 or gcc 4.4.4 -O1 amir1981 Programming 36 07-26-2010 06:07 PM
Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ? samrat_rao Linux - Software 5 03-03-2009 02:28 PM
How to compile GCC if you don't have GCC? khermans Linux - Software 13 05-12-2004 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:42 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