-
Notifications
You must be signed in to change notification settings - Fork 164
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
Revert changes to configure.defaults from commit 48f7904d #254
Conversation
The reorganization in configure.defaults from commit 48f7904 breaks compilation with the classic build system (configure/compile/clean) with GNU compilers. In the configure script, logic to determine whether we need to add -fallow-argument-mismatch relies on the extraction of the verbatim value of FFLAGS for use in compiling a test program. Since commit 48f7904 introduced Make variables into FFLAGS, these variables aren't expanded when extracting FFLAGS in the configure script, leading to an invalid set of compiler flags for the gnu_flag_test.F90 test program.
I think the only flag needed for that test program should be the free-form flags, thus :
should be sufficient |
@mgduda Do you think that my suggestion would be a reasonable fix? |
There are a couple of other places in the I'll put together a PR with changes to extract |
I can see that it might seem beneficial to do that, but I think we shouldn't. I think if you are testing for one feature, then you should only use the flags necessary to test that feature. Otherwise, you run the risk of false negatives where other flags inadvertently cause failure and you instead mark that feature as not supported or worse fail configuration with a totally wrong diagnosis. Case in point, in WRF when checking nc4 capabilities, there were numerous ways to fail the check with things unrelated to the bare minimum netCDF flags. One such example is the HDF5 linking (wrf-model/WRF#1935) that isn't needed for testing this feature. Thus, if a user does not have HDF5 in path (though netCDF can provide via RPATH) this feature would be marked as failure. |
@islas Can we say with certainty that the only compiler flags that are needed for all test programs in the I'm not disagreeing that the only necessary flags for the |
No, I can't say whether all test programs for all stanzas That is probably not possible or within the scope of this fix, and as you noted many other test programs also utilize My comment was more to note that this style of testing compiler features with a full set of flags is something we should consider avoiding in the future (not this PR). Maybe my wording was too strong suggesting "...I think we shouldn't..." in this PR vs in general. I do think even with a fix to reconstruct all the |
This PR reverts changes to
configure.defaults
from commit 48f7904.The reorganization in
configure.defaults
from commit 48f7904 breaks compilation with the classic build system (configure
/compile
/clean
) with GNU compilers.In the
configure
script, logic to determine whether we need to add-fallow-argument-mismatch
relies on the extraction of the verbatim value ofFFLAGS
for use in compiling a test program. Commit 48f7904 introduced Make variables intoFFLAGS
and these variables aren't expanded when extractingFFLAGS
in the configure script, leading to an invalid set of compiler flags for thegnu_flag_test.F90
test program.