Date: Sun, 08 Oct 2017 11:25:39 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 222858] Clang doesn't find <omp.h> and libomp.so when compiling with -fopenmp Message-ID: <bug-222858-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222858 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@FreeBSD.org Reporter: equilibrium556@gmx.de Created attachment 186994 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D186994&action= =3Dedit 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 iss= uing -fopenmp? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222858-8>