GNOME Bugzilla – Bug 774453
Changes to make modules build on macOS
Last modified: 2021-05-17 16:04:54 UTC
I've spent some time getting the 3.22 modulesets to build on macOS 10.12. Here are various patches to the modulesets that fix issues I ran into. I've also filed a bunch of patches which I'll add as dependencies of this bug. If you have a copy of macOS and you want to try it out yourself, you need https://github.com/ptomato/macos-jhbuild which has some extra modulesets, the necessary jhbuild configuration, and some instructions. The modulesets: - macos-sysdeps.modules - All the stuff that can be installed as "sysdeps" on other platforms - macos-overrides.modules - Stuff in the normal modulesets that can't be built normally (vala needs to be built from tarball as it needs valac to bootstrap from git, WebKit is just difficult :-P) The jhbuildrc builds 3.22's meta-gnome-devel-platform by default, but I've gotten it to build meta-gnome-extended-devel-platform, gjs, devhelp, and (with almost all dependencies) gnome-builder. I haven't tried 3.24 yet. You will need all the patches that are posted in the bugs that this one depends on (at least, until they are committed.) In addition, you will need - pulseaudio: https://bugs.freedesktop.org/show_bug.cgi?id=98698 - gnome-online-accounts: needs an edit to remove usage of too-new WebKit API
Created attachment 339881 [details] [review] bootstrap: Update sourceforge download URI
Created attachment 339882 [details] [review] bootstrap: Bump gettext It should match the version in the main modulesets.
Created attachment 339883 [details] [review] bootstrap: Update some modules ...to versions that don't have trouble building on macOS
Created attachment 339884 [details] [review] 3.22, 3.24: Add gtk-mac-integration For now added only to 3.22 and 3.24. The modules that use this are, according to code search: glade, gspell, gedit, goffice, and gimp. It's also used by dia but I didn't change that as dia is still on GTK 2.
Created attachment 339885 [details] [review] meta: macOS builds adwaita-icon-theme for platform On macOS, where there is not already an icon theme installed, adwaita-icon-theme should be built as part of meta-gnome-devel-platform.
Created attachment 339886 [details] [review] modules: e-d-s always needs nss and nspr They used to be optional, but since 3.4 they have been required unconditionally.
Created attachment 339887 [details] [review] modules: Disable X11 if not in x11 condition
Created attachment 339888 [details] [review] modules: Require libv4l only on Linux The name Video4Linux says it all, it's not available on BSD or macOS.
Created attachment 339889 [details] [review] modules: libcap is Linux-only As far as I understand, libcap is Linux-specific so shouldn't appear in the freebsd or macos conditions.
Created attachment 339890 [details] [review] modules: Build babl with --disable-sse on Darwin To be honest I'm not sure if this should be in the "macos" condition or the "darwin" condition, but in any case it seems that the SSE instructions are not supported.
Created attachment 339891 [details] [review] modules: vte needs conditional --disable-Bsymbolic For some reason the Bsymbolic linker flags check doesn't autodetect, so we do like several other modules and disable it outside of the "gnu-elf" condition.
Created attachment 339892 [details] [review] modules: Change some things for macos condition - GLib uses internal pcre to avoid a system dependency - We build shared-mime-info, and it depends on GLib, so GLib can't go after it - PackageKit and upower don't have macOS backends - Tools for building Glade and libsecret manpages are not present - CA certificates are accessed through Keychain on macOS, so there is no path to pass to glib-networking's and librest's --with-ca-certificates - Drop p11-glue dependency where optional; it occasionally causes hard-to-track-down problems - No ALSA on macOS - No Avahi on macOS - this also requires disabling geoclue's NMEA source
The patches are also all on the wip/ptomato/macos branch for easy examination
In general, I think changes to make modulesets compatible with macOS do not require review, but I prefer to only update the latest 3.24 moduleset and not all the obsolete ones.
Fair enough, as I certainly haven't tested all the obsolete ones and am not going to. Would you be OK with updating just 3.22 and 3.24? I ask because one of the foremost use cases for jhbuild on macOS is creating a build tree to be packed up into macOS app bundles, with gtk-mac-bundler, so I expect that more people will prefer to use 3.22 rather than master.
That sounds fine.
Attachment 339881 [details] pushed as 8edcb10 - bootstrap: Update sourceforge download URI Attachment 339882 [details] pushed as eea25a8 - bootstrap: Bump gettext Attachment 339883 [details] pushed as 1c546cb - bootstrap: Update some modules Attachment 339884 [details] pushed as a942604 - 3.22, 3.24: Add gtk-mac-integration Attachment 339885 [details] pushed as c43bf67 - meta: macOS builds adwaita-icon-theme for platform Attachment 339886 [details] pushed as e1126b6 - modules: e-d-s always needs nss and nspr Attachment 339887 [details] pushed as ced004d - modules: Disable X11 if not in x11 condition Attachment 339888 [details] pushed as ce683b0 - modules: Require libv4l only on Linux Attachment 339889 [details] pushed as cfa3d3a - modules: libcap is Linux-only Attachment 339890 [details] pushed as cfc7c6d - modules: Build babl with --disable-sse on Darwin Attachment 339891 [details] pushed as 735edda - modules: vte needs conditional --disable-Bsymbolic Attachment 339892 [details] pushed as 658a773 - modules: Change some things for macos condition
OK, pushed with only edits to 3.22 and 3.24. I'll keep the bug open for now until all the dependent bugs have been fixed. What would be a good mailing list to bring up the subject of merging https://github.com/ptomato/macos-jhbuild into jhbuild? Would desktop-devel-list be a good place?
Yeah, that's the best list.
(In reply to Philip Chimento from comment #8) > Created attachment 339888 [details] [review] [review] > modules: Require libv4l only on Linux > > The name Video4Linux says it all, it's not available on BSD or macOS. FreeBSD has Video4Linux: https://www.freshports.org/multimedia/v4l_compat https://www.freshports.org/multimedia/libv4l Can you add it back for FreeBSD? (In reply to Philip Chimento from comment #9) > Created attachment 339889 [details] [review] [review] > modules: libcap is Linux-only > > As far as I understand, libcap is Linux-specific so shouldn't appear in > the freebsd or macos conditions. sys/capability.h is available on FreeBSD, but its API is completely different from POSIX capability used on Linux. PulseAudio disables capability support on FreeBSD even if it can find sys/capability.h. I think it is correct to mark it as Linux-only until PulseAudio supports FreeBSD capability.
(In reply to Ting-Wei Lan from comment #20) > FreeBSD has Video4Linux: > https://www.freshports.org/multimedia/v4l_compat > https://www.freshports.org/multimedia/libv4l > > Can you add it back for FreeBSD? Done. Sorry for the delay; was having problems with my laptop.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/jhbuild/-/issues/249.