I am using ubuntu 14.04 64 bit OS
when i am running my verilog code in synopsys vcs it shows me the following error, i think there might some missing packages in ubuntu, i search through but i didn't get nothing related to this
/usr/bin/ld: cannot find -lstdc++ so i have decided to post ths issue in this portal. Kindly help to rectify the issues
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
Related
I'm trying to compile an application for both 64bit and 32bit systems. During compilation I am receving an error for the 32bit application:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
I've read around and found that I need gcc-multilib so I tried to install it:
me#ubuntu:~/bin/c/find-files$ sudo apt-get install gcc-multilib
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-multilib is already the newest version (4:5.3.1-1ubuntu1).
The following packages were automatically installed and are no longer required:
linux-headers-4.8.0-41 linux-headers-4.8.0-41-generic
linux-image-4.8.0-36-generic linux-image-4.8.0-41-generic
linux-image-extra-4.8.0-36-generic linux-image-extra-4.8.0-41-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It's already installed. So I look a little more and found that I should be exporting to the lib32 directory:
me#ubuntu:~/bin/c/find-files$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib32:/usr/lib32:/usr/lib/i386-linux-gnu
Tried to compile again, same error. Then I though maybe if I used g++ and installed it's multilib:
me#ubuntu:~/bin/c/find-files$ sudo apt-get install g++-multilib
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-multilib is already the newest version (4:5.3.1-1ubuntu1).
The following packages were automatically installed and are no longer required:
linux-headers-4.8.0-41 linux-headers-4.8.0-41-generic
linux-image-4.8.0-36-generic linux-image-4.8.0-41-generic
linux-image-extra-4.8.0-36-generic linux-image-extra-4.8.0-41-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
How can I cross compile an application for both 32bit and 64bit operating systems?
I am facing a issue when i run the following command while installing caffe on fedora 21
make all
Output:
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: skipping incompatible /usr/lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /usr/lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /usr/lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: cannot find -lleveldb
/usr/bin/ld: cannot find -lsnappy
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
collect2: error: ld returned 1 exit status
Makefile:544: recipe for target '.build_release/lib/libcaffe.so' failed
make: *** [.build_release/lib/libcaffe.so] Error 1
[root#parags-pc caffe]#
Some help please!
I still can't get rid of the last two (-lcblas and -latlas) errors. I have installed atlas and OpenBLAS long ago. Also I tried the following commands but with no success
echo "/usr/lib64/atlas" >/etc/ld.so.conf.d/atlas-x86_64.conf
ldconfig -v
Need some inputs!!
The leveldb present in your system seems to be of a different architecture, most probably a 32bit compiled leveldb and 64bit compiled caffe, or vice-versa.
The rest of the libraries are to be installed in Fedora before compiling Caffe.
I'm attempting to assemble some 32-bit code using NASM and GCC on a 64-bit system. I use the following two commands
nasm -f elf32 -g -F stabs coc.asm
gcc -m32 -o coc coc.o
NASM appears to do fine, but LD complains:
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status
I'm running Ubuntu 11.10, and I checked and I'm pretty sure libc is installed.
You are not assembling, but linking an executable, which needs OS startup files.
It seems you don't have gcc-*-multilib installed, which contains the necessary files: http://packages.ubuntu.com/oneiric/amd64/gcc-4.6-multilib/filelist
You need to install gcc-multilib to get the proper 32-Bit lib
I had a very similar problem on ubuntu 11.10. See my question on SO about this. What helped for me, was linking the crt*.o to /lib/. After that I never had other problems with this issue. A bit more of a cludge, but for me it solved the problems.
After hours of googling, I decide to give up and ask you experts. I am trying to build a 32-bit application (xgap if anyone interested) in my 64 Ubuntu 11.10. I added the CFLAGS=-m32 and the LDFLAGS=-L/usr/lib32 in the makefile. The objects are built into 32 bit fine. The last step is to link all the objects and libraries for X windows into this executable---xgap. Somehow it keeps giving me this error:
gcc -o xgap xcmds.o utils.o gapgraph.o gaptext.o pty.o popdial.o xgap.o selfile.o -L/usr/lib32 -lXaw -lXmu -lXt -lXext -lX11 -lSM -lICE
/usr/bin/ld: skipping incompatible /usr/lib32/libXmu.so when searching for -lXmu
...
/usr/bin/ld: i386 architecture of input file `xcmds.o' is incompatible with i386:x86-64 output
...
I have installed ia32-libs and mutilib support. I think I just need to force the linker to generate a i386 output. I tried to put two ld flags in my gcc command as shown above: -melf_i386 and -oformat elf32-i386. But what happens is that gcc doesn't search for the 32 bit library in /usr/lib32 anymore. I wonder if I need to put those flags in some fixed order?
Thanks for any idea and help!
EDIT: when I add the -m32 flag in my last gcc command (the linking stage I believe), even if I have the -L/usr/lib32 flag in place, gcc doesn't search in /usr/lib32 anymore ( really weird...) and generates the following error:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../libXaw.so when searching for -lXaw
/usr/bin/ld: skipping incompatible /usr/lib/libXaw.so when searching for -lXaw
/usr/bin/ld: cannot find -lXaw
collect2: ld returned 1 exit status
Any one has any idea why this happens? I am using the auto tool to configure and make. I am really good at modifying those script files.
You need to use link with -m32 as well.
gcc -m32 -o xgap xcmds.o utils.o gapgraph.o gaptext.o pty.o popdial.o xgap.o selfile.o -L/usr/lib32 -lXaw -lXmu -lXt -lXext -lX11 -lSM -lICE
All things considered, I think you should be able to drop the -L/usr/lib32 when using -m32.
I solved the problem. I think that gcc was expecting a static library archive. I used the getlibs script from http://ubuntuforums.org/showthread.php?t=474790 to download all the .a archives needed for linking. Then gcc worked. I think gcc did search in /usr/lib32 directory but didn't find the .a archives so went on to search in the standard directory which is /usr/lib, where it finds the incompatible *.so files.
But then the question is: the *.so files in /usr/lib32/ from package ia32-libs doesn't really have the libraries needed for linking? What are those files in /usr/lib32/ used for?
I tried building gcc-4.5.2 from sources on a Debian 64-bit machine.
I ended up having just a 64-bit version of the compiler but no 32-bit.
When I try to build 32-bit applications, I see the following linker error.
When I tried ‘-m32′ options, I’m getting this message:
/usr/bin/ld: skipping incompatible /usr/local/gcc452/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
What should I do to build gcc properly.
You also need a 32bit version of "ld" (the linker). ld is found in the binutils package.