Skip to content

catalyst_api: load libraries into the global space on ELF platforms

Ben Boeckel requested to merge ben.boeckel/catalyst:dlopen-scope-flag into master

Apple is OK with RTLD_LOCAL, but on Linux, loading a library with RTLD_LOCAL applies to transitive libraries as well. Given the following linking setup:

libcatalyst-foo.so -> libbar.so -> libshared.so -> libfoo.so -> libshared.so

with RTLD_LOCAL, libbar.so and libshared.so are loaded into a private namespace. When libfoo.so is then loaded, it sees that libshared.so is private and isn't accessible which causes it to complain about it missing symbols from libshared.so. Just use RTLD_GLOBAL to avoid this problem.

See: paraview#20816 (closed)

Merge request reports

Loading