Fedora Linux Support Community & Resources Center
  #1  
Old 20th June 2012, 05:58 PM
trotel Offline
Registered User
 
Join Date: Jan 2012
Location: Lima, Perú
Posts: 21
linuxchrome
[SOLVED] make: cannot find -lstdc++

Hi, I'm trying to install a program but when I type make, it show me:

Code:
g++ -Wall -Wno-sign-compare -ansi -pedantic -O2 -static -o augustus augustus.cc genbank.o properties.o pp_profile.o pp_hitseq.o pp_scoring.o statemodel.o namgene.o types.o gene.o evaluation.o motif.o geneticcode.o hints.o extrinsicinfo.o projectio.o intronmodel.o exonmodel.o igenicmodel.o utrmodel.o merkmal.o vitmatrix.o lldouble.o dummy.o -I../include -I. 
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make: *** [augustus] Error 1
I don't understand nothing about it, I search about -lstdc++ in fedora but I didn't find it.

What thing I have to install?

Note: I use Fedora 17 64-bit

Last edited by trotel; 21st June 2012 at 04:55 PM. Reason: [SOLVED]
Reply With Quote
  #2  
Old 20th June 2012, 06:24 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 1,718
linuxfirefox
Re: make: cannot find -lstdc++

Try

Code:
yum install libstdc++
or install the Software Development group.
Reply With Quote
  #3  
Old 20th June 2012, 06:31 PM
marko's Avatar
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449
linuxfirefox
Re: make: cannot find -lstdc++

The trick used to find out the package with that file is (even if not installed ) :
Quote:
yum provides \*/libstdc++.so
There might be more than one, in this case: gcc-c++, libstdc++devel, and compat-gcc-34

but it's up to you to decide which is the right one (the compat-gcc is for compatibility with the old 3.4 compiler)

Last edited by marko; 20th June 2012 at 06:33 PM.
Reply With Quote
  #4  
Old 20th June 2012, 11:34 PM
trotel Offline
Registered User
 
Join Date: Jan 2012
Location: Lima, Perú
Posts: 21
linuxchrome
Re: make: cannot find -lstdc++

Quote:
Originally Posted by marko View Post
The trick used to find out the package with that file is (even if not installed ) :


There might be more than one, in this case: gcc-c++, libstdc++devel, and compat-gcc-34

but it's up to you to decide which is the right one (the compat-gcc is for compatibility with the old 3.4 compiler)
Well I check and I have installed all this, gcc-c++, libstdc++-devel, compat-gcc-34 and libstdc++
what is wrong?
Reply With Quote
  #5  
Old 21st June 2012, 12:22 AM
marko's Avatar
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449
linuxfirefox
Re: make: cannot find -lstdc++

Quote:
Originally Posted by trotel View Post
Well I check and I have installed all this, gcc-c++, libstdc++-devel, compat-gcc-34 and libstdc++
what is wrong?
You might have the package installed but the wrong architecture, there's a i686 and a x86_64 package for each. What arch of Fedora do you have installed?
Reply With Quote
  #6  
Old 21st June 2012, 04:53 PM
trotel Offline
Registered User
 
Join Date: Jan 2012
Location: Lima, Perú
Posts: 21
linuxchrome
Re: make: cannot find -lstdc++

Quote:
Originally Posted by marko View Post
You might have the package installed but the wrong architecture, there's a i686 and a x86_64 package for each. What arch of Fedora do you have installed?
Thanks, the problem, was solved.

Before
Code:
$ rpm -q gcc-c++ libstdc++ libstdc++-devel compat-gcc-34
gcc-c++-4.7.0-5.fc17.x86_64
libstdc++-4.7.0-5.fc17.x86_64
libstdc++-4.7.0-5.fc17.i686
libstdc++-devel-4.7.0-5.fc17.x86_64
libstdc++-devel-4.7.0-5.fc17.i686
compat-gcc-34-3.4.6-24.fc17.x86_64
Code:
yum -y remove libstdc++-4.7.0-5.fc17.i686
yum -y remove libstdc++-devel-4.7.0-5.fc17.i686
After
Code:
$ rpm -q gcc-c++ libstdc++ libstdc++-devel compat-gcc-34
gcc-c++-4.7.0-5.fc17.x86_64
libstdc++-4.7.0-5.fc17.x86_64
libstdc++-devel-4.7.0-5.fc17.x86_64
compat-gcc-34-3.4.6-24.fc17.x86_64
Thank you very much.
Reply With Quote
  #7  
