[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Coinstallability of Fortran libraries built with different compilers



Cross-posting this to debian-devel for greater visibility on multiarch,

On 2011-10-20 17:30, Enrico Zini wrote:
Hello,

another issue caused by a lack of standards for Fortran .mod files is
that one cannot use, say, gfortran, to link to a library built with
another compiler like ifort.

We are starting to need to install development systems that would allow
both a gfortran toolchain and an ifort toolchain. That would mean having
to compile all libraries twice, and installing them twice in the system.

I have been experimenting with hacks like installing gfortran files in
/usr/include and /usr/lib and ifort files in /usr/include/ifort and
/usr/lib/ifort, and with a bit of insisting, things can be made to work.

That has also the nice property that standard Debian packages, that are
built with gfortran, fit normally in the system.

Is that a solution as good as anything, or are you doing something
better?

One point to think of is how this works with multiarch, which is being introduced
in Debian. Instead of 'ifort' should we use the architecture triplet, eg.
i386-linux-intel instead ?
Then the libraries go in i386-linux-intel rather than i386-linux-gnu for gfortran;
ditto for the .mod files in /usr/include/i386-linux-intel

I'd avoid /usr/include/ifort as it looks too much like a subdirectory used by package ifort,
rather than somewhere netcdf would expect to find its stuff, etc.

Following the multiarch pattern means we can use pkg-config correctly for Intel compilers; e.g. /usr/lib/i386-linux-intel/pkgconfig contains the .pc files for the Intel versions; we can either then set the PKG_CONFIG_PATH or use the 'cross-compiler pkgconfig'
to get pkg-config to Do The Right Thing.

Regards
Alastair


Ciao,

Enrico



--
Alastair McKinstry  ,<alastair@sceal.ie>  ,<mckinstry@debian.org>     http://blog.sceal.ie

Anyone who believes exponential growth can go on forever in a finite world
is either a madman or an economist - Kenneth Boulter, Economist.



Reply to: