Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error due to libstdc++

I had written a simple "Hello World" C++ program on Fedora13 operating system, it run properly on fedora 13. But when I had tried to run same binary on Suse7.3 it gives error:

Inconsistency detected by ld.so: dynamic-link.h: 62: elf_get_dynamic_info: Assertion ! "bad dynamic tag"' failed!

After that I had compile same code on Suse7.3 and run a binary on Fedora13 then it gives error:

./a.out: symbol lookup error: ./a.out: undefined symbol: cout

This problem occurred due to libstdc++ library.

Fedora 13 have libstdc++.so.6.0.13 library.

Suse7.3 have libstdc++-3-libc6.2-2-2.10.0.so library.

How I would create a binary which works for both Suse7.3 & Fedora13?

like image 220
Pravin Avatar asked Dec 06 '25 23:12

Pravin


1 Answers

You're very unlikely to be able to build a binary that will run on both.

If you've got no choice but to try, you'll need to track down the packages for the older libraries and install them on your Fedora system. I wouldn't even think about going the other way.

You're in for a lot of downloading and package installing so reserve several hours for this task and the regular frustration you're going to experience.

You'd be much better off compiling a version of the executable on each system

like image 152
MichaelH Avatar answered Dec 08 '25 13:12

MichaelH