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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 6 Jun 2019 23:12:28 +0000 (19:12 -0400)
commit1d9f0512b3d9f9fa03864bd14c52e492be84db80
treec115421a467270151d760ab0b49cb5e0bf4ada63
parent9ab3856077ba4fca0fabd7ddbdfcca965b37c5d1
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.024657 seconds and 4 git commands to generate.