Debian packages and Intel Compilers

1145阅读 0评论2011-03-23 zzggbb
分类:LINUX


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 compilers

Download the script. It uses bash, which you might need to install.

  1. Convert the rpm package to deb format. alien -k intel-ifc7-7.1-41.i386.rpm
  2. Run the script. ./fix_deb intel-ifc7_7.1-41_i386.deb
  3. Install the package. dpkg -i intel-ifc7_7.1-41_i386.deb
The Proper Way...
  1. 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.

  2. Run alien >= 8.65 on the rpm.

Math Kernel Library 10.0

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.

  1. Install the licence file, which the install script checks for. mkdir -p /opt/intel/licenses cp mylicensefile.lic /opt/intel/licenses
  2. Extract the rpm from the install script. l_mkl_p_10.0.011/install/install --extract .
  3. Convert the rpm package to deb format. alien -k --scripts intel-mkl100023-10.0p-023.noarch.rpm
  4. Install the package. dpkg -i intel-mkl100023_10.0p-023_all.deb
Notes Legacy Stuff Version 9.x compilers on AMD64 with Alien < 8.61

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.

  1. Extract the contents of the rpm. For the below package it puts them into the subdirectory intel-iforte9-9.0. alien -gsk intel-iforte9-9.0-031.em64t.rpm
  2. Fix some broken directory access permissions from the above extraction. (This is because these parent directories are not listed separately in the rpm, so alien creates them but with root-only permissions). chmod a+rx intel-iforte9-9.0/opt intel-iforte9-9.0/opt/intel
    intel-iforte9-9.0/opt/intel/fce intel-iforte9-9.0/opt/intel/fce/9.0
  3. edit intel-iforte9-9.0/debian/control, change the Architecture from em64t to amd64: Architecture: amd64
  4. Build the package. cd intel-iforte9-9.0
    debian/rules binary

    Ignore the libstdc++ dependency warnings. The package is now built and installable, but doesn't have the post-install fixes yet.

  5. Run the fix_deb script as above.

    ./fix_deb intel-iforte9_9.0-031_amd64.deb
  6. Install the package.

    dpkg -i intel-iforte9_9.0-031_amd64.deb
Acknowledgements

A 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.

Author

Daniel Grimwood
reaper@nicdan.id.au

Comments appreciated.

上一篇:opensuse linux 忘记root密码的解决方法
下一篇:安装ifort在ubuntu上