From: Philippe Proulx Date: Tue, 8 Aug 2017 20:37:42 +0000 (-0400) Subject: lib/plugin/plugin.c: do not use G_MODULE_BIND_LOCAL for Python plugin provider X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=c92fb666a258aa91f1a5754cd6e32c96783cd80b lib/plugin/plugin.c: do not use G_MODULE_BIND_LOCAL for Python plugin provider 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 --- 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);