This fixes static builds of openmp. They currently
fail at runtime because of an "undefined symbol"
error. dlsym is only available for dynamic builds.
Details
- Reviewers
jdoerfert hbae AndreyChurbanov huntergr
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Which platform has the problem? Static build does not preclude linking libdl, which will provide dlsym. So, an alternative solution might be to link libdl for the static library?
kmp_ftn_entry.h uses the same function in several places. No issues there?
openmp/runtime/src/kmp_alloc.cpp | ||
---|---|---|
1364 | This variable should at least be set to 0/false |
The issue was detected on Linux, AArch64.
Other calls to dlsym in kmp_alloc.cpp are already protected by that define, which is why i thought it made sense to do the same here.
It seems that kmp_ftn_entry.h was not included in my build. I'll go through the CMake files to see what happened.
Thanks
kmp_ftn_entry.h provides the implementation for all OpenMP API functions. I'm curious to see what happened, that it is not included.
Hi!
Sorry for the delay, i had a couple of concurrent tasks.
kmp_ftn_entry.h was indeed included, i had just looked at it wrong. Also, we are going to follow your suggestion and link against libdl, so this patch is no longer needed
Thanks for the review!
This variable should at least be set to 0/false