[Openmp-commits] [PATCH] D142378: [OpenMP][Archer] Use dlsym rather than weak symbols for TSan annotations

Slava Zakharin via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 24 09:42:21 PST 2023


vzakhari added a comment.

This breaks my build.  It looks like `CMAKE_DL_LIBS` dependency is missing:

  CMakeFiles/archer.dir/ompt-tsan.cpp.o: In function `ompt_start_tool':
  ompt-tsan.cpp:(.text.ompt_start_tool+0x55): undefined reference to `dlsym'
  CMakeFiles/archer.dir/ompt-tsan.cpp.o: In function `ompt_tsan_initialize(void (*(*)(char const*))(), int, ompt_data_t*)':
  ompt-tsan.cpp:(.text._ZL20ompt_tsan_initializePFPFvvEPKcEiP11ompt_data_t+0x277): undefined reference to `dlsym'
  ompt-tsan.cpp:(.text._ZL20ompt_tsan_initializePFPFvvEPKcEiP11ompt_data_t+0x295): undefined reference to `dlsym'
  ompt-tsan.cpp:(.text._ZL20ompt_tsan_initializePFPFvvEPKcEiP11ompt_data_t+0x2b3): undefined reference to `dlsym'
  ompt-tsan.cpp:(.text._ZL20ompt_tsan_initializePFPFvvEPKcEiP11ompt_data_t+0x2d1): undefined reference to `dlsym'
  CMakeFiles/archer.dir/ompt-tsan.cpp.o:ompt-tsan.cpp:(.text._ZL20ompt_tsan_initializePFPFvvEPKcEiP11ompt_data_t+0x2ef): more undefined references to `dlsym' follow
  collect2: error: ld returned 1 exit status


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142378/new/

https://reviews.llvm.org/D142378



More information about the Openmp-commits mailing list