This fixes static builds of openmp. They currently
fail at runtime because of an "undefined symbol"
error. dlsym is only available for dynamic builds.
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?
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.
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!