ITADN

g++ on MacOS cannot use OpenMP

#32733Openhrittich 创建于 2026-03-25
bug
H
hrittichcommented
### Bug: ## Description Trying to compile a C++ program with the conda forge gcc on MacOS that includes the `omp.h` header results in a compilation error. ## Steps to Reproduce Use a micromamba that is configured to use the conda forge channel. ```bash micromamba create -n test-gcc gxx micromamba activate test-gcc ``` Create a file `test.cpp` with the following content. ```c++ #include <omp.h> int main(int argc, char* argv[]) { return 0; } ``` Then run ```bash g++ -fopenmp test.cpp ``` This should result in the following error message. ```plain In file included from test.cpp:1: /Users/myuser/.micromamba/envs/test-gcc/lib/gcc/arm64-apple-darwin20.0.0/15.2.0/include/omp.h:438:10: fatal error: bits/functexcept.h: No such file or directory 438 | #include <bits/functexcept.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. ```
2 条评论