Fixing the Intel Compiler RPMs

They have got it right in MKL 10.0! For that you can just install the rpm normally and it will just work, and even relocate it. No need for the install script.

Intel uses RPM to package most of their Linux compilers, but they just use it as a fancy tarball and don't use its full capabilities. They have the install script do post-installation work, but RPM can do it all on its own. Yes I've submitted multiple bug reports to Intel on this.

Using rpmrebuild, we can fix the RPMS. By doing so, the rpms can be used in a normal way "rpm -U", or put into your own yum repository for automatic updates to your cluster machines.

For the technical minded, all we're doing is adding a %post section to the rpm. The script inserted is just ripped from the Intel install script (with $DESTINATION replaced by $RPM_INSTALL_PREFIX), so if they release a different compiler in future it's easy to modify the script yourself.

You must download rpmrebuild and stick it in your path before running the script! Download the script fix_rpm and run it as root on the rpm:

./fix_rpm intel-ifort91040-9.1.040-1.i386.rpm

The fixed rpm will be placed in /usr/src/redhat/RPMS/, rather than overwriting the original rpm.

This is all the script does:

rpmrebuild -p -b --change-spec-post="cat post.9.1" intel-ifort91040-9.1.040-1.i386.rpm
where post.9.1 just contains the new %post section (for e.g. a 9.1 compiler). Simple eh? Go tell Intel.

Also note that this script does not fix the package id (displayed via e.g. "icc -V"). That is hard coded into the install script by Intel every version, and it's not really useful for most bug reports.

Acknowledgements

Thanks to Valery Reznic for pointing me to rpmrebuild.

Author

Daniel Grimwood
reaper@nicdan.id.au

Comments appreciated.