can you try to link the plugin with option: -Bsymbolic ?
"When creating a shared library, bind references to global symbols to the definition within the shared library, if any. Normally, it is possible for a program linked against a shared library to override the definition within the shared library. This option is only meaningful on ELF platforms which support shared libraries. "
This informs the dlopen (at loading time) function to use at first the local symbol for resolving map before using the ones already defined in the app or previous loaded libraries,.
Not sure that it will avoid the ODR violation…
What we need is something like on Mac the option -r :
" Save the relocation information in the output file so that it can be the subject of another ld run. The resulting file type is a Mach-O relocatable file (MH_OBJECT) if not otherwise specified. This flag also prevents final definitions from being given to common symbols, and suppresses the `undefined symbol’ diagnostics. "
need more investigation…
as workaround for now if we are sure that we have the same definition for the duplicate, we could skip this error…