Fix: lib: expose bt_lib_log_level symbol
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 6 Jun 2019 18:57:13 +0000 (14:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:22 +0000 (17:24 -0400)
commitb30414d8d92929156a927903e4e63d9d68a72271
treed30129859dfda7071e2edb2de6521c36650e0fbf
parent13690ddfdd6714e97e44dd3bdd3c4f3a05adeede
Fix: lib: expose bt_lib_log_level symbol

The Python plugin provider does not work.  It fails to be loaded:

    $ ./cli/babeltrace -v list-plugins --plugin-path /tmp/python
    ...
    06-06 15:03:51.883 13378 13378 I PLUGIN init_python_plugin_provider@plugin.c:80 Cannot open `libbabeltrace-python-plugin-provider.so`: /home/smarchi/build/babeltrace/python-plugin-provider/.libs/libbabeltrace-python-plugin-provider.so: undefined symbol: bt_lib_log_level: continuing without Python plugin support.
    ...

The Python plugin provider is built as a .so separate from the main
libbabeltrace.so lib.  However, it uses the logging system of the lib,
including the bt_lib_log_level symbol.  This symbol is currently not
exposed to other shared objects because it is marked as BT_HIDDEN.
Remove BT_HIDDEN to make the symbol visible to the python plugin
provider shared object.

Now that the Python bindings are merged, re-enable the Python plugin
provider test, which exposes the problem.

Note that the Python plugin provider is built as a separate .so for
packaging purposes (so it can be distributed separately), but is still
considered part of the lib.  This is why it is allowed to include and
use internal lib things.

Reported-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I716ae2eb6e2457c7a4f130a394f97391d56454e4
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1388
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
lib/logging.c
tests/python-plugin-provider/test_python_plugin_provider.py
This page took 0.024545 seconds and 4 git commands to generate.