[cfe-dev] -O2 requires GLIBCXX_3.4.9?
t.p.northover at gmail.com
Fri Sep 14 05:17:51 PDT 2012
> So why can't I run it on a system with an older version of glibc? This very
> confusing. Clearly, -O2 wants a newer version of glibc.
There's a good chance you will be able to run it if you make the
dynamic loader use the glibc you were linking against. In your case it
looks like that's in /opt/gcc-4.4.6_install/lib so this might work:
$ LD_LIBRARY_PATH=/opt/gcc-4.4.6_install/lib ./my_program
Other than that you'll have to convince clang to use the libraries and
headers in /usr during compilation. Some combination of --sysroot and
-gcc-toolchain options has a good chance of working, but I'm not sure
how to bake that knowledge into clang at build-time (it probably
depends on whether you're using CMake or autotools).
More information about the cfe-dev