#1769: Deal with Fortran module files in standard C include paths (where they don't belong, but might have been placed by the system)
Reporter:Bruno Mundim
Status:resolved
Milestone:
Version:development version
Type:bug
Priority:minor
Component:EinsteinToolkit thorn

Changes (by Roland Haas):

status:resolved (was open)

Note: the description changed, as the ticket evolved. The original description can be found below.

New description:

Only as short summary: Some systems install Fortran module files into standard paths for C include files. In order to find them, these paths need to be given to the Fortran compiler using the -I flag. They are not searched by default (by some compilers), since these paths, while C standard include paths, are not Fortran standard include paths. On the other hand, adding this -I option to all compilations in Cactus would interfere with C/C++, as these directories should not be added in that case.

One possible solution, not implemented right now, might be to use the relatively new INC_DIRS_F variable in the detect script.

Original description:

Several Linux distributions have already started to move their libraries to a new directory structure that reflects the target architecture and allows the installation of packages from multiple architectures in the same system. The following links provide more details of this change:

https://wiki.debian.org/Multiarch/TheCaseForMultiarch
https://wiki.ubuntu.com/MultiarchSpec

This change potentially affects several of external library scripts shipped with ET. For example the HDF5/src/detect.sh script is not able to detect the hdf5 libraries installed in the directory /usr/lib/x86_64-linux-gnu for Ubuntu 14.04.2 LTS.

I have attached a simple patch to remedy this issue and open a discussion on the best way to proceed here. This patch does depend on the availability of gcc on the system. It currently works fine for me, but we might need a better solution for systems without gcc.

Keyword: ExternalLibraries
Keyword: HDF5
Keyword: Multiarch

Comment (by Roland Haas):

Fortran modules are now handled (more) correctly.

The multi-arch issue that came up during discussion is addressed (but not yet resolved) in #2133

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/1769/deal-with-fortran-module-files-in-standard