First Time Gimp Build

Hi,

After three evenings of trying, Gimp is now compiling and running. :melting_face:
Knowing nothing about how to “build” was a problem for me. Thanks to these websites for the guidance; :sparkling_heart:

Up to part C6, explained things nicely. No follow C6, a dead end for me.

then this nearly all worked.
https://developer.gimp.org/core/setup/build/

and thanks to chatGPT for resolving a build issue.

Thought I’d share the last successful attempt, can’t rule out something helping from the previous attempts though.

Linux Mint 21.1 Cinnamon 5.6.8, kernel 6.1.0-1009-oem, Intel Corporation Device a780.

# install location, a.k.a GIMP_PREFIX "/Code/gimp-source" user choice
# copied and pasted into a terminal

mkdir $HOME/Code
mkdir $HOME/Code/gimp-source
mkdir $HOME/Code/gimp-source/build
mkdir $HOME/Code/gimp-source/install
mkdir $HOME/Code/gimp-source/install/share
mkdir $HOME/Code/gimp-source/install/share/aclocal
touch $HOME/Code/gimp-source/install/share/aclocal/gimp-2.0.m4

# changed directory
cd $HOME/Code/gimp-source/build

# had previously installed "git" with - "sudo apt install git" terminal command
# then "cloned" repositories of code with these commands
# copied and pasted into a terminal

git clone https://gitlab.gnome.org/GNOME/glib
git clone https://gitlab.gnome.org/GNOME/json-glib
git clone https://gitlab.gnome.org/GNOME/gdk-pixbuf
git clone https://gitlab.gnome.org/GNOME/babl
git clone https://gitlab.gnome.org/GNOME/gegl
git clone https://gitlab.gnome.org/GNOME/gimp
git clone https://github.com/Jehan/mypaint-brushes.git

# cloning  libmypaint.git did not work. had to download a zip from github and extract to build dir

