[Openmp-dev] Can OMPT component be statically linked to an application
Joachim Protze via Openmp-dev
openmp-dev at lists.llvm.org
Mon Oct 1 00:49:42 PDT 2018
Thanks, for reporting this. The error you listed below, does this come
from OpenMP repository or from your project?
You can link statically, but still need to link libdl (-ldl).
To turn off OMPT completely: -DLIBOMP_OMPT_SUPPORT=off
On 10/01/2018 09:37 AM, Itaru Kitayama via Openmp-dev wrote:
> I'm trying to link my app statically with the upstream LLVM/Clang, but
> I get this at the last stage:
> [100%] Linking CXX executable nest
> In function `sem_open':
> (.text+0x7810): warning: the use of `mktemp' is dangerous, better use
> In function `ompt_start_tool':
> undefined reference to `dlsym'
> In function `ompt_try_start_tool(unsigned int, char const*)':
> ompt-general.cpp:(.text+0xf00): undefined reference to `dlopen'
> ompt-general.cpp:(.text+0xf20): undefined reference to `dlsym'
> clang-8: error: linker command failed with exit code 1 (use -v to see
> make: *** [nest/CMakeFiles/nest.dir/build.make:135: nest/nest] Error 1
> make: *** [CMakeFiles/Makefile2:735: nest/CMakeFiles/nest.dir/all]
> Error 2
> make: *** [CMakeFiles/Makefile2:747: nest/CMakeFiles/nest.dir/rule]
> Error 2
> make: *** [Makefile:364: nest] Error 2
> I'm building a tool placing openmp and clang under projects and tools
> respectively under the top llvm directory. Any way to disable the OMPT
> completely as currently it is underdevelopment and have no interest in
> using it at the moment.
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
More information about the Openmp-dev