Using g_module_open() with the G_MODULE_BIND_LOCAL flag when loading the
Python plugin provider makes it impossible for _native_bt.so (the Python
module, part of the `bt2` package, generated by SWIG) to find libpython
symbols because the Python plugin provider is linked with libpython, not
_native_bt.so.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
void init_python_plugin_provider(void) {
BT_LOGD_STR("Loading Python plugin provider module.");
python_plugin_provider_module =
- g_module_open(PYTHON_PLUGIN_PROVIDER_FILENAME,
- G_MODULE_BIND_LOCAL);
+ g_module_open(PYTHON_PLUGIN_PROVIDER_FILENAME, 0);
if (!python_plugin_provider_module) {
BT_LOGI("Cannot find `%s`: continuing without Python plugin support.",
PYTHON_PLUGIN_PROVIDER_FILENAME);