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 762176 - `make check` throws linking error when making GIMarshallingTests-1.0.gir on OS X
`make check` throws linking error when making GIMarshallingTests-1.0.gir on OS X
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Mac OS
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-17 10:48 UTC by Cosimo Lupo
Modified: 2017-03-21 08:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update Makefile for building tests on OS X (5.22 KB, patch)
2016-02-23 07:40 UTC, Simon Feltman
none Details | Review
Update Makefile for building tests on OS X (5.81 KB, patch)
2017-03-21 08:01 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Cosimo Lupo 2016-02-17 10:48:15 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
Comment 1 Christoph Reiter (lazka) 2016-02-17 11:23:38 UTC
Thanks for the report.

I can reproduce using jhbuild on 10.11.
Comment 2 Simon Feltman 2016-02-23 07:40:27 UTC
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.
Comment 3 Christoph Reiter (lazka) 2017-03-21 08:01:30 UTC
Created attachment 348378 [details] [review]
Update Makefile for building tests on OS X

synced with master
Comment 4 Christoph Reiter (lazka) 2017-03-21 08:07:16 UTC
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.