gfortan does not include system .mod files

Bug #1883855 reported by Rostislav
10
This bug affects 2 people
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/x86_64-linux-gnu/fortran/gfortran-mod-15

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-9-dev:amd64 9.3.0-10ubuntu2 amd64 Runtime library for GNU Fortran applications (development files)
ii libgfortran5:amd64 10-20200411-0ubuntu1 amd64 Runtime library for GNU Fortran applications

It would be great to somehow instruct gfortran to search for
.mod files in /usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15 as well...

Revision history for this message
Rostislav (rostislav-kouznetsov) wrote :

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.

Revision history for this message
Kabir Medina (kabirmedina) wrote :

Yes! I have Ubuntu 22.04.3 LTS, and I am facing the same issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gcc-defaults (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.