September 2010
Ubuntu createda nasty situation: libstdc++5
is not available on Lucid.
But Intel created an even nastier one: the Intel Fortran Compiler is not available in a 64-bit version.
Instead, they offer the 32-bit version, and IMHO it doesn't look in the proper paths for libraries, nor is there documentation on how to make the installer look in the proper places.
They do offer a kludgy workaround for this situation, but their workaround doesn't respect the Ubuntu package manager, and is therefore neither maintainable nor packageable, and must be scripted on a per-host basis.
This is not good if you need the IFC on a lot of machines. So I repackaged the libraries needed (this section doesn't handle the installation of the compiler itself)...
We fetch both the i386 and the amd64 packages from http://packages.debian.org/lenny/amd64/libstdc++5/
We repackage the i386 version for amd64, but we send the libraries to /usr/lib32
instead of /usr/lib
.
The packaging is too lengthy to describe here, but I have a short introduction to packaging for .deb online.
As a hint, we do show the Makefile
:
#!/usr/bin/make install: install -m 644 -t $(DESTDIR)/usr/lib32 usr/lib/libstdc++.so.5.0.7 clean: rm -f $(DESTDIR)/usr/lib32/libstdc++.so.5.0.7 .PHONY: install clean
... debian/control
:
Source: gcc-3.3 Section: unknown Priority: extra Maintainer: Jurjen Bokma <j.bokma@rug.nl> Build-Depends: debhelper (>= 7) Standards-Version: 3.8.3 Package: libstdc++5-32bit Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: 32-bit libstdc++5.so in /lib32 Ubuntu fails to ship libstdc++5 for Lucid. Intel fails to provide a 64-bit version of their Fortran compiler. This package provides the 32-bit version of libstdc++ in /lib32, so you may install use the IFC anyway.
... and debian/rules
:
#!/usr/bin/make -f clean: dh_testdir dh_testroot # Add here commands to clean up after the build process. $(MAKE) clean dh_clean install: dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/libstdc++5-32bit $(MAKE) DESTDIR=$(CURDIR)/debian/libstdc++5-32bit install # Build architecture-independent files here. binary-indep: install # We have nothing to do by default. dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_link usr/lib32/libstdc++.so.5.0.7 usr/lib32/libstdc++.so.5 dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep .PHONY: build clean binary-indep binary install configure
So we create the package with:
user@host:~$ pdebuild --architecture amd64 --auto-debsign --debsign-k "user@host.domain" --buildresult ../lastbuild --logfile ../lastbuild/pdebuild.log
Creating a reprepro
repository I haven't documented yet. (It was done in haste.) But we put the packages in it like this:
user@host:~$ sudo reprepro -b /srv/repo/company/ubuntu/ includedeb lucid-experimental ~/libstdc++5_3.3.6-18_amd64.deb
Exporting indices...
user@host:~$ sudo reprepro -b /srv/repo/company/ubuntu/ includedeb lucid-experimental /home/jurjen/libstdc++5-32bit_3.3.6ds1-18_amd64.deb
Exporting indices...
The task of installing libstdc++5 on a PC (that already has the .deb lines for the reprepro repository in its sources.list
, is now reduced to
user@host:~$ sudo apt-get install -y libstdc++5 libstdc++5-32bit
The Fortran Compiler's installer now still complains about an unsupported OS, but it does install.