MacOS 14.5 initial jhbuild build failed

Hello I ran those initial commands to set the GTK development
sh gtk-osx-setup.sh
jhbuild bootstrap-gtk-osx
jhbuild build meta-gtk-osx-bootstrap meta-gtk-osx-gtk3
but last one failed.

The error I got is:

...
Library m found: YES
Found pkg-config: YES (/Users/dj/gtk/inst/bin/pkg-config) 2.2.0
Found CMake: /Users/dj/gtk/inst/bin/cmake (3.29.3)
Run-time dependency freetype2 found: NO (tried pkgconfig, framework and cmake)
Dependency Freetype found: NO. Found 2.13.2 but need: '>= 12.0.6'
Run-time dependency freetype found: NO (tried pkgconfig, framework and cmake)
Not looking for a fallback subproject for the dependency freetype2 because:
Use of fallback dependencies is disabled.

../../../../gtk/source/harfbuzz-8.5.0/meson.build:105:17: ERROR: Dependency 'freetype2' is required but not found.

On the other hand there is /Users/dj/gtk/inst/include/freetype2 folder with files, so I suppose jhbuild didn’t solve the dependencies well.

I’m using Homebrew, what wasn’t in the PATH during initialisation.

Hello,
I think that this method is not suitable anymore to install gtk on macOS,
you should use Homebrew instead.

To install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then to install gtk (prefer 4 over 3 for macOS):

brew install gtk4

(If you need gtk3 install: gtk+3)

Simple!
Thank you

Screenshot 2024-07-17 at 06.26.32

And are the steps on Windows up to date?

If they aren’t, feel free to open a merge request: Teams / Websites / www.gtk.org · GitLab

It is up to date for windows yes,
I use MSYS2 as detailed on the page you mentioned.

You are misinformed about gtk-osx (which uses jhbuild) not being suitable anymore. It is actively maintained and used by people.

I have seen that error before, it is the result of a tainted development environment. Most likely cause: you have a Homebrew installation, but you need a clean environment, no traces of any kind of package manager allowed.

1 Like

Hello @RdH and thank you for the information,
note that on the MacOS page for the official GTK website there the link regarding jhbuild point to webpage(s) planed for retirement, see here or here for instance.
That is what pointed towards the wrong direction, and also the fact that I tried to follow this method but could not find any way to install GTK4 (that I really need), so I figured that GTK4 being unsupported (or so it seems) it was a depreciated method, my bad.

Could you by any chance let me know, if that is possible, how to install GTK4 using jhbuild ?

Regards

Understandable, I don’t keep up with all the websites, I stick to the canonical source, gtk-osx. As long as there’s activity, it’s alive and well.

Yes, you can build GTK4 with jhbuild. For example, I’m doing this for Rnote here. However, my setup looks quite different from the outside compared to what you’re getting when using gtk-osx’s gtk-osx-setup.sh. That is because I do this a lot and have evolved this into my own thing (jhb)

It’s probably easier to help if you show me the code you have.

1 Like

@RdH thank you !
I will give a look to the links you provided (this might take some time since I am sharing the MacBook I use with a co-worker).
You will find here the source of my atomes software that I am trying to package for OSX:

GNU autotools format: GitHub - Slookeur/Atomes-GNU at devel

or:

Meson format: GitHub - Slookeur/Atomes-meson: atomes program - meson build system

So far I am not able to to build a proper working app (that includes all required libraries, and where the binary is able to search for lib in that app, and not outside).
For the meson archive you will find a lot of MacOS things in the ‘misc/macos’ folder, also if you decide to try this format, simply use the script build-osx.h distributed in the repository to build the MacOS version.

The whole wiki is meant to be archived—i.e. set to be read only, see this issue for the process and timeline. Individual pages will be migrated elsewhere.

I gave it a quick try to build Atomes and noticed that it needs fortran, which I don’t have yet. So no “quick try”.
Besides Fortran, GTK and OpenMP, any other dependencies?

Hello @RdH,
atomes dependencies are:

  • GTK
  • libxml-2
  • pangoft2
  • libepoxy
  • libGLU
  • libavutil
  • libavcodec
  • libavformat
  • libswscale

The last 4 being part of the FFMPEG libraries.
Also ‘OpenMP’ is optional, it is obviously better to use it but not required per say.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.