After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756658 - exposes symbols which are not part of the public API
exposes symbols which are not part of the public API
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-15 17:26 UTC by Michael Biebl
Modified: 2015-10-19 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make check -k log (38.77 KB, text/x-log)
2015-10-17 22:57 UTC, Michael Biebl
Details

Description Michael Biebl 2015-10-15 17:26:17 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
Comment 1 David King 2015-10-16 10:14:15 UTC
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.
Comment 2 David King 2015-10-16 13:50:45 UTC
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?
Comment 3 Michael Biebl 2015-10-17 22:56:29 UTC
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.
Comment 4 Michael Biebl 2015-10-17 22:57:37 UTC
Created attachment 313595 [details]
make check -k log
Comment 5 David King 2015-10-19 09:02:32 UTC
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.
Comment 6 Michael Biebl 2015-10-19 11:45:16 UTC
Those private symbols should be moved to a private library. You could e.g. use libyelpcommon for that.
Comment 7 David King 2015-10-19 12:07:03 UTC
I pushed another commit for using those symbols from the tests, so this seems fixed now.
Comment 8 Michael Biebl 2015-10-19 12:15:31 UTC
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.
Comment 9 David King 2015-10-19 12:26:55 UTC
(In reply to Michael Biebl from comment #8)
> still getting build failures in the tests

I cannot reproduce that, unfortunately.