From c92fb666a258aa91f1a5754cd6e32c96783cd80b Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 8 Aug 2017 16:37:42 -0400 Subject: [PATCH] lib/plugin/plugin.c: do not use G_MODULE_BIND_LOCAL for Python plugin provider MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jérémie Galarneau --- lib/plugin/plugin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/plugin/plugin.c b/lib/plugin/plugin.c index 2a76815c..b53c6b9e 100644 --- a/lib/plugin/plugin.c +++ b/lib/plugin/plugin.c @@ -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); -- 2.34.1