[cfe-dev] OpenMP issue

Alexey Bataev via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 22 15:57:44 PST 2019


You need libomp. Also, probably, you need to specify the path to the omp.h file when you invoke the compiler

Best regards,
Alexey Bataev

> 22 янв. 2019 г., в 17:19, Jeffrey Walton via cfe-dev <cfe-dev at lists.llvm.org> написал(а):
> 
> Hi Everyone,
> 
> In case you are still seeking feedback
> (https://releases.llvm.org/3.7.0/tools/clang/docs/ReleaseNotes.html#openmp-support)
> :
> 
> CXX=clang++ CXXFLAGS="-DNDEBUG -g2 -O3 -fopenmp=libomp" make -j 4
> ...
> 
> clang++ -DNDEBUG -g2 -O3 -fopenmp=libomp -DCRYPTOPP_DISABLE_MIXED_ASM
> -fPIC -pthread -pipe -c nbtheory.cpp
> 
> nbtheory.cpp:16:11: fatal error: 'omp.h' file not found
> # include <omp.h>
>          ^~~~~~~
> 1 error generated.
> make: *** [GNUmakefile:1587: nbtheory.o] Error 1
> 
> $ cat nbtheory.cpp
> ...
> #ifdef _OPENMP
> # include <omp.h>
> #endif
> ...
> 
> Finally,
> 
> $ clang++ --version
> clang version 6.0.1 (tags/RELEASE_601/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /bin
> 
> And:
> 
> $ clang++ --version
> clang version 6.0.1 (tags/RELEASE_601/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /bin
> 
> $ lsb_release -a
> LSB Version:    :core-4.1-amd64:core-4.1-noarch
> Distributor ID: Fedora
> Description:    Fedora release 28 (Twenty Eight)
> Release:        28
> Codename:       TwentyEight
> 
> GCC, ICC, MSVC, IBM XLC and SunCC are OK.
> 
> Jeff
> 


More information about the cfe-dev mailing list