GNOME Bugzilla – Bug 756658
exposes symbols which are not part of the public API
Last modified: 2015-10-19 12:26:55 UTC
This is a re-iteration of https://bugzilla.gnome.org/show_bug.cgi?id=720577 libyelp exposes the following symbols, which are not part of the public API: yelp_bz2_decompressor_get_type yelp_bz2_decompressor_new yelp_debug yelp_error_copy yelp_error_get_title yelp_info_parse_menu yelp_info_parser_parse_file yelp_info_parser_parse_tree yelp_lzma_decompressor_get_type yelp_lzma_decompressor_new yelp_magic_decompressor_get_type yelp_magic_decompressor_new yelp_man_parser_free yelp_man_parser_new yelp_man_parser_parse_file yelp_marshal_BOOLEAN__OBJECT yelp_marshal_VOID__OBJECT_BOXED
I pushed a few symbol removals, but the rest will probably need a symbol regex (and hence a rename), which will take a bit longer.
I pushed some more changes, which use G_GNUC_INTERNAL (the hidden compiler attribute) so that the marked symbols are not exported. Can you check that no more undesired symbols are exported?
the symbols are correctly hidden now, thanks. But I've run into a couple of issue with that: ./configure --enable-gtk-doc fails to build, as the scanner doesn't find all symbols now. The following change made the build succeed: --- a/docs/libyelp/Makefile.am +++ b/docs/libyelp/Makefile.am @@ -22,15 +22,13 @@ CFILE_GLOB = $(top_srcdir)/libyelp/*.c IGNORE_HFILES = yelp-common-types.h yelp-debug.h yelp-types.h IGNORE_CFILES = -if !ENABLE_LZMA IGNORE_HFILES += $(top_srcdir)/libyelp/yelp-lzma-decompressor.h IGNORE_CFILES += $(top_srcdir)/libyelp/yelp-lzma-decompressor.c -endif -if !ENABLE_BZ2 IGNORE_HFILES += $(top_srcdir)/libyelp/yelp-bz2-decompressor.h IGNORE_CFILES += $(top_srcdir)/libyelp/yelp-bz2-decompressor.c -endif + +IGNORE_HFILES += $(top_srcdir)/libyelp/yelp-magic-decompressor.h MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=yelp --ignore-files='yelp-debug.c yelp-debug.h yelp-types.c yelp-types.h' I.e., we always want to ignore the symbols now. The second problem is, that the test-suite now fails to build, as the test programs use the internal symbols, make check log is attached.
Created attachment 313595 [details] make check -k log
I pushed the gtk-doc fix, but I am not hopeful that I can get the test to build against the internal API without a lot more work, so I will probably revert the symbol removal patches in the next couple of days, and close this as a WONTFIX.
Those private symbols should be moved to a private library. You could e.g. use libyelpcommon for that.
I pushed another commit for using those symbols from the tests, so this seems fixed now.
still getting build failures in the tests CCLD test-settings /usr/bin/ld: test_settings-test-settings.o: undefined reference to symbol 'yelp_settings_set_fonts' CCLD test-uri /usr/bin/ld: test_uri-test-uri.o: undefined reference to symbol 'yelp_uri_get_file' As mentioned, I think moving that private symbols to libyelpcommon and linking the tests against libyelpcommon would be a cleaner solution.
(In reply to Michael Biebl from comment #8) > still getting build failures in the tests I cannot reproduce that, unfortunately.