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 731703 - giomodule test misbuilds its test modules as libraries
giomodule test misbuilds its test modules as libraries
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.52.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-06-16 04:45 UTC by Daniel Macks
Modified: 2017-08-03 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use "-module" when building gmodule binaries (1.25 KB, patch)
2014-06-16 05:06 UTC, Daniel Macks
committed Details | Review

Description Daniel Macks 2014-06-16 04:45:10 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.
Comment 1 Daniel Macks 2014-06-16 05:06:50 UTC
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
Comment 2 Daniel Macks 2017-07-24 18:59:15 UTC
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?
Comment 3 Brendan Cully 2017-07-24 23:24:47 UTC
I stumbled on this one too, would love to see it applied. Thanks!
Comment 4 Philip Withnall 2017-07-28 10:21:07 UTC
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.