Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Accessing newest C++11 features on older Linux systems?

christian_convey
Beginner
223 Views

ICC 13 on Linux uses the available version of GCC to supply libstdc and libstdc++.

On CentOS/RHEL 6.4, the GCC version is 4.4.7.  The associated version of libstdc++ lackings some C++11 features I'd like to use.  They're present in GCC 4.7.2, which is available via the "devtoolset-1.1" SCL.

My problem is, even after installing and enabling that SCL, any program I build with ICC is still dynamically linking to the older, system-wide version of libstdc++.so.  That is, when I run "ldd" on my ICC-generated programs, one of the results is "libstdc++.so.6 => /usr/lib64/libstdc++.so.6".

I've tried to remedy this by adding, to the front of LD_LIBRARY_PATH, the location of the updated libstdc++.so library: "/ope/centos/devtoolset-1.1/root/usr/llib/gcc/x86_64-redhat-linux/4.7.2/:".  However, that doesn't seem to fix what "ldd" reports.

The fact that my ICC-generated programs are dynamically linking to an older libstdc++ version concerns me, because it makes me wonder if I'm going to have some kind of problem at runtime due to my compiled code making wrong assumptions about which version of libstdc++ it's using at run time.

Does anyone know (a) why "ldd" is pointing to the older version of libstdc++.so, and (b) if this really is a problem, how I can avoid it.

I'm concerned that if I can't fix this, I won't be able to use all of ICC 13's C++11 features and still have my programs build/run correctly on RHEL 6.4 systems.

0 Kudos
0 Replies
Reply