What's the best way to build software that doesn't require the newest glibc?

Posted by ZorbaTHut on Stack Overflow See other posts from Stack Overflow or by ZorbaTHut
Published on 2010-05-04T18:31:10Z Indexed on 2010/05/04 20:28 UTC
Read the original article Hit count: 197

I'm attempting to build a binary package that can be run on multiple Linux distributions. It's currently built on Ubuntu 10.04, but it fails on Ubuntu 8.04 with the following error:

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

What's the preferred way to solve this problem? Is there a way to install an old glibc on a new box and build against it, or do I have to build on an old distribution? And if I build against an old glibc, will it work on a new glibc?

Or, alternatively, are there just some handy compiler flags or packages I could install to solve the problem?

© Stack Overflow or respective owner

Related posts about glibc

Related posts about backwards-compatibility