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

Re: Coinstallability of Fortran libraries built with different compilers



On Sat, Oct 22, 2011 at 04:24:23PM -0700, Steve Langasek wrote:

> > 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'm not familiar with this i386-linux-intel triplet.  Is this a triplet
> targeted by the toolchain?  Does software built for this target not use GNU
> libc?  (I guess I can't presume that it uses any libc at all, since we're
> speaking specifically of fortran here.)

I'm not sure about libc dependencies of fortran binaries, I'll leave
Alastair to answer that bit. My understanding on library use and ABI
compatibilities is that the critical point are .mod files in
/usr/include, whereas .a or .so files are perfectly reusable across
compilers.

That means that fortran binaries compiled with any compiler are free to
depend on C libraries built with any compiler. For example,
/usr/lib/libnetcdff.so links with curl, libm, libc, libhdf5, and plenty
others according to ldd. Ideally one would want to have parallel,
per-compiler versions of fortran libraries, because of the different
.mod file formats, and then share all the chain of C dependencies.


Ciao,

Enrico

-- 
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enrico@enricozini.org>

Attachment: signature.asc
Description: Digital signature


Reply to: