GNOME Bugzilla – Bug 762176
`make check` throws linking error when making GIMarshallingTests-1.0.gir on OS X
Last modified: 2017-03-21 08:07:16 UTC
I tried to compile and run the test suite of PyGobject on my OS X 10.10 machine, but when I do `make check` I get the error attached below. I cloned the repository from the GitHub mirror: https://github.com/GNOME/pygobject I have installed all pygobject dependencies via homebrew: - glib 2.46.2 - gobject-introspection 1.46.0 - py2cairo 1.10.0 - libffi 3.0.13 I am using Python 2.7.11 from brew. I run ./configure --with-python=python2.7 && make, and everything compiles correctly. But when I try to run the tests it stops here: ``` GEN GIMarshallingTests-1.0.gir g-ir-scanner: link: ../libtool --mode=link --tag=CC clang -o /Users/cosimolupo/Documents/Github/pygobject/tests/tmp-introspecteBNJjR/GIMarshallingTests-1.0 -export-dynamic tmp-introspecteBNJjR/Users/cosimolupo/Documents/Github/pygobject/tests/tmp-introspecteBNJjR/GIMarshallingTests-1.0.o -L. libgimarshallingtests.la -L/usr/local/Cellar/glib/2.46.2/lib -L/usr/local/opt/gettext/lib -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl *** Warning: Linking the executable /Users/cosimolupo/Documents/Github/pygobject/tests/tmp-introspecteBNJjR/GIMarshallingTests-1.0 against the loadable module *** libgimarshallingtests.so is not portable! *** Warning: lib libgimarshallingtests.so is a module, not a shared library *** And there doesn't seem to be a static archive available *** The link will probably fail, sorry libtool: link: clang -o /Users/cosimolupo/Documents/Github/pygobject/tests/tmp-introspecteBNJjR/.libs/GIMarshallingTests-1.0 tmp-introspecteBNJjR/Users/cosimolupo/Documents/Github/pygobject/tests/tmp-introspecteBNJjR/GIMarshallingTests-1.0.o -L. ./.libs/libgimarshallingtests.so -L/usr/local/Cellar/glib/2.46.2/lib -L/usr/local/opt/gettext/lib -lgthread-2.0 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file './.libs/libgimarshallingtests.so' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) linking of temporary binary failed: Command '['../libtool', '--mode=link', '--tag=CC', 'clang', '-o', '/Users/cosimolupo/Documents/Github/pygobject/tests/tmp-introspecteBNJjR/GIMarshallingTests-1.0', '-export-dynamic', 'tmp-introspecteBNJjR/Users/cosimolupo/Documents/Github/pygobject/tests/tmp-introspecteBNJjR/GIMarshallingTests-1.0.o', '-L.', 'libgimarshallingtests.la', '-L/usr/local/Cellar/glib/2.46.2/lib', '-L/usr/local/opt/gettext/lib', '-lgio-2.0', '-lgobject-2.0', '-lgmodule-2.0', '-lglib-2.0', '-lintl']' returned non-zero exit status 1 make[2]: *** [GIMarshallingTests-1.0.gir] Error 1 make[1]: *** [check-am] Error 2 make: *** [check-recursive] Error 1 ``` Any clues? Thank you in advance. Cosimo
Thanks for the report. I can reproduce using jhbuild on 10.11.
Created attachment 321924 [details] [review] Update Makefile for building tests on OS X This fixes the building of test dependencies on OS X. However, I experience crashes with the tests once the build is workable.
Created attachment 348378 [details] [review] Update Makefile for building tests on OS X synced with master
Tested on macOS 10.11 and pushed to master. make check fails now because of the missing dbus-run-session executable and when commenting that out the test suite crashes due to some gtk+ bugs. The dbus stuff also needs to be fixed for Windows, and for the crashing tests it's probably best to try skipping them on macOS first.