0

Mixed C++/Free Pascal program, Linux. I used to build it on a 32-bit Debian box and run it on a 64-bit CentOS 5.3 server box, and it worked fine. Now I've upgraded my Debian box to 6.0.3 (Squeeze). After the next rebuild, the program does not run on the server host anymore, instead prints the following:

myapp: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by myapp)
myapp: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by myapp)

Now, when I run ls -l /usr/lib/libstdc++*, I notice that on the dev box libstdc++.so.6 is a symlink to libstdc++.so.6.0.13, while on the host it's a symlink to libstdc++.so.6.0.8. That could be the culprit.

Can you suggest a troubleshooting strategy, please? Should I somehow put an earlier version of libstdc++ on the dev box and try to link against it, or try to upgrade the prod box?

nguthrie
  • 2,615
  • 6
  • 26
  • 43
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • 1
    Why not just rebuild it on the new machine? – wallyk May 20 '12 at 03:10
  • Can't put the compiler on a public web host. – Seva Alekseyev May 20 '12 at 12:41
  • While it is possible to load all the libraries and craft a build which uses the proper version, the easiest course will be to create a development machine of the same flavor (distribution and 32/64 bit) and version as the production machine. It could be a virtual machine on the existing build machine if you are short of hardware. – wallyk May 20 '12 at 16:02

1 Answers1

0

Can you suggest a troubleshooting strategy, please

No troubleshooting needed. You just need to read this answer.

Should I somehow put an earlier version of libstdc++ on the dev box and try to link against it,

That wouldn't work. Your new GCC will emit the symbols that are defined in libstdc++.so.6.0.13, and your link against libstdc++.so.6.0.8 will fail.

or try to upgrade the prod box?

If you can, that might be the easiest option.

Community
  • 1
  • 1
Employed Russian
  • 199,314
  • 34
  • 295
  • 362