-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Test suite fails when using GCC 10 #7017
Comments
The MSYS2 jobs in CI show this error now since the update to GCC 10. |
since it affects fortran @scivision do you have any idea what's wrong here? |
The code put in testfile.f90 isn't a full test if OpenMP is truly linkable. GCC 10 and in particular Gfortran 10 got a lot stricter about invalid code, and this appears ripe for updating anyway. Old Meson codedoesn't work with #ifdef __has_include
#if !__has_include("omp.h")
#error "Header \'omp.h\' could not be found"
#endif
#else
#include <omp.h>
#endif Fortran-specific stanza for detecting if OpenMP is available and linkableIn general I strongly prefer tests like this, because in general users may have multiple compilers and OpenMP libraries installed, which are not necessarily ABI compatible. This brief test gives higher confidence that an ABI-compatible set is found. use omp_lib ! tests that OpenMP is included
implicit none
!$ integer :: N ! OpenMP reads lines starting like this
N = omp_get_num_threads() ! tests that OpenMP is linked this shorter test is not as complete, but is still more thorough than the original Meson code: use omp_lib |
If this is suitable, one would slightly modify the Meson code to swap in this stanza in if the language is Fortran. I can do this if others agree. |
From what I see this is just the output of the generic has_header, maybe called from meson/mesonbuild/dependencies/misc.py Line 98 in 402f7af
|
The main bug to solve is that |
__has_include is not accepted as a pre-processor directive in Fortran code since GCC 10. Closes #7017
#7136 fixes it. |
__has_include is not accepted as a pre-processor directive in Fortran code since GCC 10. Closes #7017
__has_include is not accepted as a pre-processor directive in Fortran code since GCC 10. Closes #7017
Describe the bug
GCC10 is nearing release and various distros are sarting preparation work. Meson's test suite has been identified as a component that is failing when using gcc19
Expected behavior
A passing test suite - irrespective of the use of gcc100
system parameters
Always latest build log available at: https://build.opensuse.org/build/openSUSE:Factory:Staging:N/standard/x86_64/meson:test/_log
The text was updated successfully, but these errors were encountered: