Meson error when building for Macos Ventura

I am trying to install GTK on my MacOS 13.7, and following the instructions on Building GTK-OSX.

./gtk-osx-setup.sh
jhbuild bootstrap-gtk-osx
jhbuild build meta-gtk-osx-bootstrap meta-gtk-osx-gtk3

The last instruction fails with the error message:
*** Error during phase configure of librsvg: ########## Error running meson setup --prefix /Users/Dev/gtk/inst --libdir lib -Dintrospection=disabled -Ddocs=disabled --wrap-mode=nofallback /Users/Dev/gtk/source/librsvg-2.59.2 *** [31/33]
The meson log says:
— stderr —
Program cargo found: YES 1.85.0 1.85.0 (/Users/Dev/.new_local/bin/cargo)
Program meson/cargo_wrapper.py found: YES (/Users/Dev/gtk/source/librsvg-2.59.2/meson/cargo_wrapper.py)
Program cargo-cbuild found: NO

When looking in that directory, I found no file named cargo-cbuild. I am at a loss as to what to do next. I followed each of the options given:

[1] Rerun phase configure
[2] Ignore error and continue to build
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase “wipe directory and start over”

But without the cargo-cbuild, I can go no further.

gnome-build-meta handles the cargo-c dependency correctly, but appears like jhbuild doesn’t seem to (?).

So, you can install cargo-c as below.

$ cargo install cargo-c
    Updating crates.io index
  Downloaded cargo-c v0.10.11+cargo-0.86.0
  Downloaded 1 crate (57.2 KB) in 1.72s
  Installing cargo-c v0.10.11+cargo-0.86.0
    Updating crates.io index
     Locking 377 packages to latest compatible versions

 ...
 ...

  Installing /home/sid/.cargo/bin/cargo-capi
  Installing /home/sid/.cargo/bin/cargo-cbuild
  Installing /home/sid/.cargo/bin/cargo-cinstall
  Installing /home/sid/.cargo/bin/cargo-ctest
   Installed package `cargo-c v0.10.11+cargo-0.86.0` (executables `cargo-capi`, `cargo-cbuild`, `cargo-cinstall`, `cargo-ctest`)
warning: be sure to add `/home/sid/.cargo/bin` to your PATH to be able to run the installed binaries

With this, cargo should have the cbuild command.

$ cargo cbuild --help
Build the crate C-API

Usage: cargo-cbuild cbuild [OPTIONS] [COMMAND]

Options:
      --destdir <DESTDIR>
          Path to directory where target should be copied to

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