Old 21st June 2012, 05:40 PM
marko's Avatar
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449
linuxfirefox
Re: make: cannot find -lstdc++

I don't see how that worked, having both the 32bit and 64 bit package should have worked fine. What I thought was causing the problem was that you had the 64bit fedora installed but gcc was somehow trying to build a 32bit application but you only had the 64bit libstdc++ package installed. Having both packages should be okay. At worst if you have both packages and somehow gcc was linking to the wrong one, the error should have been "wrong architecture" as gcc would be trying to build a 64bit exe but linking to a 32bit stdc++ library.

Last edited by marko; 21st June 2012 at 05:49 PM.
Reply With Quote
  #8  
Old 21st June 2012, 07:29 PM
mschwendt's Avatar
mschwendt Offline
Registered User
 
Join Date: Jun 2010
Posts: 246
linuxfirefox
Re: make: cannot find -lstdc++

Quote:
Originally Posted by marko View Post
The trick used to find out the package with that file is (even if not installed ) :
Well, the user would first need to know that "-lstdc++" is related to "libstdc++". Then a simple search like yum search libstdc++ would be fruitful.

Quote:
There might be more than one, in this case: gcc-c++, libstdc++devel, and compat-gcc-34

but it's up to you to decide which is the right one (the compat-gcc is for compatibility with the old 3.4 compiler)
It's the old C compiler, not the C++ compiler. That would have been in compat-gcc-c++-34. But only people who really know they need old compat- packages should install them. It's very unlikely this particular user needs compat-gcc-34, so I recommend removing it. Same for other compat-* packages. Especially since typically (with exceptions) they contain only files for run-time, no files for build-time.
Reply With Quote
  #9  
Old 21st June 2012, 10:23 PM
marko's Avatar
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449
linuxfirefox
Re: make: cannot find -lstdc++

Quote:
Originally Posted by mschwendt View Post
Well, the user would first need to know that "-lstdc++" is related to "libstdc++". Then a simple search like yum search libstdc++ would be fruitful.
But the problem with 'yum search' is that it doesn't search into the filenames, while 'yum provides' will.
"yum search libstdc++" worked only because that was also the package name (which sometimes won't be true)

yum provides \*/<filename>

always works for finding files in packages.

Sure some developers don't know that -lname should map to file libname.so or libname.a but it should be pretty commonly known.
Reply With Quote
  #10  
Old 23rd June 2012, 01:01 PM
mschwendt's Avatar
mschwendt Offline
Registered User
 
Join Date: Jun 2010
Posts: 246
linuxfirefox
Re: make: cannot find -lstdc++

Of course. And the results of a query such as

repoquery --whatprovides \*libstdc++.so

would be even more concise and readable.
I'm more interested in the OP writing
Quote:
I search about -lstdc++ in fedora but I didn't find it.
which is a fundamental problem, since obviously the -l option has not been recognized as such, and the OP could not recognize libstdc++.so either. And I think even a very basic search like yum search stdc++ should have been tried, at least, and only if such a simple search doesn't find anything helpful, more specific help would have been necessary.
Reply With Quote
  #11  
Old 24th June 2012, 09:38 AM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 1,718
linuxfirefox
Re: make: cannot find -lstdc++

And if everything else fails try to read the manual page which explains the -l linker option ;-)

Code:
       -llibrary
       -l library
           Search the library named library when linking.  (The second
           alternative with the library as a separate argument is only for
           POSIX compliance and is not recommended.)
Reply With Quote
Reply

Tags
lstdc, make

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
make menuconfig doesn't find ncurses headers inp3dance Using Fedora 3 18th January 2011 03:55 PM
make menuconfig doesn't find ncurses headers inp3dance Fedora Spins & Remixes 0 18th January 2011 01:09 AM
Can't find kernel build files (re: make install) Milkrunner Using Fedora 5 29th August 2007 02:54 PM
trying to find the DB file for make xconfig marko Using Fedora 1 15th April 2006 04:08 AM
make xconfig error; cannot find -lqt maahmad66 Using Fedora 3 20th April 2005 08:56 PM


Current GMT-time: 21:45 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat