[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 Adriaan de Groot changed: What|Removed |Added Resolution|--- |DUPLICATE Status|New |Closed --- Comment #8 from Adriaan de Groot --- I'm going to merge this one with PR 223678. Over there, I have a patched FindOpenMP (I'll refresh the patches in a moment) that successfully builds (and runs) the test case on 12.0-R with clang60, clang70 and base clang. *** This bug has been marked as a duplicate of bug 223678 *** -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 --- Comment #7 from Adriaan de Groot --- The changes posted in PR 223678 don't help at all with clang++70. I notice that when it links, (e.g. through `make VERBOSE=1`) no openmp flags are passed to the compiler (linker) at all. If I copy the command used and insert `-fopenmp`, then the final link step completes properly. So with clang++70, **something** eats the flags which doesn't happen with base clang (it also happens with clang++60, for instance). -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 Adriaan de Groot changed: What|Removed |Added CC||adr...@freebsd.org Assignee|ports-b...@freebsd.org |k...@freebsd.org --- Comment #6 from Adriaan de Groot --- Both PR 234050 and PR 223678 need someone to chase what CMake is doing exactly -- you may find the cmake flags --debug-trycompile and --trace useful -- and to propose a patch. This isn't something we have time for right now. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 --- Comment #5 from Rainer Hurling --- (In reply to Yuri Victorovich from comment #4) Hi Yuri, Sorry for the long delay. You are right, the testcase fails for clang70. But this is also true for clang60 (at least on HEAD), which is only in ports, not in base any more. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 --- Comment #4 from Yuri Victorovich --- Created attachment 200160 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=200160&action=edit testcase-broken-OpenMP-detection.shar (In reply to Rainer Hurling from comment #3) Hi Rainer, I'm attaching the testcase that demonstrates that OpenMP detection is broken with clang70. 1. Extract the attached case: sh testcase-broken-OpenMP-detection.shar 2. cd testcase-broken-OpenMP-detection 3. sh run 4. Observe the failure: helloworld.cpp:(.text+0x2d): undefined reference to `__kmpc_fork_call' It closely follows the recommended way: https://cliutils.gitlab.io/modern-cmake/chapters/packages/OpenMP.html Yuri -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 Rainer Hurling changed: What|Removed |Added CC||rhur...@gwdg.de --- Comment #3 from Rainer Hurling --- Hi Yuri, Don't know, if I understand you right. In math/saga[1] I use the following to find libomp.so of clang60: # lines 65-67, and 71-72 CPP=clang-cpp60 CC= clang60 CXX=clang++60 CONFIGURE_ENABLE= openmp LDFLAGS=-L${LOCALBASE}/lib -lm -L${LOCALBASE}/llvm60/lib -lomp This also works also pretty nice for clang70. [1] https://svnweb.freebsd.org/ports/head/math/saga/Makefile?revision=487272&view=markup -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 --- Comment #2 from Yuri Victorovich --- Small correction: cmake says that it has found OpenMP, but it doesn't contain the proper libomp.so anywhere in the resulting cmake variables. Removing OpenMP from devel/llvm70 might be one possible solution. (Why was it added there anyway?) -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 --- Comment #1 from Yuri Victorovich --- See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug 234050] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050 Bug ID: 234050 Summary: devel/cmake: find_package(OpenMP) doesn't find the openmp package (when clang from devel/llvm70 is used) Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-b...@freebsd.org Reporter: y...@freebsd.org CC: bro...@freebsd.org, k...@freebsd.org CC: bro...@freebsd.org, k...@freebsd.org llvm70 contains OpenMP, and it isn't properly found by find_package(OpenMP). Testcase: In the port math/combblas of rev.487559 remove the line LDFLAGS+=... Build of the port now fails because libomp.so isn't found, see log below. I think this is a regression with llbm70, I don't recall this happening with llvm60. ---log--- && /usr/local/bin/clang++70 -O2 -pipe -fno-omit-frame-pointer -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer -isystem /usr/local/include -O2 -pipe -fno-omit-frame-pointer -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer -isystem /usr/local/include -fstack-protector -L/usr/local/lib ReleaseTests/CMakeFiles/IndexingTest.dir/IndexingTest.cpp.o -o ReleaseTests/IndexingTest -Wl,-rpath,/usr/ports/math/combblas/work/.build:/usr/ports/math/combblas/work/.build/usort:/usr/ports/math/combblas/work/.build/graph500-1.2/generator libCombBLAS.so.1.16.0 -Wl,-rpath=/usr/local/lib/gcc7 -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib/gcc7 /usr/local/lib/libmpicxx.so /usr/local/lib/libmpi.so usort/libUsortlib.so graph500-1.2/generator/libGraphGenlib.so && : ReleaseTests/CMakeFiles/IndexingTest.dir/IndexingTest.cpp.o: In function `.omp_outlined.': IndexingTest.cpp:(.text+0x35d3): undefined reference to `__kmpc_global_thread_num' IndexingTest.cpp:(.text+0x362b): undefined reference to `__kmpc_for_static_init_4' -- You are receiving this mail because: You are on the CC list for the bug.