# created the following gimp_definitions for a "build environment"
# copied and pasted into a terminal
export GIMP_PREFIX=${HOME}/Code/gimp-source/
export PATH="${GIMP_PREFIX}/bin:$PATH"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig:${GIMP_PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib64/pkgconfig:$PKG_CONFIG_PATH"
export XDG_DATA_DIRS="${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}${GIMP_PREFIX}/share:/usr/local/share:/usr/share"
export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export ACLOCAL_FLAGS="-I $INSTALL_PREFIX/share/aclocal $ACLOCAL_FLAGS"
GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/girepository-1.0:${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
arch="$(dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null)"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/${arch}/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib/${arch}:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/${arch}/girepository-1.0:${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"

# changed directory
cd $GIMP_PREFIX/build

# installed this as chatGPT suggested which fixed a problem further on
sudo apt-get install libgirepository1.0-de

# changed directory
cd $GIMP_PREFIX/build/babl

# copied and pasted into a terminal
meson _build \
--prefix=${GIMP_PREFIX} \
--buildtype=release \
-Db_lto=true
cd _build
ninja
ninja install

# copied and pasted into a terminal
cd $GIMP_PREFIX/build/gegl
meson _build \
--prefix=${GIMP_PREFIX} \
--buildtype=release \
-Db_lto=true
cd _build
ninja
ninja install

# copied and pasted into a terminal
cd $GIMP_PREFIX/build/gimp
meson _build \
--prefix=${GIMP_PREFIX} \
--buildtype=release \
-Dpython=auto
cd _build
ninja
ninja install


# then saved in a "gimp_definitions.sh" file these variables
export GIMP_PREFIX=${HOME}/Code/gimp-source/
export PATH="${GIMP_PREFIX}/bin:$PATH"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig:${GIMP_PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib64/pkgconfig:$PKG_CONFIG_PATH"
export XDG_DATA_DIRS="${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}${GIMP_PREFIX}/share:/usr/local/share:/usr/share"
export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export ACLOCAL_FLAGS="-I $INSTALL_PREFIX/share/aclocal $ACLOCAL_FLAGS"
GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/girepository-1.0:${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
arch="$(dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null)"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/${arch}/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib/${arch}:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/${arch}/girepository-1.0:${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"


# then made another .sh file "launchGimpSource.sh" which had the following 2 lines
#!/usr/bin/env bash
(source ~/Artwork/Misc/linuxBackupScript/gimp_definitions.sh ; $GIMP_PREFIX/bin/gimp-2.99)

# then made that file executable, right click, properties, "allow executing file as program"
# then made a "desktop launcher" with the following command in its properties
gnome-terminal -- /home/mark/Artwork/Misc/linuxBackupScript/launchGimpDev.sh

# That's it, Gimp then launched from a compiled version.
1 Like

Which GIMP is it? Does this works for GIMP 2.99.14?

In all case, thanks for sharing

you’re welcome, it’s the latest unstable version, 2.99.15. I’d quite like to try and write a “c” plugin,
and thought it’d be best to take this step first. It’s not really for working in art wise, more for checking bug fixes and learning c.

there is a bit on the gimp site about choosing a version to build…

You can build specific versions by choosing a ‘’tag’’ (a fixed git revision)…

 # List available tags
 git tag
 # Update the working directory to a specific tag :
 git checkout GIMP_2_10_32

I don’t understand it at the moment, but I went to the build directory and opened a terminal
and ran “git tag”

~/Code/gimp-source/build/gimp$ git tag

a process then listed all this stuff :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U_1_1_0
gimp
git-migration-GIMP_2_5_0
help
release-2-2-4
release-2-2-5
release-2-3-0
release-2-4-0
soc-2012-unified-transform-after-gsoc
soc-2012-unified-transform-before-gsoc
(END)

The process then seems to wait for an input, so maybe if I entered

 git checkout GIMP_2_10_32

And then carried on with the build process it would build Gimp 2.10.32 ?
“carried on” being

# copied and pasted into a terminal
cd $GIMP_PREFIX/build/gimp
meson _build \
--prefix=${GIMP_PREFIX} \
--buildtype=release \
-Dpython=auto
cd _build
ninja
ninja install

Is that right devs? my understanding is quite limited on this.

You would usually build from a branch instead of a tagged release to get all the latest changes. Note that building using meson is only supported for the master branch, not for 2.10.

So one of these to check out 2.10 or master:

git checkout gimp-2-10
git checkout master

Note that, at least for building the master branch, you will need up-to-date babl and gegl builds too.

If the info at https://developer.gimp.org/core/setup/build/ is unclear or incomplete then please let us know.

hello,

when you say “master” does that mean the latest version “2.99.15”
I’d like to try and build 2.99.14 locally;

on the website it says

# List available branches
 git branch -a
 # Checkout a branch :
 git checkout gimp-2-10

However I don’t see a release for 2.99.14 to “checkout” or a 2-10-32?

$ git branch -a
* master
  remotes/origin/GimpFileDialog-refactoring
  remotes/origin/HEAD -> origin/master
  remotes/origin/KELLY_TILEACCESSOR
  remotes/origin/alxsa-aco-palette-babl
  remotes/origin/alxsa-anyrgb-color-selectors
  remotes/origin/alxsa-color-picker-anyrgb
  remotes/origin/alxsa-color-picker-grayscale
  remotes/origin/alxsa-enlarge-script-fu-console
  remotes/origin/alxsa-fill-path-solid-colors
  remotes/origin/alxsa-fits-cfitsio-port
  remotes/origin/alxsa-gimpproceduredialog-size-entry
  remotes/origin/alxsa-guides-of-many-colors
  remotes/origin/alxsa-hide-oncanvas-text-editor
  remotes/origin/alxsa-ibm-format-tiff-layers
  remotes/origin/alxsa-import-swatchbooker
  remotes/origin/alxsa-jpeg-clipping-path-import
  remotes/origin/alxsa-light-theme-edit
  remotes/origin/alxsa-outline-enhancement
  remotes/origin/alxsa-path-tool-interaction-change
  remotes/origin/alxsa-port-mail-plugin
  remotes/origin/alxsa-vector-layers-2006
  remotes/origin/barthalion/update-kaniko
  remotes/origin/bochecha/fix-flatpak
  remotes/origin/bug-357818
  remotes/origin/bug-601821
  remotes/origin/ell/blending-mode-icons
  remotes/origin/fix-ci-failure-bg
  remotes/origin/gimp-1-0
  remotes/origin/gimp-1-0-gtk-1-2
  remotes/origin/gimp-1-2
  remotes/origin/gimp-2-0
  remotes/origin/gimp-2-10
  remotes/origin/gimp-2-2
  remotes/origin/gimp-2-4
  remotes/origin/gimp-2-6
  remotes/origin/gimp-2-8
  remotes/origin/gimp-attributes-wip
  remotes/origin/gimpmetadata-new-wip
  remotes/origin/gnome-2-2
  remotes/origin/gnome-2-4
  remotes/origin/gtk3-port-meson
  remotes/origin/high-bit-depths-REBASED
  remotes/origin/icons-wip
  remotes/origin/jsbueno/zommable_curves
  remotes/origin/libreajans/gimp-issue-2922
  remotes/origin/master
  remotes/origin/meson
  remotes/origin/metadata-browser
  remotes/origin/metadata-wip-rebased
  remotes/origin/move-tool-tweak
  remotes/origin/muks/openjpeg
  remotes/origin/mypaint-brush
  remotes/origin/nielsdg/devel-docs-porting-guide
  remotes/origin/nielsdg/dont-generate-pdb-for-enums-in-app
  remotes/origin/nielsdg/gimpapp
  remotes/origin/nielsdg/gimpdialog-get-toplevel
  remotes/origin/nielsdg/script-fu-use-girepository
  remotes/origin/project-sunlight
  remotes/origin/release/gimp-2-99-12
  remotes/origin/samm/gimp-2-10-print-focus
  remotes/origin/set-sast-config-1
  remotes/origin/set-sast-config-2
  remotes/origin/soc-2006-vector-layers
  remotes/origin/soc-2008-python
  remotes/origin/soc-2008-tagging
  remotes/origin/soc-2008-text
  remotes/origin/soc-2009-siox-drb
  remotes/origin/soc-2011-gimpunitentry
  remotes/origin/soc-2013-combined-selection-tool
  remotes/origin/soc-2013-psd
  remotes/origin/tiny-fu-1-0
  remotes/origin/weskaggs
  remotes/origin/windows-installer/2-99-10
  remotes/origin/wip/Jehan-tablet-gtk3-port
  remotes/origin/wip/Jehan/CI-test-caching
  remotes/origin/wip/Jehan/Debian-CI
  remotes/origin/wip/Jehan/Issue-4985-Parallelize-xcf-v4
  remotes/origin/wip/Jehan/Issue-5863-Gexiv2-GError-variants
  remotes/origin/wip/Jehan/add-appstream-glib-flatpak
  remotes/origin/wip/Jehan/bring-back-crossbuild-nightlies
  remotes/origin/wip/Jehan/ci-improve-flatpak-build
  remotes/origin/wip/Jehan/fix-8359
  remotes/origin/wip/Jehan/fix-git-version-deps-order
  remotes/origin/wip/Jehan/fix-jpexl-deps
  remotes/origin/wip/Jehan/get-rid-autotools
  remotes/origin/wip/Jehan/gitlab-ci-crossroad-update
  remotes/origin/wip/Jehan/gtk-mr-1563-windows-ink
  remotes/origin/wip/Jehan/incremental-win-installer-improvements
  remotes/origin/wip/Jehan/investigate-win-CI-bug
  remotes/origin/wip/Jehan/issue-6435-off-canvas-guide
  remotes/origin/wip/Jehan/issue-8518-welcome-dialog-macos
  remotes/origin/wip/Jehan/layers-dockable-refresh
  remotes/origin/wip/Jehan/link-layers-multi
  remotes/origin/wip/Jehan/macos-build
  remotes/origin/wip/Jehan/mr-424-macos
  remotes/origin/wip/Jehan/mr-424-macos-gimp-2-10
  remotes/origin/wip/Jehan/release-2-99-14
  remotes/origin/wip/Jehan/signals-GIMP
  remotes/origin/wip/Jehan/warnings-test-ui
  remotes/origin/wip/akkana/gtk3-python3
  remotes/origin/wip/alxsa/mypaint-brush-v2
  remotes/origin/wip/animation
  remotes/origin/wip/bug790552-metadata-preferences
  remotes/origin/wip/init-performance-log
  remotes/origin/wip/init-performance-log-2-10
  remotes/origin/wip/jehan/icons
  remotes/origin/wip/nielsdg/add-gitlab-ci
  remotes/origin/wip/nielsdg/bash-completion
  remotes/origin/wip/nielsdg/custom-vapi-dir
  remotes/origin/wip/nielsdg/desktop-gettext
  remotes/origin/wip/nielsdg/follow-xdg-color-scheme
  remotes/origin/wip/nielsdg/gimpbject-declare-derivable
  remotes/origin/wip/nielsdg/path-editor-listbox
  remotes/origin/wip/nielsdg/proc-loosen-typecheck
  remotes/origin/wip/nielsdg/remove-floppy-icon
  remotes/origin/wip/pippin
  remotes/origin/wip/schumaml/GimpUI-GIR-issue-6093
  remotes/origin/wip/schumaml/crossraods-optimization
  remotes/origin/wip/schumaml/docker-image-only-once
  remotes/origin/wip/schumaml/docker-security-check
  remotes/origin/wip/schumaml/export-as-dialog-title-issue-4021
  remotes/origin/wip/schumaml/file-save-as-dialog-title-issue-4021
  remotes/origin/wip/schumaml/flatpak-builder-output-tee
  remotes/origin/wip/schumaml/gimp-2-10-distcheck
  remotes/origin/wip/schumaml/gimp-cmdline-disable-opencl
  remotes/origin/wip/schumaml/gimp_image_resize_to_visible_layers
  remotes/origin/wip/schumaml/gitlab-ci-yml-improvements
  remotes/origin/wip/schumaml/issue-35-outlined-text
  remotes/origin/wip/schumaml/make-check-stage
  remotes/origin/wip/schumaml/menu-entry-bugs-for-version
  remotes/origin/wip/schumaml/tune-prepare-stage
  remotes/origin/wip/sgrinkov/6257-meson-race-rc-win-build
  remotes/origin/wip/smcv/2-10-path-max
  remotes/origin/wip/wormnest/64-bit-window-ids
  remotes/origin/wip/wormnest/ci-meson-fix
  remotes/origin/wip/wormnest/issue-6886
  remotes/origin/wip/wormnest/meson
  remotes/origin/wip/wormnest/psd-text-layer-handling
  remotes/origin/wip/wormnest/psp-mask
  remotes/origin/wip/wormnest/vector-layers
  remotes/origin/wip/xcf-delta-compression
  remotes/origin/wormnest/meson-fix-xvfb-tests

Regarding the build documentation, there’s is a lot of complexity and assumption about what the builder knows. It might be useful to have a one page, boiled down, guide for newbies on a particular platform, explaining the basic stuff that might be taken as given by an experienced user.

For example I had no idea where to run the command
git branch -a

I just tried each directory in turn until it worked.

I had no idea what this means;

You should then create another prefix directory where GIMP (and some dependencies) may be installed safely. On Linux you could use $HOME/.local. Let’s name your custom prefix :

export GIMP_PREFIX=${HOME}/gimp_prefix

and had to refer another site to try and decipher what that was about.

# make an install folder, a.k.a GIMP_PREFIX "/Code/gimp-source", then tell the build about it.
export GIMP_PREFIX=${HOME}/Code/gimp-source/

This one does a good job at explaining the basics, but still gets lost in complexity after the introduction.

I’m not complaining, just pointing out a few hurdles that could be avoided.

If any more detailed explanations of general usage are added, I’d suggest to put these on different pages linked from there, and keep the main building guide as compact as possible for people who know about the commands.

I tried to build version 2.99.14, there was a weird sounding fail…
…master still builds ok… anything obvious?

# trying to build v2.99.14
$ git checkout GIMP_2_99_14
$ git branch
* (HEAD detached at GIMP_2_99_14)
  master


Compiler stderr:
 
Dependency babl found: NO found 0.1.92 but need: '>=0.1.98'
Invalid version of dependency, need 'babl' ['>=0.1.98'] found '0.1.92'.
CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/bin/cmake (3.22.1)
Extracting basic cmake information
Try CMake generator: auto
Calling CMake (['/usr/bin/cmake']) in /home/mark/Code/gimp-source/build/gimp/_build/meson-private/cmake_babl with:
  - "--trace-expand"
  - "--trace-format=json-v1"
  - "--no-warn-unused-cli"
  - "--trace-redirect=cmake_trace.txt"
  - "-DCMAKE_TOOLCHAIN_FILE=/home/mark/Code/gimp-source/build/gimp/_build/meson-private/cmake_babl/CMakeMesonToolchainFile.cmake"
  - "."
  -- Module search paths:    ['/', '/usr', '/usr/local']
  -- CMake root:             /usr/share/cmake-3.22
  -- CMake architectures:    ['x86_64-linux-gnu']
  -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share', 'lib/x86_64-linux-gnu']
Preliminary CMake check failed. Aborting.
Run-time dependency babl found: NO (tried cmake)

../meson.build:343:0: ERROR: Invalid version of dependency, need 'babl' ['>=0.1.98'] found '0.1.92'.

You might need to also build babl.
Building bleeding edge gimp sometimes requires the latest babl (and gegl) version.
You have entered dependency hell.

Often your Linux distribution only packages an older version.
So you can’t download the latest version from the distribution website (say Canonical or Debian.)

And you usually need the “-dev” package,
which includes the C headers
so you can compile against the library (gegl and babl are libraries.)
If you can’t install/download the dev package of the required version of those two libraries,
you must build the library yourself.

gegl and babl libraries are very tightly associated with gimp.
I think they were originally part of the gimp project,
but were separated.
Which makes architectural sense “separate concerns”.
gegl is separately concerned with rendering bitmaps
and babl is separately concerned with pixel formats,
or something like that.

You typically need to build babl and gegl (and some mypaint dependencies). Plus for Gimp 2.99 unless you are running a very up-to-date system you may have to build more recent versions of your system libs. Personally I have this setup:

gimp-2.10.34
├── build
│   ├── babl
│   ├── gegl
│   ├── gimp
│   ├── GIMP-Lensfun
│   ├── GMIC-3.1.6
│   ├── libmypaint
│   ├── mypaint-brushes
│   ├── pango-1.47.0
│   └── resynthesizer
└── run
    ├── bin
    ├── etc
    ├── include
    ├── lib
    ├── libexec
    └── share

Where

  • build contains the source code (ie, cloned GIT repos, or un-tarred tarballs),
  • run is the target of all the builds (the “prefix”).

I have a sourced script to set up the proper environment:

#! /bin/bash
# Shebang for kate, this file must be sourced 

export GIMP_RELEASE=2.10.34
export GIMP_PREFIX=$(readlink -e $(dirname $(readlink -e $BASH_SOURCE)))/run
printf "GIMP_RELEASE: %s, GIMP_PREFIX: %s\n" "$GIMP_RELEASE" "$GIMP_PREFIX"
mkdir -p $GIMP_PREFIX

# Used to find programs/tools during build
export PATH="${GIMP_PREFIX}/bin:$PATH"

# Used to detect the build dependencies
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/pkgconfig:${GIMP_PREFIX}/share/pkgconfig"

# Used to find the glib-introspection dependencies
export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/share:$XDG_DATA_DIRS"

# Used to find the libraries at runtime
export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH}"

# Used by Autotools to find its tools
#export ACLOCAL_FLAGS="-I $INSTALL_PREFIX/share/aclocal $ACLOCAL_FLAGS"
#export ACLOCAL_FLAGS="-I $GIMP_PREFIX/share/aclocal $ACLOCAL_FLAGS"
export ACLOCAL_FLAGS="-I $GIMP_PREFIX/share/aclocal -I /usr/share/aclocal"

# Note: if you don't include the default value of XDG_DATA_DIRS, you may get a compile error trying to read a PNG icon file. You could try using this in that case:
# export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/local/share:/usr/share"

# For Debian or derivatives (Ubuntu, Mint…) only:
# Additionally to the previous commands (not in replacement), update some variables this way if you use a Debian derivative:

arch="$(dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null)"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/${arch}/pkgconfig:${GIMP_PREFIX}/share/${arch}/pkgconfig:$PKG_CONFIG_PATH"
#export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib/${arch}:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib/${arch}:/usr/lib/${arch}"

# Number or parallel compiles and others  (# of available procs -2, for me)
export PROCS=6

# Missing directory
mkdir -p $GIMP_PREFIX/share/aclocal

alias nbuild='cd _build && ninja && ninja install && cd ..'

# Autogen.sh/configure tries to build a GTK test program and does #include <pango/pango.h>
# while pango is actually under /usr/include/pango-1.0/
export CPATH=/usr/include/pango-1.0/

I have also have a script to start Gimp with the proper environment (run directory above, but also specific user profile, etc…)

Otherwise, git skills are expected from anyone dabbling with source code these days, but plenty of help around. Gimp 2.10 “classic” build tools are the canonical ones, and even the meson/ninja builds are fairly well known.

You main difficulty are the unexpected dependencies, you may need to build recent version of libraries. This doesn’t happen too often with 2.10 but is a regular occurrence with 2.99 (but since I moved from Ubuntu 20.04 to 22.04 this may solve some of these).

thanks for all the info, what confuses me is that I can build master, 2.99.15, but not the 2.99.14 branch.

NB: there is no “2.99.14 branch”, you are cloning from a Git tag there.

The master branch also has a requirement for babl 0.1.98:

Can you show us a log of your master branch build to see what is being detected there?

not building

git checkout -b 2-99-14 origin/wip/Jehan/release-2-99-14
Branch '2-99-14' set up to track remote branch 'wip/Jehan/release-2-99-14' from 'origin'.
Switched to a new branch '2-99-14'

…/meson.build:343:0: ERROR: Invalid version of dependency, need ‘babl’ [‘>=0.1.98’] found ‘0.1.92’

working build

$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
mark@dadPC:~/Code/gimp-source/build/gimp$ cd $GIMP_PREFIX/build/gimp
meson _build \
     --prefix=${GIMP_PREFIX} \
     --buildtype=release \
     -Dpython=enabled
cd _build
ninja
ninja install
Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
If ninja fails, run "ninja reconfigure" or "meson --reconfigure"
to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.
[0/1] Regenerating build files.
The Meson build system
Version: 0.61.2
Source dir: /home/mark/Code/gimp-source/build/gimp
Build dir: /home/mark/Code/gimp-source/build/gimp/_build
Build type: native build
Project name: gimp
Project version: 2.99.15
C compiler for the host machine: cc (gcc 11.3.0 "cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0")
C linker for the host machine: cc ld.bfd 2.38
C++ compiler for the host machine: c++ (gcc 11.3.0 "c++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0")
C++ linker for the host machine: c++ ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
../meson.build:98: WARNING: Module unstable-simd has no backwards or forwards compatibility and might not exist in future releases.
Message: Host machine cpu family: x86_64
Message: Host os: linux
Compiler for C supports arguments -mmmx: YES (cached)
Compiler for C supports arguments -msse: YES (cached)
Compiler for C supports arguments -msse2: YES (cached)
Compiler for C supports arguments -msse4.1: YES (cached)
Compiler for C supports arguments -fdiagnostics-show-option: YES (cached)
Compiler for C supports arguments -fno-common: YES (cached)
Compiler for C supports arguments -Wformat: YES (cached)
Compiler for C supports arguments -Wformat-security: YES (cached)
Compiler for C supports arguments -Winit-self: YES (cached)
Compiler for C supports arguments -Wlogical-op: YES (cached)
Compiler for C supports arguments -Wmissing-declarations: YES (cached)
Compiler for C supports arguments -Wmissing-format-attribute: YES (cached)
Compiler for C supports arguments -Wpointer-arith: YES (cached)
Compiler for C supports arguments -Wreturn-type: YES (cached)
Compiler for C supports arguments -Wtype-limits: YES (cached)
Compiler for C supports arguments -Wabsolute-value: YES (cached)
Compiler for C supports arguments -Wdeclaration-after-statement: YES (cached)
Compiler for C supports arguments -Wenum-conversion: YES (cached)
Compiler for C supports arguments -Wliteral-conversion: NO (cached)
Compiler for C supports arguments -Wno-strict-prototypes: YES (cached)
Compiler for C supports arguments -Wold-style-definition: YES (cached)
Compiler for C supports arguments -Wparentheses-equality: NO (cached)
Compiler for C supports arguments -W#pragma-messages: NO (cached)
Compiler for C supports arguments -Wsometimes-uninitialized: NO (cached)
Compiler for C supports arguments -Wtautological-unsigned-enum-zero-compare: NO (cached)
Compiler for C supports arguments -Wunneeded-internal-declaration: NO (cached)
Compiler for C supports arguments -Wunused-function: YES (cached)
Compiler for C supports arguments -Wunused-value: YES (cached)
Compiler for C supports arguments -Werror=implicit-function-declaration: YES (cached)
Library m found: YES
Library dl found: YES
Dependency atk found: YES 2.36.0 (cached)
Dependency babl-0.1 found: YES 0.1.105 (cached)
Dependency cairo found: YES 1.16.0 (cached)
Dependency fontconfig found: YES 2.13.1 (cached)
Dependency freetype2 found: YES 24.1.18 (cached)
Dependency gdk-pixbuf-2.0 found: YES 2.42.8 (cached)
Dependency gegl-0.4 found: YES 0.4.45 (cached)
Dependency gexiv2 found: YES 0.14.0 (cached)
Dependency gio-2.0 found: YES 2.72.4 (cached)
Dependency gio-unix-2.0 found: YES 2.72.4 (cached)
Dependency glib-2.0 found: YES 2.72.4 (cached)
Dependency gobject-2.0 found: YES 2.72.4 (cached)
Dependency gmodule-no-export-2.0 found: YES 2.72.4 (cached)
Dependency gtk+-3.0 found: YES 3.24.33 (cached)
Dependency harfbuzz found: YES 2.7.4 (cached)
Dependency json-glib-1.0 found: YES 1.6.6 (cached)
Dependency lcms2 found: YES 2.12 (cached)
Dependency libmypaint found: YES 1.6.0 (cached)
Dependency mypaint-brushes-1.0 found: YES 1.3.1 (cached)
Dependency pangocairo found: YES 1.50.6 (cached)
Dependency pangoft2 found: YES 1.50.6 (cached)
Dependency librsvg-2.0 found: YES 2.52.5 (cached)
Library socket found: NO
Dependency appstream-glib found: YES 0.7.18 (cached)
Dependency libarchive found: YES 3.6.0 (cached)
Library backtrace found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Found CMake: /usr/bin/cmake (3.22.1)
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Dependency x11 found: YES 1.7.5 (cached)
Dependency xmu found: YES 1.1.3 (cached)
Dependency xext found: YES 1.3.4 (cached)
Dependency xfixes found: YES 6.0.0 (cached)
Has header "X11/Xmu/WinUtil.h" with dependencies xext, xmu: YES (cached)
Has header "X11/extensions/shape.h" with dependencies xext, xmu: YES (cached)
Checking for function "XmuClientWindow" with dependencies xext, xmu: YES (cached)
Checking for function "XShapeGetRectangles" with dependencies xext, xmu: YES (cached)
Has header "X11/extensions/shape.h" : YES (cached)
Has header "X11/Xmu/WinUtil.h" : YES (cached)
Dependency libtiff-4 found: YES 4.3.0 (cached)
Dependency libjpeg found: YES 2.1.2 (cached)
Dependency zlib found: YES 1.2.11 (cached)
Library bz2 found: YES
Dependency liblzma found: YES 5.2.5 (cached)
Library gs found: YES
Dependency libpng found: YES 1.6.37 (cached)
Dependency libmng found: YES 2.0.2 (cached)
Library aa found: YES
Dependency xpm found: YES 3.5.12 (cached)
Has header "qoi.h" : NO (cached)
Has header "libilbm/ilbm.h" : NO (cached)
Dependency OpenEXR found: YES 2.5.7 (cached)
Dependency libwebp found: YES 1.2.2 (cached)
Dependency libwebpmux found: YES 1.2.2 (cached)
Dependency libwebpdemux found: YES 1.2.2 (cached)
Dependency libheif found: YES 1.12.0 (cached)
Checking if "import HEIC" with dependency libheif runs: YES
Checking if "export HEIC" with dependency libheif runs: YES
Checking if "import AVIF" with dependency libheif runs: YES
Checking if "export AVIF" with dependency libheif runs: YES
Compiler for language vala for the host machine not found.
Dependency poppler-glib found: YES 22.02.0 (cached)
Dependency poppler-data found: YES 0.4.11 (cached)
Dependency cairo-pdf found: YES 1.16.0 (cached)
Dependency libwmf found: YES 0.2.12 (cached)
Dependency libopenjp2 found: YES 2.4.0 (cached)
Run-time dependency libjxl found: NO (tried pkgconfig and cmake)
Run-time dependency libjxl_threads found: NO (tried pkgconfig and cmake)
Dependency xcursor found: YES 1.2.0 (cached)
Dependency alsa found: YES 1.2.6.1 (cached)
Has header "linux/input.h" : YES (cached)
Dependency gudev-1.0 found: YES 237 (cached)
Program xdg-email found: YES (/usr/bin/xdg-email)
Dependency iso-codes found: YES 4.9.0 (cached)
Program perl found: YES (/usr/bin/perl)
Program python3 found: YES (/usr/bin/python3)
WARNING: Python files installed by Meson might not be found by python interpreter.
 This warning can be avoided by setting "python.platlibdir" option.
WARNING: Python files installed by Meson might not be found by python interpreter.
 This warning can be avoided by setting "python.purelibdir" option.
Message: Found Python 3.10
../meson.build:1075: WARNING: Project targeting '>=0.56.0' but tried to use feature introduced in '0.59.0': feature_option.allowed().
Message: Found Pygobject: true
Program gjs found: NO
Program luajit found: NO
Program xmllint found: YES (/usr/bin/xmllint)
Program xsltproc found: YES (/usr/bin/xsltproc)
Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate)
Program appstreamcli found: NO found 0.15.2 but need: '>=0.15.3' (/usr/bin/appstreamcli)
Program gi-docgen found: NO
Dependency shared-mime-info found: YES 2.1 (cached)
Dependency glib-2.0 found: YES 2.72.4 (cached)
Dependency librsvg-2.0 found: YES 2.52.5 (cached)
Program xvfb-run found: NO
Program dbus-run-session found: YES (/usr/bin/dbus-run-session)
Message: 
    NOTE: if you plan on packaging GIMP for distribution, it is recommended
    to override the bug report URL with option:
      -Dbug-report-url=https://example.com/
    so that you can filter packaging bugs from core bugs before reporting upstream.
...

loads of stuff

...
pkgconfig
Installing symlink pointing to gimptool-2.99 to /home/mark/Code/gimp-source/bin/gimptool
Installing symlink pointing to gimp-test-clipboard-2.99 to /home/mark/Code/gimp-source/bin/gimp-test-clipboard
Installing symlink pointing to gimp-2.99 to /home/mark/Code/gimp-source/bin/gimp
Installing symlink pointing to gimp-console-2.99 to /home/mark/Code/gimp-source/bin/gimp-console
Installing symlink pointing to gimp-debug-tool-2.99 to /home/mark/Code/gimp-source/libexec/gimp-debug-tool
Installing symlink pointing to gimptool-2.99.1 to /home/mark/Code/gimp-source/share/man/man1/gimptool.1
Installing symlink pointing to gimprc-2.99.5 to /home/mark/Code/gimp-source/share/man/man5/gimprc.5
Installing symlink pointing to gimp-console-2.99.1 to /home/mark/Code/gimp-source/share/man/man1/gimp-console.1
Installing symlink pointing to gimp-2.99.1 to /home/mark/Code/gimp-source/share/man/man1/gimp.1
Running custom install script '/usr/bin/sh -c mkdir -p $MESON_INSTALL_DESTDIR_PREFIX/share/gimp/2.99/fonts'
mark@dadPC:~/Code/gimp-source/build/gimp/_build$

Meson log

Build started at 2023-05-12T09:26:47.475146
Main binary: /usr/bin/python3
Build Options: -Dpython=auto -Dprefix=/home/mark/Code/gimp-source/ -Dbuildtype=release -Dbackend=ninja
Python system: Linux
The Meson build system
Version: 0.61.2
Source dir: /home/mark/Code/gimp-source/build/gimp
Build dir: /home/mark/Code/gimp-source/build/gimp/_build
Build type: native build
Project name: gimp
Project version: 2.99.14
C compiler for the host machine: cc (gcc 11.3.0 “cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
C linker for the host machine: cc ld.bfd 2.38
C++ compiler for the host machine: c++ (gcc 11.3.0 “c++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
C++ linker for the host machine: c++ ld.bfd 2.38
C compiler for the build machine: cc (gcc 11.3.0 “cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
C linker for the build machine: cc ld.bfd 2.38
C++ compiler for the build machine: c++ (gcc 11.3.0 “c++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
C++ linker for the build machine: c++ ld.bfd 2.38
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
…/meson.build:94: WARNING: Module unstable-simd has no backwards or forwards compatibility and might not exist in future releases.
Message: Host machine cpu family: x86_64
Message: Host os: linux
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -mmmx: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -msse: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -msse2: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -msse4.1: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -fdiagnostics-show-option: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -fno-common: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wformat: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wformat-security: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Winit-self: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wlogical-op: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wmissing-declarations: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wmissing-format-attribute: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wpointer-arith: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wreturn-type: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wtype-limits: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wabsolute-value: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wdeclaration-after-statement: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wenum-conversion: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:
cc: error: unrecognized command-line option ‘-Wliteral-conversion’; did you mean ‘-Warith-conversion’?

Compiler for C supports arguments -Wliteral-conversion: NO (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wno-strict-prototypes: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wold-style-definition: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:
cc: error: unrecognized command-line option ‘-Wparentheses-equality’

Compiler for C supports arguments -Wparentheses-equality: NO (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:
cc: error: unrecognized command-line option ‘-W#pragma-messages’

Compiler for C supports arguments -W#pragma-messages: NO (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:
cc: error: unrecognized command-line option ‘-Wsometimes-uninitialized’; did you mean ‘-Wmaybe-uninitialized’?

Compiler for C supports arguments -Wsometimes-uninitialized: NO (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:
cc: error: unrecognized command-line option ‘-Wtautological-unsigned-enum-zero-compare’

Compiler for C supports arguments -Wtautological-unsigned-enum-zero-compare: NO (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:
cc: error: unrecognized command-line option ‘-Wunneeded-internal-declaration’

Compiler for C supports arguments -Wunneeded-internal-declaration: NO (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wunused-function: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Wunused-value: YES (cached)
Using cached compile:
Cached command line:

Code:
extern int i;
int i;

Cached compiler stdout:

Cached compiler stderr:

Compiler for C supports arguments -Werror=implicit-function-declaration: YES (cached)
Using cached compile:
Cached command line:

Code:

#include<langinfo.h>
int main() {
  char c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
}

Cached compiler stdout:

Cached compiler stderr:

Using cached compile:
Cached command line:

Code:

#include<langinfo.h>
int main() {
  char c = *((unsigned char *) nl_langinfo(_NL_IDENTIFICATION_LANGUAGE));
}

Cached compiler stdout:

Cached compiler stderr:

Running compile:
Working directory: /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpfqcd1841
Command line: cc /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpfqcd1841/testfile.c -o /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpfqcd1841/output.exe -D_FILE_OFFSET_BITS=64 -O0 -Wl,–start-group -lm -Wl,–end-group -Wl,–allow-shlib-undefined

Code:
int main(void) { return 0; }

Compiler stdout:

Compiler stderr:

Library m found: YES
Running compile:
Working directory: /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpbx96q0rh
Command line: cc /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpbx96q0rh/testfile.c -o /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpbx96q0rh/output.exe -D_FILE_OFFSET_BITS=64 -O0 -Wl,–start-group -ldl -Wl,–end-group -Wl,–allow-shlib-undefined

Code:
int main(void) { return 0; }

Compiler stdout:

Compiler stderr:

Library dl found: YES
Dependency atk found: YES 2.36.0 (cached)
Pkg-config binary for 1 is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Determining dependency ‘babl’ with pkg-config executable ‘/usr/bin/pkg-config’
env[PKG_CONFIG_PATH]: /home/mark/Code/gimp-source//lib/x86_64-linux-gnu/pkgconfig:/home/mark/Code/gimp-source//lib64/pkgconfig:/home/mark/Code/gimp-source//share/pkgconfig:/home/mark/Code/gimp-source//lib/pkgconfig
Called /usr/bin/pkg-config --modversion babl → 0
0.1.92
env[PKG_CONFIG_PATH]: /home/mark/Code/gimp-source//lib/x86_64-linux-gnu/pkgconfig:/home/mark/Code/gimp-source//lib64/pkgconfig:/home/mark/Code/gimp-source//share/pkgconfig:/home/mark/Code/gimp-source//lib/pkgconfig
Called /usr/bin/pkg-config --cflags babl → 0
-I/usr/include/babl-0.1
env[PKG_CONFIG_PATH]: /home/mark/Code/gimp-source//lib/x86_64-linux-gnu/pkgconfig:/home/mark/Code/gimp-source//lib64/pkgconfig:/home/mark/Code/gimp-source//share/pkgconfig:/home/mark/Code/gimp-source//lib/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
Called /usr/bin/pkg-config --libs babl → 0
-L/usr/lib/x86_64-linux-gnu -lbabl-0.1
env[PKG_CONFIG_PATH]: /home/mark/Code/gimp-source//lib/x86_64-linux-gnu/pkgconfig:/home/mark/Code/gimp-source//lib64/pkgconfig:/home/mark/Code/gimp-source//share/pkgconfig:/home/mark/Code/gimp-source//lib/pkgconfig
Called /usr/bin/pkg-config --libs babl → 0
-lbabl-0.1
Running compile:
Working directory: /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpp9yzeuoy
Command line: c++ /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpp9yzeuoy/testfile.cpp -o /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmpp9yzeuoy/output.exe -D_FILE_OFFSET_BITS=64 -O0 -fpermissive

Code:
#include<stdio.h>

    int main(void) {
        printf("%ld\n", (long)(sizeof(void *)));
        return 0;
    }

Compiler stdout:

Compiler stderr:

Program stdout:

8

Program stderr:

Running compile:
Working directory: /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmp9561ze8c
Command line: c++ /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmp9561ze8c/testfile.cpp -o /home/mark/Code/gimp-source/build/gimp/_build/meson-private/tmp9561ze8c/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -fpermissive --print-search-dirs

Code:

Compiler stdout:
install: /usr/lib/gcc/x86_64-linux-gnu/11/
programs: =/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/x86_64-linux-gnu/bin/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/x86_64-linux-gnu/bin/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/x86_64-linux-gnu/bin/
libraries: =/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/x86_64-linux-gnu/lib/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/x86_64-linux-gnu/lib/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/x86_64-linux-gnu/lib/…/lib/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/lib/:/lib/x86_64-linux-gnu/11/:/lib/x86_64-linux-gnu/:/lib/…/lib/:/usr/lib/x86_64-linux-gnu/11/:/usr/lib/x86_64-linux-gnu/:/usr/lib/…/lib/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/:/lib/:/usr/lib/

Compiler stderr:

Dependency babl found: NO found 0.1.92 but need: ‘>=0.1.98’
Invalid version of dependency, need ‘babl’ [‘>=0.1.98’] found ‘0.1.92’.
CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/bin/cmake (3.22.1)
Extracting basic cmake information
Try CMake generator: auto
Calling CMake ([‘/usr/bin/cmake’]) in /home/mark/Code/gimp-source/build/gimp/_build/meson-private/cmake_babl with:

  • “–trace-expand”
  • “–trace-format=json-v1”
  • “–no-warn-unused-cli”
  • “–trace-redirect=cmake_trace.txt”
  • “-DCMAKE_TOOLCHAIN_FILE=/home/mark/Code/gimp-source/build/gimp/_build/meson-private/cmake_babl/CMakeMesonToolchainFile.cmake”
  • “.”
    – Module search paths: [‘/’, ‘/usr’, ‘/usr/local’]
    – CMake root: /usr/share/cmake-3.22
    – CMake architectures: [‘x86_64-linux-gnu’]
    – CMake lib search paths: [‘lib’, ‘lib32’, ‘lib64’, ‘libx32’, ‘share’, ‘lib/x86_64-linux-gnu’]
    Preliminary CMake check failed. Aborting.
    Run-time dependency babl found: NO (tried cmake)

…/meson.build:343:0: ERROR: Invalid version of dependency, need ‘babl’ [‘>=0.1.98’] found ‘0.1.92’.

This is definitely not what you want to check out, it’s just Jehan’s temporary branch to tag the release.

any information on what i should be checking out for 2.99.14 building?

From your log:

So in the build environment - which is set up by the environment variables in the build script - the meson/ninja is finding babl 0.1.105, which means it finds the babl that has been built from the babl master branch into the same build prefix. This is what the build script does.

When you are building the 2.99.14 (or at least the branch you cloned that is similar to that), you likely have not set up the same build environment - that is, you have not set the same environment variables, or not set them to the same values - and thus meson/ninja are finding the babl installed on your system, which happens to be 0.1.92.

The solution to that is setting the environment variables up in the same way. One possible approach to that would be to change the build script to get 2.99.14 (preferably via its tag, instead of the temporary branch) and leave everything else as-is.

The means that the line

git clone https://gitlab.gnome.org/GNOME/gimp

in the build script is not enough, as this gets the most current state of the master branch.

You could use the following command there to get the state corresponding to the GIMP_2_99_14 tag, and also only get that exact state without the full git history by specifying the --depth=1, making the downloaded amount of data smaller:

git clone --depth 1 -b "GIMP_2_99_14" https://gitlab.gnome.org/GNOME/gimp

You are missing recent babl/gegl. You need to build recent versions of these too (babl, gegl, then gimp) with the same “prefix”. See my previous reply.

I thought I already had?

# copied and pasted into a terminal
cd $GIMP_PREFIX/build/babl
meson _build \
--prefix=${GIMP_PREFIX} \
--buildtype=release \
-Db_lto=true
cd _build
ninja
ninja install

# copied and pasted into a terminal
cd $GIMP_PREFIX/build/gegl
meson _build \
--prefix=${GIMP_PREFIX} \
--buildtype=release \
-Db_lto=true
cd _build
ninja
ninja install

# copied and pasted into a terminal
cd $GIMP_PREFIX/build/gimp
meson _build \
--prefix=${GIMP_PREFIX} \
--buildtype=release \
-Dpython=auto
cd _build
ninja
ninja install