gfortan does not include system .mod files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-defaults (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 20.04
gfortran can not find .mod files located in
/usr/lib/
The .mod files from /usr/include work perfectly well.
I have found two workarounds:
- To explicitly specify -I flag with that directory
or
- to symlink needed .mod files to /usr/include
$ dpkg -l |grep gfortran
ii gfortran 4:9.3.0-1ubuntu2 amd64 GNU Fortran 95 compiler
ii gfortran-9 9.3.0-10ubuntu2 amd64 GNU Fortran compiler
ii libgfortran-
ii libgfortran5:amd64 10-20200411-
It would be great to somehow instruct gfortran to search for
.mod files in /usr/lib/
Same for GNU Fortran (Ubuntu 11.3.0- 1ubuntu1~ 22.04) 11.3.0.
At least libodc-dev, libeccodes-dev, libpnetcdf-dev, libcoarrays-dev, libopenmpi-dev, and libmpich-dev put their .mod files to /usr/lib/ x86_64- linux-gnu/ fortran/ gfortran- mod-15, where gfortran cannnot find them by default.