It seems the devel/llvm50 port does not install libomp.so as needed for OpenMP support in difference to devel/llvm40. I.e., %%OPENMP%%llvm%%LLVM_LIB_VER%%/lib/libomp.so is missing from pkg-plist. Which means for me it picks up (wrongly) the libomp installed by devel/openmp which causes this: $ /usr/local/llvm50/bin/clang++ -fopenmp -o omp omp.cpp /usr/lib/libomp.so: undefined reference to `pthread_attr_getstack' /usr/lib/libomp.so: undefined reference to `pthread_create' /usr/lib/libomp.so: undefined reference to `pthread_attr_get_np' /usr/lib/libomp.so: undefined reference to `pthread_condattr_init' clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
A commit references this bug: Author: brooks Date: Sat Oct 14 23:38:32 UTC 2017 New revision: 452094 URL: https://svnweb.freebsd.org/changeset/ports/452094 Log: Put openmp in the right place so it is built and installed. PR: 222727 Changes: head/devel/llvm50/Makefile head/devel/llvm50/files/openmp-patch-bug32279 head/devel/llvm50/pkg-plist