http://techpubs.spinlocksolutions.com/ixc-debian.html Davor Ocelic, docelic@spinlocksolutions.com, Mar 23, 2004. Last update: updated teochem article url, Jun 30, 2004.
Intel distributes its compilers for linux in tarballs, which consist of .rpm packages and accompanying legal notes.
Here you'll find out how to register and download the Intel compiler of your choice, turn it into a Debian package (.deb) and install it. (This procedure should probably work for other Intel packages for Linux as well.)
The web page http://www.theochem.uwa.edu.au/fortran/debian_intel.html was of help in writing this. NOTE:The URL was moved once, and then for the second time.
In case of the Intel C++ compiler, you need to visit the C++ compiler's EULA page, accept the terms of use, and provide your name and email on the next page. A confirmation email, with the attached license key should arrive in your mailbox "within 1 business day", or so they say. NOTE: the given EULA link is no longer valid in itself, but will properly redirect you to the C++ compiler subpage.
While you're waiting for the license key, you can start downloading the actual compiler on the download page.
Once you download, extract the tarball (tar zxf filename), and enter the newly created directory. If you're doing this on a 32-bit userland, it's safe to just delete all files with '64' in their name (rm -rf *64*), as their won't be of use to you. (or the other way around, delete *32* if you have a 64bit userland). Then, use the alien (apt-get install alien) program to convert remaining .rpm files to .deb; here's a "session transcript":
# tar zxf l_cc_p_8.0.055.tar.gz # cd l_cc_p_8.0.055 # rm -rf *64* # alien *.rpm # rm *.rpm
So far so good. Now, we need to modify the postinst script of *only* the main .deb package (intel-icc8_8.0-45_i386.deb in this case), and rebuild the .deb. Let's first extract the .deb to a temporary location (./tmp/) and add 1 line to the postinst script:
# mkdir tmp # dpkg-deb -e intel-icc8_8.0-45_i386.deb tmp/DEBIAN # dpkg-deb -x intel-icc8_8.0-45_i386.deb tmp/ # echo DESTINATION=/opt/`ls tmp/opt/`/ >> tmp/DEBIAN/postinst
Fine. 99% through the mess. Now open the original install.sh script (should be in your current directory), and search for string "for FILE" in it. You should see a few "for FILE" blocks listed one by one in a row (all basically performing various substitutions on files in the DESTINATION directory, if you understand a little shell or sed syntax). Those few blocks are the ones you need to copy, and paste at the end of tmp/DEBIAN/postinst. To minimize the chance of confusion, here's the block you need to paste for both 8.* and 7.* versions:
8.*:
for FILE in $(find $DESTINATION/bin/ -regex '.*[ei](cc|fort|fc|cpc)$\|.*cfg$\|.*pcl$\|.*vars[^/]*.c?sh$' 2> /dev/null) ; do sed s@\@$DESTINATION@g $FILE > ${FILE}.abs mv ${FILE}.abs $FILE chmod 755 $FILE done for FILE in $(find $DESTINATION/bin/ -regex '.*[ei]cc' 2> /dev/null) ; do sed s@\ @$DESTINATION@g $FILE > ${FILE}.abs mv ${FILE}.abs $FILE chmod 755 $FILE done for FILE in $(find $DESTINATION/bin/ -regex '.*[ei]cpc' 2> /dev/null) ; do sed s@\ @$DESTINATION@g $FILE > ${FILE}.abs mv ${FILE}.abs $FILE chmod 755 $FILE done for FILE in $(find $DESTINATION/bin/ -regex '.*[ei]fort' 2> /dev/null) ; do sed s@\ @$DESTINATION@g $FILE > ${FILE}.abs mv ${FILE}.abs $FILE chmod 755 $FILE done for FILE in $(find $DESTINATION/bin/ -regex '.*[ei]fc' 2> /dev/null) ; do sed s@\ @$DESTINATION@g $FILE > ${FILE}.abs mv ${FILE}.abs $FILE chmod 755 $FILE done
7.*:
for FILE in $(find $DESTINATION/compiler70/ia??/bin/ -regex \ '.*[ei][cf]p?c$\|.*cfg$\|.*pcl$\|.*vars[^/]*.c?sh$' \ 2> /dev/null) ; do sed -e s@\@$DESTINATION@g -e s@man\ \ -w@manpath@g $FILE > ${FILE}.abs mv ${FILE}.abs $FILE chmod 755 $FILE done
But don't directly copy this, do open your install.sh script and find this piece yourself since it could change at any time.
Now just rebuild the .deb and install it (first this "main" deb, then the rest of them):
# dpkg-deb -b tmp intel-icc8_8.0-45_i386.deb # dpkg -i intel-icc8_8.0-45_i386.deb # dpkg -i intel-iidb7_7.3.1-86_i386.deb # dpkg -i --force-overwrite intel-isubh8_8.0-45_i386.deb
And copy the license file you received in your email to the appropriate place:
# cp /where-ever/it/is/l_cpp_XXXXXXXX.lic /opt/intel_cc_80/licenses/
To setup your environment, run on the command line or put in startup scripts (like ~/.bash_profile):
source `find /opt/intel_* -name 'i*vars.sh'`