 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

20th June 2012, 05:58 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Location: Lima, Perú
Posts: 21

|
|
|
[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]
|

20th June 2012, 06:24 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
Re: make: cannot find -lstdc++
Try
Code:
yum install libstdc++
or install the Software Development group.
|

20th June 2012, 06:31 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
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.
|

20th June 2012, 11:34 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Location: Lima, Perú
Posts: 21

|
|
|
Re: make: cannot find -lstdc++
Quote:
Originally Posted by marko
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?
|

21st June 2012, 12:22 AM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: make: cannot find -lstdc++
Quote:
Originally Posted by trotel
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?
|

21st June 2012, 04:53 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Location: Lima, Perú
Posts: 21

|
|
|
Re: make: cannot find -lstdc++
Quote:
Originally Posted by marko
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.
|

21st June 2012, 05:40 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
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.
|

21st June 2012, 07:29 PM
|
 |
Registered User
|
|
Join Date: Jun 2010
Posts: 246

|
|
|
Re: make: cannot find -lstdc++
Quote:
Originally Posted by marko
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.
|

21st June 2012, 10:23 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: make: cannot find -lstdc++
Quote:
Originally Posted by mschwendt
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.
|

23rd June 2012, 01:01 PM
|
 |
Registered User
|
|
Join Date: Jun 2010
Posts: 246

|
|
|
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.
|

24th June 2012, 09:38 AM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
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.)
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 21:45 (Thursday, 23-05-2013)
|
|
 |
 |
 |
 |
|
|