LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   /usr/bin/ld: cannot find -lstdc++ (https://www.linuxquestions.org/questions/linux-general-1/usr-bin-ld-cannot-find-lstdc-894287/)

mahmoodn 07-28-2011 08:05 AM

/usr/bin/ld: cannot find -lstdc++
 
When I make a program from source, I get this error:

Code:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make[3]: *** [isa_gen] Error 1
make[3]: Leaving directory `/root/temp-build/osprey/targdir/targ_info'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/root/temp-build/osprey/targdir/targ_info'
make[1]: *** [targ_info] Error 2
make[1]: Leaving directory `/root/temp-build'
make: *** [build] Error 2

I don't know why it complain about libstdc++ because I have installed it
Code:

root@srv:~/temp-build# dpkg -l | grep -r -i "libstdc"
ii  libstdc++6                          4.4.3-4ubuntu5                        The GNU Standard C++ Library v3
ii  libstdc++6-4.1-dev                  4.1.2-27ubuntu1                      The GNU Standard C++ Library v3 (development
ii  libstdc++6-4.4-dbg                  4.4.3-4ubuntu5                        The GNU Standard C++ Library v3 (debugging f
ii  libstdc++6-4.4-dev                  4.4.3-4ubuntu5                        The GNU Standard C++ Library v3 (development
ii  libstdc++6-dev                      3.4.6-1ubuntu2                        The GNU Standard C++ Library v3 (development


colucix 07-28-2011 08:13 AM

Maybe it's looking for libstdc++5. Many systems provide the older libstc++ for compatibility. For examples Red Hat provides the package compat-libstdc++-33. Ubuntu provides libstdc++5 and ia32-libs.

mahmoodn 07-28-2011 08:17 AM

How can I find which version is required?

knudfl 07-28-2011 08:53 AM

Still using Ubuntu ? Which version ?

Is this about osprey → Open64 ?
http://svn.open64.net/listing.php?re...sprey%2F&rev=0
http://www.open64.net/home.html
http://www.open64.net/download/open64-4x-releases.html

mahmoodn 07-29-2011 12:41 AM

Yes that is possible. I downloaded from AMD site.

knudfl 08-08-2011 04:25 AM

By default, on x86_64 machines, the osprey compiler will be built in
32bit mode and libraries will be built in 32 and 64 bit modes to support
compilation in either mode. See "HOWTO-INSTALL-* and other documentation.

A 32bit libstdc++ library is required ( to create some objects.)
Ubuntu 10.04, amd64 : sudo apt-get install g++-4.4-multilib


The binary osprey 'open64-4.2.4-0.x86_64.rpm' works perfect on Ubuntu 10.*
https://sourceforge.net/projects/ope...4.rpm/download
sudo rpm -Uvh --nodeps open64-4.2.4-0.x86_64.rpm

..

hackertecuci 08-08-2011 04:32 AM

Can everyone give me a linux root ?


All times are GMT -5. The time now is 08:37 AM.