Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.5.3 still not fully gfortran 10.x compatible? #333

Open
justbennet opened this issue Feb 28, 2022 · 3 comments
Open

Release 4.5.3 still not fully gfortran 10.x compatible? #333

justbennet opened this issue Feb 28, 2022 · 3 comments
Assignees
Milestone

Comments

@justbennet
Copy link

To report a non-security related issue, please provide:

  • the version of the software with which you are encountering an issue
  • environmental information (i.e. Operating System, compiler info, java version, python version, etc.)
  • a description of the issue with the steps needed to reproduce it

netcdf-fortran/4.5.3
Red Hat Enterprise Linux release 8.5 (Ootpa)

Running make check without explicitly setting both FFLAGS and FCFLAGS to include -fallow-argument-mismatch still fails.

The release notes for netCDF-Fortran 4.5.3 (https://github.com/Unidata/netcdf-fortran/releases/tag/v4.5.3) say that

Added support for gcc/gfortran 10. The -fallow_argument_mismatch flag is passed to the underlying compiler when the flag is found to be supported. This change has been added to the autotools and cmake based builds. See #212 for more information.
[NOTE: In the above, the option is incorrectly using underscore instead of hyphen.)

The configure and build steps seem to work fine, but running make check without explicitly adding -fallow-argument-mismatch to both FFLAGS and FCFLAGS prior to running ./configure still seems to generate the error. That is, this error occurs

Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(1)).
ftest.F:599:72:

  559 |       call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
      |                                                                        2
......
  599 |       call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
      |                                                                        1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(1)).
make[3]: *** [Makefile:852: ftest.o] Error 1
make[3]: Leaving directory '/tmp/bennetsw/build/netcdf-fortran-4.5.3/nf_test'
make[2]: *** [Makefile:1206: check-am] Error 2
make[2]: Leaving directory '/tmp/bennetsw/build/netcdf-fortran-4.5.3/nf_test'
make[1]: *** [Makefile:1209: check] Error 2
make[1]: Leaving directory '/tmp/bennetsw/build/netcdf-fortran-4.5.3/nf_test'
make: *** [Makefile:581: check-recursive] Error 1

It appears that @Fan142857 tried to say this in the closed Issue: #212 (comment) perhaps?

It looks like the Makefile in the nf_test directory is exporting only FCFLAGS = -w -fallow-argument-mismatch but FFLAGS is still being set to only -w. Both need to have -fallow-argument-mismatch.

$ egrep '^FFLAGS = |^FCFLAGS = ' Makefile
FCFLAGS = -w -fallow-argument-mismatch
FFLAGS = -w

Adding -fallow-argument-mismatch to FFLAGS enables make check to complete properly.

I am not literate in Autoconf or CMake, so I don't know what to change to have that change generated by ./configure or cmake.

@WardF
Copy link
Member

WardF commented Mar 1, 2022

Hello, this should be addressed in the recent v4.5.4 release, found here. That said, while I am certain this issue was found and addressed, I'll need to confirm that it was in v4.5.4 and isn't currently in the main branch waiting for the upcoming v4.6.0 release. I am on limited connectivity at the moment but I will confirm this has been fixed. Thanks!

@ArchangeGabriel
Copy link
Contributor

I can confirm it’s in 4.5.4 as we were able to remove our local flag patching (used in 4.5.3) for this release.

@WardF WardF self-assigned this Apr 11, 2022
@WardF WardF added this to the 4.6.0 milestone Apr 11, 2022
@WardF
Copy link
Member

WardF commented Apr 11, 2022

OK, let me take a look. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants