[LV2] Confusion between dylib on macOS
Robin Gareus
robin at gareus.org
Fri Aug 14 08:24:20 PDT 2020
On 8/14/20 4:57 PM, Pierre Guillot wrote:
> I tried to debug and it seems that even if the DAW found PluginB
> (using the ttl files), when it tries to load this second plugin (PluginB),
> it uses the dynamic library that has been previously loaded (PluginA.dylib)
Bonjour Pierre,
I have not yet looked into your specific issue, but I have experienced
similar problems in the past.
macOS linker is somewhat special. The following two are the most common
problems with plugins:
OSX and macOS have flat global namespace of symbols. So you need to make
sure that the library does not expose any, except the entry (CFLAGS
-fvisibiliy-hidden, and declare functions as static whenever possible).
If a library symbol is already present, the same symbol from another
library is ignored and the already existing method is used. (That's also
true on Linux, but Linux does not have a flat namespace.)
You may also have to provide a unique name to the library of each
Plugin<N> using "install-name-tool", check with `otool - PluginA.dylib`.
If you have multiple libraries with the install-name, you may run into
issues.
HTH,
robin
More information about the Devel
mailing list