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 774453 - Changes to make modules build on macOS
Changes to make modules build on macOS
Status: RESOLVED OBSOLETE
Product: jhbuild
Classification: Infrastructure
Component: module sets
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on: 708257 734630 772281 773710 773803 774175 774176 774179 774180 774181 774299 774311 774312 774339 774342
Blocks:
 
 
Reported: 2016-11-15 06:27 UTC by Philip Chimento
Modified: 2021-05-17 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bootstrap: Update sourceforge download URI (1.27 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
bootstrap: Bump gettext (1.09 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
bootstrap: Update some modules (2.24 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
3.22, 3.24: Add gtk-mac-integration (5.27 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
meta: macOS builds adwaita-icon-theme for platform (3.50 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
modules: e-d-s always needs nss and nspr (6.79 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
modules: Disable X11 if not in x11 condition (16.35 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
modules: Require libv4l only on Linux (8.57 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
modules: libcap is Linux-only (5.37 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
modules: Build babl with --disable-sse on Darwin (6.44 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
modules: vte needs conditional --disable-Bsymbolic (8.23 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review
modules: Change some things for macos condition (48.64 KB, patch)
2016-11-15 06:29 UTC, Philip Chimento
committed Details | Review

Description Philip Chimento 2016-11-15 06:27:47 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
Comment 1 Philip Chimento 2016-11-15 06:29:00 UTC
Created attachment 339881 [details] [review]
bootstrap: Update sourceforge download URI
Comment 2 Philip Chimento 2016-11-15 06:29:04 UTC
Created attachment 339882 [details] [review]
bootstrap: Bump gettext

It should match the version in the main modulesets.
Comment 3 Philip Chimento 2016-11-15 06:29:08 UTC
Created attachment 339883 [details] [review]
bootstrap: Update some modules

...to versions that don't have trouble building on macOS
Comment 4 Philip Chimento 2016-11-15 06:29:12 UTC
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.
Comment 5 Philip Chimento 2016-11-15 06:29:17 UTC
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.
Comment 6 Philip Chimento 2016-11-15 06:29:21 UTC
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.
Comment 7 Philip Chimento 2016-11-15 06:29:25 UTC
Created attachment 339887 [details] [review]
modules: Disable X11 if not in x11 condition
Comment 8 Philip Chimento 2016-11-15 06:29:30 UTC
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.
Comment 9 Philip Chimento 2016-11-15 06:29:34 UTC
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.
Comment 10 Philip Chimento 2016-11-15 06:29:39 UTC
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.
Comment 11 Philip Chimento 2016-11-15 06:29:43 UTC
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.
Comment 12 Philip Chimento 2016-11-15 06:29:48 UTC
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
Comment 13 Philip Chimento 2016-11-15 06:33:11 UTC
The patches are also all on the wip/ptomato/macos branch for easy examination
Comment 14 Michael Catanzaro 2016-11-15 14:04:00 UTC
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.
Comment 15 Philip Chimento 2016-11-16 04:25:12 UTC
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.
Comment 16 Michael Catanzaro 2016-11-16 16:14:02 UTC
That sounds fine.
Comment 17 Philip Chimento 2016-11-17 06:04:13 UTC
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
Comment 18 Philip Chimento 2016-11-17 06:07:22 UTC
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?
Comment 19 Michael Catanzaro 2016-11-17 14:05:57 UTC
Yeah, that's the best list.
Comment 20 Ting-Wei Lan 2016-11-18 06:53:57 UTC
(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.
Comment 21 Philip Chimento 2016-11-27 20:17:24 UTC
(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.
Comment 22 GNOME Infrastructure Team 2021-05-17 16:04:54 UTC
-- 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.