GNOME Bugzilla – Bug 731703
giomodule test misbuilds its test modules as libraries
Last modified: 2017-08-03 11:30:42 UTC
glib-2.40.0 on OS X 10.8 failed the gio/tests/giomodule self-test: GLib-GIO:ERROR:giomodule.c:88:test_module_scan_all: assertion failed (g_list_length (list) == 2): (0 == 2) It uses g_io_modules_scan_all_in_directory() to check for available modules in the modules/ and modules/.libs subdirs, where the modules/Makefile.am specifies libtestmodulea.la and libtestmoduleb.la to have been compiled. I do have those .la, but libtool built the actual binaries there as .dylib (linker libraries) not .so (loadable modules), and glib defines .so as the module extension on my platform (in agreement with libtool). The makefile needs to pass -module in order to instruct libtool to build modules, so that the glib module loader will be able to recognize them as such.
Created attachment 278511 [details] [review] Use "-module" when building gmodule binaries Previously: PASS: giomodule 1 /giomodule/extension-point ERROR: giomodule - missing test plan ERROR: giomodule - exited with status 134 (terminated by signal 6?) With this patch: PASS: giomodule 1 /giomodule/extension-point PASS: giomodule 2 /giomodule/module-scan-all PASS: giomodule 3 /giomodule/module-scan-all-with-scope
This is still broken as of glib-2.52.3 and OS X 10.12. The patch/fix is trivial. Could a developer please comment here?
I stumbled on this one too, would love to see it applied. Thanks!
Review of attachment 278511 [details] [review]: This looks good to me. I can’t push it at the moment (don’t have access to my SSH keys here), but hopefully someone else can.