Intel C++ Complilers Linux

So if you know me you’ll know i think compilers are cool… yeah i know i am weird lol. So any-way’s this is something i never really got around to until last night. Which was setting up the Intel C/C++ compilers in my Computer which is running Debian. If  you ever look at using compilers other than GCC such as like Sun Studio and Intel C++ you may find its very messy feeling. What i mean is they have like a nasty install.sh, and to be quite honest they fail lol. Since they generally only cared about creating RPM’s and hoping your running Red Hat since most customers who would buy these compilers would be running a Red Hat server farm. So if your project is using Autoconf and Automake you dont have to worry about a thing, once the compilers are installed it will be one quick minor change to your configure.ac. And your all set!

First off go and download the 750mb tarball of the Intel C compilers over at: http://software.intel.com/en-us/intel-compilers/

% tar zxvf l_cproc_p_11.1.059_ia32.tgz

% cd l_cproc_p_11.1.059_ia32

% ./install.sh

# follow all the instructions it complained i didn’t have java installed but you don’t need it. Once your finished it should all be installed to /opt/intel/Compiler

% PATH=$PATH:/opt/intel/Compiler/11.0/069/bin/ia32

% LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/Compiler/11.1/059/lib/ia32/:/usr/lib/

You should be able to run ‘icc’ but you will probably get the error: ” /opt/intel/Compiler/11.1/059/bin/ia32/mcpcom: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

compilation aborted for test.c (code 127)”

So you need to install an older libstdc++ on debian it is:

% aptitude install libstdc++5

That should be it lets give it a test:

  1. int main( )
  2. {
  3.   ;
  4.   return 0;
  5. }

% icc test.c

Should work now! If your project uses a Configure.ac lets make a quick change:

Change your AC_PROG_CC to:
AC_PROG_CC([icc gcc cc cl])

This is the order in which the configure should search for each compiler. Since you need GCC installed to use Intel C++ you need to put ICC at the top of the list! Hope this helps someone!

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>