GCC 15.1 doesn't like to include omp.h from C++ in an extern "C" region.
However, there is a (unrequired?) #include <omp.h> in blis/blis.h in my installation.
Error message when using blis:
/scratch/spack-25.2/opt/spack/linux-x86_64_v3/gcc-15.1.0-5n4zqcajsrnaeg7gaijph7rj54fpp76s/bin/g++ -DBLIS_WORKS -isystem /scratch/spack-25.2/opt/spack/linux-x86_64_v3/blis-1.0-nr2wasqmkindwiihhqfsivd7mahspgx7/include/blis -std=gnu
In file included from ./frame/thread//bli_thrcomm_openmp.h:44,
from /home/zoel_ml/tartarus/build/CMakeFiles/CMakeScratch/TryCompile-HUaHcl/src.cxx:1:
/scratch/spack-25.2/opt/spack/linux-x86_64_v3/gcc-15.1.0-5n4zqcajsrnaeg7gaijph7rj54fpp76s/lib/gcc/x86_64-pc-linux-gnu/15.1.0/include/omp.h:448:1: error: template with C linkage
448 | template<typename __T, omp_allocator_handle_t __Handle>
| ^~~~~~~~
Minimal example to demonstrate this behavior in a C++ file:
// works
//#include <omp.h>
// does not work
extern "C" {
#include <omp.h>
}
GCC 15.1 doesn't like to include omp.h from C++ in an
extern "C"region.However, there is a (unrequired?)
#include <omp.h>inblis/blis.hin my installation.Error message when using blis:
Minimal example to demonstrate this behavior in a C++ file: