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

Using c++ compiler on Ubuntu 64 bits

mkende
Beginner
1,328 Views
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.

thanks,
Mat
0 Kudos
8 Replies
TimP
Honored Contributor III
1,328 Views
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
and
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.
0 Kudos
TimP
Honored Contributor III
1,328 Views
http://www.intel.com/support/performancetools/sb/CS-025939.htm gives some explanation of Ubuntu installation.
0 Kudos
mkende
Beginner
1,328 Views
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/


0 Kudos
John_O_Intel
Employee
1,328 Views

Hi,

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.

_|ohnO

0 Kudos
mkende
Beginner
1,328 Views
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.
0 Kudos
John_O_Intel
Employee
1,328 Views

Hi,

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 http://www.thinkingparallel.com/2006/12/23/installing-the-intel-compiler-on-ubuntu-linux/, 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 http://www.theochem.uwa.edu.au/fortran/intel_on_debian, 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.

_|ohnO

0 Kudos
mkende
Beginner
1,328 Views
thank you all,

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

mathias
0 Kudos
eleblois
Beginner
1,328 Views
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

etienne
0 Kudos
Reply