[Bug 222858] Clang doesn't find <omp.h> and libomp.so when compiling with -fopenmp
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Oct 8 11:25:40 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222858
Bug ID: 222858
Summary: Clang doesn't find <omp.h> and libomp.so when
compiling with -fopenmp
Product: Base System
Version: 11.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: misc
Assignee: freebsd-bugs at FreeBSD.org
Reporter: equilibrium556 at gmx.de
Created attachment 186994
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=186994&action=edit
OpenMP C test file
Trying to compile C code that utilizes OpenMP with Clang on FreeBSD 11.1
results in some compiler/linker errors:
Trying to compile with:
clang -o openmp_test openmp_test.c -fopenmp
openmp_test.c:1:10: fatal error: 'omp.h' file not found
It is located in /usr/local/include (openmp package) though
Trying again to compile with:
clang -o openmp_test openmp_test.c -fopenmp -I/usr/local/include
/usr/bin/ld: cannot find -lomp
It is located in /usr/local/lib (openmp package)
Finally, it compiles with:
clang -o openmp_test openmp_test.c -fopenmp -I/usr/local/include
-L/usr/local/lib
Shouldn't it add the right search paths for OpenMP from the get-go when issuing
-fopenmp?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list