分类: LINUX
2011-03-23 17:29:37
Intel distributes their Linux compilers (Fortran and C/C++) using the RPM format for use on Redhat and Suse systems. However, their compilers work fine with Debian (assuming the correct libraries are installed). Don't install RPM on your deb system, it's not necessary
The alien program can convert rpms to deb format, and is trivial to use. This is all you need to install the compilers on Debian, but then you need to make some post-installation modifications that the Intel installation script does. We can modify the deb packages to make these post-installation modifications for us. By doing so it's even easier to than using Intel's install scripts on the original rpms.
Below are the steps. This works for the ifc/ifort, icc and iidb packages. I haven't tried the icc-ide package yet, as I don't use an IDE. Note that alien will increment the version number of a package unless you give it the -k argument.
Version 7.1 to 10.0 compilersDownload the script. It uses bash, which you might need to install.
Use rpmrebuild to fix the rpms. Do it on an rpm based distribution. Get the details . Better yet, lobby Intel to fix them in the first place.
Run alien >= 8.65 on the rpm.
They've got this right. The only annoying thing now is that the rpm is not distributed as an rpm, but part of a self extracting shell script. Use alien >= 8.65 to get it to correctly convert the post-install scripts in the rpm.
For converting em64t versions, make sure you have the ia32-libs package installed, and alien >= 8.61.
Make sure you "source" the iccvars.csh, ifortvars.csh and/or idbvars.csh files in tcsh before trying to use the compilers or other utilities. There are bash versions too. They are all in the bin directories.
If you get problems sourcing iccvars.sh/ifortvars.sh and your /bin/sh isn't a symlink to /bin/bash, then edit iccvars.sh/ifortvars.sh and change the #!/bin/sh to #!/bin/bash. Don't blame the Ubuntu developers or Dash, blame Intel for assuming sh is bash. (the export command in dash does not have a -n flag, while in bash it does).
If you get strange errors with icpc 8.1 and have G++ 3.3.4 installed, try "ln -s /usr/include/c++/3.3 /usr/include/c++/3.3.4". If this works, the problem is a bug in the Intel compiler; it should ask G++ where it is located rather than assume something.
If you want to submit bug reports to Intel, you might need the package id (I usually just give them the build number). The package id is normally shown by invoking the compiler with the -V flag. The package id is just stored in a file, and the scripts above don't fix this yet, and instead the -V flag prints out "installpackageid". The package id is something like l_fc_pc_8.1.024 or l_cc_8.1.028. If you really want, you can put it in the file yourself. Look for the file "csupport" or "fsupport" or "idbsupport" in the appropriate Intel doc directory.
If you get a filename conflict for uninstall.sh when installing packages, just add --force-overwrite to the dpkg command line.
While compiling with the Intel C compiler on AMD64, I received the error message:
Catastrophic error: could not set locale "" to allowSetting the environment variable LANG=C seemed to fix this.
If iidb complains about a missing libXft.so.1 (it will on Etch), there is a dodgy workaround from .
This section is just for historical reasons (i.e. so I don't forget). Just get a new version of Alien.
Intel likes to call the architecture em64t instead of amd64 in their rpms. If you have alien 8.61 or later this will not be a problem, as em64t is an alias for amd64. Thanks go to Joey Hess (the Alien maintainer) for putting this in for us.
If you don't have a recent version of alien, the process is in principle the same as above, but gets ugly with a workaround.
Ignore the libstdc++ dependency warnings. The package is now built and installable, but doesn't have the post-install fixes yet.
Run the fix_deb script as above.
./fix_deb intel-iforte9_9.0-031_amd64.debInstall the package.
dpkg -i intel-iforte9_9.0-031_amd64.debA double thanks to Joey Hess. First for getting Alien 8.61 to recognise em64t as amd64. Secondly, for getting Alien 8.65 to set RPM_INSTALL_PREFIX in the post-install of converted rpms.
AuthorDaniel Grimwood
reaper@nicdan.id.au
Comments appreciated.