2

I have an application program "Cprog" that requires GCC 4.9 and C++11's libstdc++.so.

To fulfill this requirement on CentOS 6, I am using Red Hat's devtoolset-6.

This lib is located at:

$ scl enable devtoolset-6 bash
/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/libstdc++.so

Which I add to the LD_LIBRARY_PATH path variable as:

LD_LIBRARY_PATH=/opt/rh/devtoolset-6/root/usr/bin/gcc/x86_64-redhat-linux/6.3.1/:$LD_LIBRARY_PATH

At compilation time, the lib is not found:

/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./Cprog)
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found
...ect

Any help will be appreciated.

Guillaume Racicot
  • 39,621
  • 9
  • 77
  • 141
slkuser
  • 63
  • 1
  • 6

1 Answers1

0

I found the libstdc++.so in devtoolset is just a 'link', try to cat that file then can find that:

[root@localhost 10]# cat libstdc++.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
INPUT ( /usr/lib64/libstdc++.so.6 -lstdc++_nonshared )
vrqq
  • 448
  • 3
  • 8