Intel® C++ Compiler for Linux* - icc/icpc: error: could not find directory in which g++ resides

The following error occurs when the Intel® C or C++ Compiler for Linux* is unable to locate the GNU* g++ compiler on the user's system.

The known causes and solutions for this error include:

  • The GNU* g++ compiler is not installed on the system. To correct the condition ensure the g++ compiler is installed on the system.
  • On some non-English Linux OSes, the GNU specific LANGUAGE environment variable is not set to C. To correct the condition set the LC_LANGUAGE environment variable to C.
    For ksh/bash use: export LANGUAGE=C
    For tcsh/csh use: setenv LANGUAGE C
  • On some non-English Linux OSes, if the LANGUAGE setting above does not help, then try setting the LC_MESSAGES environment variable to C.
    For ksh/bash use: export LC_MESSAGES=C
    For tcsh/csh use: setenv LC_MESSAGES C
  • On some non-English Linux OSes, if the LC_MESSAGES setting above does not help, then try setting the LC_ALL environment variable to C. This setting may have undesired affects on other locale settings. See the Linux manual page for locale for more details.
    For ksh/bash use: export LC_ALL=C
    For tcsh/csh use: setenv LC_ALL C
  • The GNU* g++ compiler is installed in a non-standard location and the GXX_ROOT environment variable is not set. To correct the condition set the GXX_ROOT environment variable to the installation location of the GNU* g++ compiler.

    To determine the installation location for g++ execute the command:

    g++ --print-search-dirs

    Then set the GXX_ROOT environment variable to the location indicated by the €œinstall:€ field from the output of the above command.

    For example:

    If g++ is installed in: /usr/i686-pc-linux-gnu/gcc-bin/3.3/

    GXX_ROOT would be set as follows:

    For ksh/bash use: export GXX_ROOT=/usr/i686-pc-linux-gnu/gcc-bin/3.3/
    For tcsh/csh use: setenv GXX_ROOT /usr/i686-pc-linux-gnu/gcc-bin/3.3/

If none of the above solutions resolves the issue, please visit our Get Help page for support options.

 
For more complete information about compiler optimizations, see our Optimization Notice.

4 comments

Top
rahul s.'s picture

When I m running as root everything is fine but when as a user then getting same error, everything I tried but no solution

Farokh K.'s picture

to EFI

I faced the same problem as you.

It is because after changing LD_LIBRARY_PATH the compatibility version if icpc goes down

icpc version 14.0.1 (gcc version 4.8.0 compatibility)

icpc version 14.0.1 (gcc version 3.2.0 compatibility)

It works correctly with 4.8.0 version for me.

 

EFI's picture

Hi,

I am trying with icc13 and g++ 4.7.2. Initially i got the above said error but setting the above path and including the g++ header fie path, now i am getting the below error.

icc: warning #10001: could not find directory in which the set of libstdc++ include files resides
icc: warning #10047: reverting to Intel libraries and includes
/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/bits/stringfwd.h(43): error: expected a "{"
  namespace std _GLIBCXX_VISIBILITY(default)
                ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/cwchar(137): error: expected a "{"
  namespace std _GLIBCXX_VISIBILITY(default)
                ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/cwchar(282): error: namespace "std" has no member "wcstof"
    using std::wcstof;
               ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/cwchar(285): error: namespace "std" has no member "vfwscanf"
    using std::vfwscanf;
               ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/cwchar(288): error: namespace "std" has no member "vswscanf"
    using std::vswscanf;
               ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/cwchar(291): error: namespace "std" has no member "vwscanf"
    using std::vwscanf;
               ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/bits/postypes.h(70): error: expected a "{"
  namespace std _GLIBCXX_VISIBILITY(default)
                ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/bits/postypes.h(100): error: identifier "ptrdiff_t" is undefined
    typedef ptrdiff_t   streamsize; // Signed integral type
            ^

/home/balajisu/toolchain_dir/tools/i386-linux-gnu/include/c++/4.7.2/iosfwd(44): error: expected a "{"
  namespace std _GLIBCXX_VISIBILITY(default)

.

Thank you,

Balaji

 

I've got the same error but root cause was that /tmp partition was full. So you can add this to possible causes.

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.