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

Issue while building #91

Open
lucas0 opened this issue Jun 22, 2016 · 1 comment
Open

Issue while building #91

lucas0 opened this issue Jun 22, 2016 · 1 comment

Comments

@lucas0
Copy link

lucas0 commented Jun 22, 2016

Hello,

I've git cloned, but cannot run cmake -G 'Unix Makefiles' i get this on CMakeFiles/CMakeError.log:

Performing C SOURCE FILE Test OpenMP_FLAG_DETECTED failed with the following output:
Change Dir: /Users/Lucas/Developer/JAMR/tools/cdec/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_25822/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_25822.dir/build.make CMakeFiles/cmTC_25822.dir/build
Building C object CMakeFiles/cmTC_25822.dir/src.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc    -DOpenMP_FLAG_DETECTED -fopenmp   -o CMakeFiles/cmTC_25$
/Users/Lucas/Developer/JAMR/tools/cdec/CMakeFiles/CMakeTmp/src.c:2:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^
1 error generated.
make[1]: *** [CMakeFiles/cmTC_25822.dir/src.c.o] Error 1
make: *** [cmTC_25822/fast] Error 2

Source file was:

#include <omp.h>
int main() {
#ifdef _OPENMP
  return 0;
#else
  breaks_on_purpose
#endif
}

Does anyone knows how to solve this?
Regards,
Lucas.

@jonsafari
Copy link

It's because your'e on a Mac. For older versions of Xcode (before Clang 3.7+), you used to be able to use Homebrew to install a version of Clang that supports OpenMP:

brew update && brew install clang-omp
make CC=clang-omp

El Capitan does include a recent version of Clang. I don't know if that would address this problem, since I don't have a Mac.

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

2 participants