Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

icpc cannot find libstdc++ for alternate install of GCC

$
0
0

I am on a cluster running CentOS 6.5 with an old version of GCC (4.4.7) and several versions of icpc (14.0.2, 14.0.1 and older). I have installed a local copy of GCC (4.8.3) in order to be able to use C++11 features. I have created a personal module file to load my version of GCC into my path; it is included at the end of this post.

I run into a problem whenever I compile a program (even the simplest hello.cpp from this link) using icpc when my GCC module is loaded:

icpc: error #10001: could not find directory in which the set of libstdc++ include files resides

I have googled this error but none of the proposed problems/solutions have worked for me. The error is reproducible with icpc 14.0.1 and 14.0.2.

Below is a list of problems I think I have eliminated. What am I missing?

g++ is not installed properly:

$ which g++
~/bin/gcc-4.8.3/bin/g++

GXX_ROOT is not set properly:

$ echo $GXX_ROOT
/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/
$ g++ -print-search-dirs
install: /home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/
programs: =/home/andyras/bin/gcc-4.8.3/libexec/gcc/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/libexec/gcc/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/libexec/gcc/x86_64-unknown-linux-gnu/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/bin/
libraries: =/home/andyras/bin/gcc-4.8.3/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/lib/../lib64/:/home/andyras/bin/gcc-4.8.3/lib64/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/lib64/../lib64/:/home/andyras/bin/dynamix-ga-2014-07-28-intel-14.0.2/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/dynamix-ga-2014-07-28-intel-14.0.2/lib/../lib64/:/home/andyras/bin/GAlib-mpi-openmpi-1.8.1-intel-14.0.2/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/GAlib-mpi-openmpi-1.8.1-intel-14.0.2/lib/../lib64/:/home/andyras/bin/openmpi-1.8.1-intel-14.0.2/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/openmpi-1.8.1-intel-14.0.2/lib/../lib64/:/home/andyras/bin/dynamix-2014-07-28-intel-14.0.2/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/dynamix-2014-07-28-intel-14.0.2/lib/../lib64/:/home/andyras/bin/boost-1.54.0-intel-14.0.2/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/boost-1.54.0-intel-14.0.2/lib/../lib64/:/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/x86_64-unknown-linux-gnu/4.8.3/:/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/../lib64/:/opt/intel/composer_xe_2013_sp1.2.144/ipp/lib/intel64/x86_64-unknown-linux-gnu/4.8.3/:/opt/intel/composer_xe_2013_sp1.2.144/ipp/lib/intel64/../lib64/:/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/x86_64-unknown-linux-gnu/4.8.3/:/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/../lib64/:/opt/intel/composer_xe_2013_sp1.2.144/tbb/lib/intel64/gcc4.4/x86_64-unknown-linux-gnu/4.8.3/:/opt/intel/composer_xe_2013_sp1.2.144/tbb/lib/intel64/gcc4.4/../lib64/:/home/andyras/bin/cvode-2.7.0-intel-14.0.2/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/cvode-2.7.0-intel-14.0.2/lib/../lib64/:/home/andyras/bin/git-2.0.3/lib64/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/git-2.0.3/lib64/../lib64/:/home/andyras/bin/git-2.0.3/libexec/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/git-2.0.3/libexec/../lib64/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/lib/x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/lib/../lib64/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../x86_64-unknown-linux-gnu/4.8.3/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../lib64/:/lib/x86_64-unknown-linux-gnu/4.8.3/:/lib/../lib64/:/usr/lib/x86_64-unknown-linux-gnu/4.8.3/:/usr/lib/../lib64/:/home/andyras/bin/gcc-4.8.3/lib/:/home/andyras/bin/gcc-4.8.3/lib64/:/home/andyras/bin/dynamix-ga-2014-07-28-intel-14.0.2/lib/:/home/andyras/bin/GAlib-mpi-openmpi-1.8.1-intel-14.0.2/lib/:/home/andyras/bin/openmpi-1.8.1-intel-14.0.2/lib/:/home/andyras/bin/dynamix-2014-07-28-intel-14.0.2/lib/:/home/andyras/bin/boost-1.54.0-intel-14.0.2/lib/:/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/:/opt/intel/composer_xe_2013_sp1.2.144/ipp/lib/intel64/:/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/:/opt/intel/composer_xe_2013_sp1.2.144/tbb/lib/intel64/gcc4.4/:/home/andyras/bin/cvode-2.7.0-intel-14.0.2/lib/:/home/andyras/bin/git-2.0.3/lib64/:/home/andyras/bin/git-2.0.3/libexec/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/lib/:/home/andyras/bin/gcc-4.8.3/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../:/lib/:/usr/lib/

I have also provided my module file at the end for inspection of which paths I changed.

language environment variables are set improperly:

$ export LANGUAGE=C; export LC_MESSAGES=C; export LC_ALL=C

This problem is supposedly for non-English Linuces, and the solution has no effect on my error.

missing -cxxlib flag

I tried setting adding the flag `-cxxlib=/home/andyras/bin/gcc-4.8.3` to CXXFLAGS with no effect.

-gxx-name flag

I tried setting `-gxx-name=/home/andyras/bin/gcc-4.8.3/bin/g++` in CXXFLAGS with no effect.

References:

  1. https://software.intel.com/en-us/forums/topic/486698
  2. https://software.intel.com/en-us/articles/intel-c-compiler-for-linux-icc...
  3. https://software.intel.com/en-us/forums/topic/366102

Module file:

#%Module

# for simple packages, this line is all that needs to change
set VER 4.8.3
set PKG /home/andyras/bin/gcc-$VER

setenv GXX_ROOT /home/andyras/bin/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/

setenv CC gcc
setenv CXX g++
setenv FC gfortran
setenv F77 gfortran

# standard paths
set PKGBIN $PKG/bin
set PKGLIB $PKG/lib:$PKG/lib64
set PKGINC $PKG/include:$PKG/include/c++/$VER/:$PKG/include/c++/$VER/x86_64-unknown-linux-gnu/
set PKGMAN $PKG/share/man
set PKGINF $PKG/share/info
set PKGCFG $PKG/share/lib/pkgconfig

# comment out unnecessary paths, but leave them in so future module files
# can be easily copied and modified

prepend-path PATH $PKGBIN
prepend-path LIBRARY_PATH $PKGLIB
prepend-path LD_LIBRARY_PATH $PKGLIB
prepend-path CPATH $PKGINC
prepend-path C_INCLUDE_PATH $PKGINC
prepend-path CPLUS_INCLUDE_PATH $PKGINC
prepend-path MANPATH $PKGMAN
prepend-path INFOPATH $PKGINF
prepend-path PKG_CONFIG_PATH $PKGCFG

 


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>