Bug 1738541 - nf-config does not report the location of netcdf.mod
Summary: nf-config does not report the location of netcdf.mod
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: netcdf-fortran
Version: 30
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-07 12:14 UTC by Fredrik Jansson
Modified: 2020-03-13 23:21 UTC (History)
2 users (show)

Fixed In Version: netcdf-fortran-4.5.2-3.fc31 netcdf-fortran-4.5.2-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-06 02:22:11 UTC
Type: Bug


Attachments (Terms of Use)

Description Fredrik Jansson 2019-08-07 12:14:17 UTC
Description of problem:

The nf-config utility (provided by package netcdf-fortran-devel) is supposed to paths where netcdf.mod is found when specifying the --fflags. 

On Fedora 30, it returns /usr/include, however netcdf.mod is found in a different directory, /usr/lib64/gfortran/modules. Thus when compiling software that queries nf-config to find the module include path, it gets a path that doesn't have netcdf.mod, and compilation fails when it does not find netcdf.mod

This is exactly the same problem as in https://bugzilla.redhat.com/show_bug.cgi?id=1554621 which was closed as EOL for Fedora 26. The problem was also present in Fedora 29. I would have re-opened that bug, but I couldn't.

Version-Release number of selected component (if applicable):
$ rpm -qa | grep netcdf-fortran
netcdf-fortran-devel-4.4.4-12.fc30.x86_64
netcdf-fortran-4.4.4-12.fc30.x86_64

Steps to Reproduce:
1. nf-config --fflags

Actual results:
$ nf-config --fflags
-I/usr/include

Expected results:
$ nf-config --fflags
-I/usr/include -I/usr/lib64/gfortran/modules/

Note that /usr/include contains netcdf.inc which may also be needed for netcdf-using Fortran programs, thus I think /usr/include should be kept in the response.

Additional info:
One workaround, which fixes the problem for me, is to patch /usr/bin/nf-config to return also the module directory:

 includedir=${prefix}/include
+moduledir=/usr/lib64/gfortran/modules/
 
 cc="gcc"
 fc="gfortran"
 cflags=" -I${includedir} " 
-fflags="-I${includedir}"
+fflags="-I${includedir} -I${moduledir}"

Comment 1 Fedora Update System 2020-02-25 16:02:12 UTC
FEDORA-2020-b218fe02ad has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b218fe02ad

Comment 2 Fedora Update System 2020-02-27 18:35:01 UTC
netcdf-fortran-4.5.2-3.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b218fe02ad

Comment 3 Fedora Update System 2020-02-27 19:26:04 UTC
netcdf-fortran-4.5.2-3.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-ea68ebc8bf

Comment 4 Fedora Update System 2020-03-06 02:22:11 UTC
netcdf-fortran-4.5.2-3.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2020-03-13 23:21:26 UTC
netcdf-fortran-4.5.2-3.el8 has been pushed to the Fedora EPEL 8 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.