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 723862 - Add support for universal builds with fat libraries
Add support for universal builds with fat libraries
Status: RESOLVED WONTFIX
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Mac OS
: Normal enhancement
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 731001 731002 731003 731004
 
 
Reported: 2014-02-07 16:23 UTC by Andoni Morales
Modified: 2018-01-24 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
config: add support to set typelib and gir installations dirs (1.57 KB, patch)
2014-04-09 11:18 UTC, Andoni Morales
none Details | Review
add support to set custom gir and typelib dirs (7.06 KB, patch)
2014-05-30 15:26 UTC, Andoni Morales
none Details | Review
add support to set custom gir and typelib dirs (9.08 KB, patch)
2014-05-30 16:49 UTC, Andoni Morales
none Details | Review

Description Andoni Morales 2014-02-07 16:23:14 UTC
Universal builds in OS X with fat libraries uses a common typelibdir for all the architectures. GIRepository could add an architecture subdir to the default search path:

typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL);
typelib_arch_dir = g_build_filename (libdir, "girepository-1.0", arch_str, NULL);
search_path = g_slist_prepend (search_path, typelib_dir);
search_path = g_slist_prepend (search_path, typelib_arch_dir);

Another option would be to include the architecture in the typelib filename, eg: GObject-2.0.i386.typelib GObject-2.0.x86_64.typelib

Any thoughts?
Comment 1 Andoni Morales 2014-04-09 11:18:47 UTC
Created attachment 273881 [details] [review]
config: add support to set typelib and gir installations dirs
Comment 2 Andoni Morales 2014-04-09 11:19:02 UTC
I have a simpler approach using configure options to set the typelib and gir directories --with-typelib-dir and --with-gir-dir.

In universal builds both architectures can be built separately and merged into a fat library. The prosed solution consists in building each architecture using a different directory for typelib's and gir's with the architecture in the path.

x86_64: --with-typelib-dir=$PREFIX/lib/x86_64
x86:    --with-typelib-dir=$PREFIX/lib/x86

Since this path uses the configure define GOBJECT_INTROSPECTION_LIBDIR to build the default search path, when the x86_64 is loaded it will look for typelibs in $PREFIX/lib/x86_64/girepository-1.0
Comment 3 Andoni Morales 2014-05-30 15:26:46 UTC
Created attachment 277564 [details] [review]
add support to set custom gir and typelib dirs

a simpler approach that uses typelib-suffix and gir-suffix to preserve datadir
Comment 4 Andoni Morales 2014-05-30 16:49:48 UTC
Created attachment 277573 [details] [review]
add support to set custom gir and typelib dirs

Add INTROSPECTION_GIRSUFFIX and INTROSPECTION_TYPELIBSUFFIX in _GOBJECT_INTROSPECTION_CHECK_INTERNAL macro so it can be used to set:

typelibsdir = $(datadir)/$(INTROSPECTION_TYPELIBSUFFIX)
Comment 5 André Klapper 2015-02-07 17:14:36 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 6 Emmanuele Bassi (:ebassi) 2018-01-24 18:40:09 UTC
Considering that 32 bits architectures are going away, and that Apple is phasing out fat binaries, I think it's safe to say this is not going to happen.