lib/plugin/plugin.c: do not use G_MODULE_BIND_LOCAL for Python plugin provider
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Aug 2017 20:37:42 +0000 (16:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Aug 2017 22:54:16 +0000 (18:54 -0400)
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>
lib/plugin/plugin.c

index 2a76815cdccf0a2618d4d3e0f31567f3b509d52a..b53c6b9e8573703f41f7eaaba160d35fb45b4d72 100644 (file)
@@ -69,8 +69,7 @@ __attribute__((constructor)) static
 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);
This page took 0.026922 seconds and 4 git commands to generate.