Using c++ compiler on Ubuntu 64 bits

Using c++ compiler on Ubuntu 64 bits

I just installed the latest version (l_cc_p_10.0.023) of the compiler on my ubuntu 7.04 64 bits (which is already better than with the 9.1 version on which the licence validation failed).

But I canot use it : whenever I try to compile a file I get the following error :

$ icpc foo.cpp
icpc: error #10001: could not find directory in which g++ resides

I can't see where the problem comes from as g++ lies in my PATH.


9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you are using the 64-bit cce compiler, you will need working installations of both 32- and 64-bit g++. For starters, both
g++ -v -print-search-dirs
g++ -m32 -v -print-search-dirs
should work, and give versions in the supported range. Ubuntu probably still presents special obstacles different from the usual distros, so you may want to refer to notes posted by those who have done it. gives some explanation of Ubuntu installation.

thank you for your answer. As I'm using Ubuntu 7.04 the steps described in your link are not necessary (the scripts are already patched), and I have tried the different version of g++, both the normal and the -m32 option give meaningful result but the two outputs are the same, I don't know if it's normal. Below are the output I got from g++ :

Utilisation des specs internes.
installs: /usr/lib/gcc/x86_64-linux-gnu/4.1.2/
programmes: =/usr/lib/gcc/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/libexec/gcc/x86_64-linux-gnu/4.1.2/:/usr/libexec/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/bin/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/bin/
libraries: =/usr/lib/gcc/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../x86_64-linux-gnu/4.1.2/:/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../:/lib/x86_64-linux-gnu/4.1.2/:/lib/:/usr/lib/x86_64-linux-gnu/4.1.2/:/usr/lib/


Sorry this isn't working for you yet. On my Ubuntu 7.04 system this worked without problems, and I have g++ configured the same as yours. You can try specifying the location ofg++ like this:

/opt/intel/cc/10.0.023/bin/icpc hi.cpp -cxxlib=/usr/

I'm not sure if this will work for you or not. I wonder if this is somehow a localization problem ? I have LANG set as follows:

export LANG=en_US.UTF-8

Hope this helps, please let us know if either of these work for you so we can investigate how to avoid this problem in the future. By the way, the 1st line of the FAQ points out that the 10.0 compiler patches the scripts for Ubuntu 6.04 & 7.10.


I tried these options (including -gcc-name and -gcc-version) and I still get the same error. Are you using the 32 or 64 bits version of the compiler (I try to use the 64 bits version on a 64 bits system) ?

The locale problem seems interesting. I'm using LANG=fr_FR.UTF-8, I tried in a completely new session with local set to en_US.UTF-8 and I got this error :

Catastrophic error: could not set locale "" to allow processing of multibyte characters
compilation aborted for foo.cpp (code 4)

while using a pure ascii foo.cpp file.


Sorry this didn't help. I'm testing on a 32-bit machine, so can't test the 64-bit compilers. I had the same problem you did when I set LANG=fr_FR.UTF-8.

I found suggestions to workaround this problem at several websites, but I haven't been able to test these yet.

Michael Suess Thinking Parallel site, at, discusses this problem:

"First of all, sometimes the compiler complains about missing g++ library versions (or something like that). With the current version of the compiler (9.1.044), this does not happen here anymore, but if it happens to you, try adding a LC_ALL=C in front of your compiler-command, e.g. to compile a simple hello-world program, do this:

LC_ALL=C icpc hello_world.cpp -o hello_world "
Daniel Grimwood, at, suggests another work around:
"Catastrophic error: could not set locale "" to allow
processing of multibyte characters.

Setting the environment variable LANG=C seemed to fix this."

Let us know if these workarounds help you, and we will continue to investigate this problem.


thank you all,

setting LC_ALL=C in front of the compiler call worked fine.


same problem and same solution, with intel fortran (ifort) on a ubuntu 32 bits
so it may be more ubuntu than c++ or 64 bits related problem


Leave a Comment

Please sign in to add a comment. Not a member? Join today