05-04-2013 04:04 AM
I am trying to run the c++ code on xilinx-linux using zed board.i installed ARM cross compilers in linux( centOS )
compiler is arm-xilinx-linux-gnueabi-g++.
while i am poting on zed board it displays error like
while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
05-04-2013 10:48 AM - edited 05-04-2013 10:48 AM
Your application cannot find a required shared library.
Either statically link your application by adding '-static' to the link commandline or you have to copy the shared libraries to your target file system to /lib/.
05-06-2013 09:30 AM - edited 05-06-2013 09:31 AM
It works for me.
Make sure you copy the actual library to the target. libstdc++.so.6 is just a symlink to the shared library object.
lrwxrwxrwx 1 root root 21 Jan 1 00:05 libstdc++.so -> ./libstdc++.so.6.0.16 lrwxrwxrwx 1 root root 21 Jan 1 00:05 libstdc++.so.6 -> ./libstdc++.so.6.0.16 -rwx------ 1 root root 1293109 Jan 1 00:04 libstdc++.so.6.0.16
05-07-2013 12:41 AM
I installed libstdc++.so.6 by giving command like <yum whatprovides libstdc++.so.6>.so in /usr/lib/libstdc++.so.6 and libstdc++.so.6.0.13 are there.
I tried to run simple Cpp program on xilinx-linix of zed board using ARM cross compilers(arm-xilinx-linux-gnueabi-g++ simple.cpp -o A.out)
I generated A.out file on linux using cross compilers.now i am trying to run on Zed board.
while i am porting it displays error like
05-07-2013 09:04 AM
Well, on an ARM platform, you need the shared lib compiled for ARM. Your host's libraries won't do any good on a Zynq platform (unless your host is ARM-based of course). The libraries are included with the x-compiler. Search its installation directory.
05-16-2013 02:23 PM
I had the same problem (missing libstdc++). I had built my application using the ARM cross compiler toolchain in the CodeSourcery tools under CentOS. The solution for me was to copy the libstdc++.so.6 file from the toolchain folder onto the ZedBoard into folder /usr/lib on the ZedBoard.
I found the missing library file in this path of the CodeSourcery toolchain:
I also created a soft link to that file as libstdc++.so.0 in the /usr/lib folder.
My Zedboard currently boots a prebuilt ramdisk image so it wipes the slate clean each power up. In other words, until I build my own ramdisk image, I need to copy the missing library file into /usr/lib as part of startup.