This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with libstdc++

When i run my program, it fails with following error message:

  "error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory"

I copied libstdc++.so.6.0.9 which provided by CodeSourcery from /home/username/toolchain/arm-2007q3/arm-none-linux-gnueabi/lib/ to /home/username/workdir/filesys/opt/lib/,

and executed following commands:

%ln -s libstdc++.so.6.0.9 libstdc++.so.6

%ln -s libstdc++.so.6 libstdc++.so

Next, i inserted following line to /home/li/workdir/filesys/etc/ld.so.conf

/opt/lib

and copied ldconfig command which provided by CodeSourcery from /home/username/toolchain/arm-2007q3/arm-none-linux-gnueabi/libc/sbin/ to /home/username/workdir/filesys/sbin.

Last, when i run /sbin/ldconfig from OMAP35xEVM command line, i got following error message:

------------------------------------------------------------------

/sbin/ldconfig: /lib/libasound.so.2 is not a symbolic link                                                                                                               
                                                                                                                                                                         
/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied                                                                                   
------------------------------------------------------------------

How can i solve this problem?Could someone give me any advice?

  • This one is interesting, I am not sure how you could get a premission denied error on the EVM being that there is only the root user on the EVM which should have all permissions. Unfortunately I am not that familiar with ldconfig, but as an initial thought it may be worth running ldconfig with the -v option to see what else it is doing.

  • Hi,

     

    You can run ldconfig from your host (do not need the version for the target):

     

    sudo ldconfig -r /home/username/workdir/filesys/

     

    PS: remove the file /home/username/workdir/filesys/lib/libasound.so.2, so the link can be recreated by ldconfig.

     

    Regards,

     

    Diego Dompe

    RidgeRun Engineering