Performance Tools for Software Developers - Intel® C++ and Fortran compiler - error loading shared libraries: libstdc++.so.5

Submit New Article

September 18, 2008 11:00 PM PDT


Currently, the Intel® C++ and Fortran 9.x compilers for Linux* for Intel® 64 processor-based systems *only* require linkage to a Standard C++ library.

Beginning with the Intel® 10.x compiler releases, and continued with the 11.x releases, product improvements in the C++ and Fortran compilers for Linux require linkage to a Standard C++ library on *all* IA-32, Intel® 64, and IA-64 processor-based Linux systems.

The Intel C++ and Fortran 9.x Intel® 64 compilers for Linux and all Intel C++ and Fortran 10.x and 11.x compilers for Linux are linked to the /usr/lib/libstdc++.so.5 library by design to permit use of these Intel® compilers on GCC* 3.2-based Linux* distributions.

Attempts to use the Intel® 64 C++ or Fortran 9.x compilers for Linux or any Intel C++ or Fortran 10.x or 11.x compilers for Linux when the /usr/lib/libstdc++.so.5 library does not exist on the target compilation system results in an error involving loading of this shared library. The sample error below is specific to the Intel Fortran 10.1 compiler for Linux; however, it is illustrative of the error issued by each Intel C++ and Fortran compiler for Linux that depends on this library when the library does not exist.

ifort -c example.f90
/opt/intel/fc/10.1.xxx/bin/fortcom: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
compilation aborted for example.f90 (code 127)

The resolution of this error condition requires explicit user action to install the compatibility Standard C++ library RPM, compat-libstdc++ , that provides the required /usr/lib/libstdc++.so.5 library.

Please refer to your Linux* distribution's installation materials for details on the compat-libstdc++ RPM and installing specific RPMs.

 


Do you need more help?


This article applies to: Intel® C++ Compiler for Linux* Knowledge Base,   Intel® Fortran Compiler for Linux* Knowledge Base