Error compiling GIMP GIT

Hi folks,

I am having problems with the new ‘mypaint-brushes-1.0’ dependency in Gimp git master.

When I try to compile GIMP, I get:

Error: GIMP configuration failed.

  - Error: missing dependency mypaint-brushes-1.0

See the file 'INSTALL' for more help.

Configure failed or did not finish!

I am using Antergos 64 bit. Here is the commands I have been using without any problem (up until the new ‘mypaint-brushes-1.0’ dependency):

# Set up some folders
mkdir $HOME/code
mkdir $HOME/code/gimpdefault
mkdir $HOME/code/gimpdefault/build
mkdir $HOME/code/gimpdefault/install
mkdir $HOME/code/gimpdefault/install/share
mkdir $HOME/code/gimpdefault/install/share/aclocal
touch $HOME/code/gimpdefault/install/share/aclocal/gimp-2.0.m4

# Clone the software — add to this list as needed on your system.
cd $HOME/code/gimpdefault/build
git clone git://git.gnome.org/glib
git clone git://git.gnome.org/babl
git clone git://git.gnome.org/gegl
git clone git://github.com/mypaint/libmypaint.git
git clone git://git.gnome.org/gimp

# Set up the prefix
PREFIX=$HOME/code/gimpdefault/install
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
#export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
export GIO_EXTRA_MODULES=/usr/lib/gio/modules
export SRC_DIR=$HOME/code/gimpdefault/build

# Build and install glib/babl/GEGL/libmypaint/GIMP in the
# prefix — add to this list as needed on your system.

cd $SRC_DIR/glib
./autogen.sh --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/babl
./autogen.sh --prefix=$PREFIX --disable-docs
make -j3 && make -j3 install

cd $SRC_DIR/gegl
./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop
make -j3 && make -j3 install

cd $SRC_DIR/libmypaint
git checkout v1.3.0
./autogen.sh --prefix=$PREFIX
./configure --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/gimp
./autogen.sh --prefix=$PREFIX --with-gimpdir=$HOME/code/gimpdefault/install/config --disable-gtk-doc
make -j3 && make -j3 install

Any suggestions on what I need to do to successfully build GIMP?

Thanks

Did the libmypaint build work out/files ended up in the right dir? Maybe try adding export in front of the PREFIX= statement.

The directory code/gimpdefault/build/libmypaint is populated with stuff.

How would do the “adding export in front of the PREFIX= statement”?

Like this:

# Set up the prefix 
export PREFIX=$HOME/code/gimpdefault/install

Not working, I still get the error:

Error: GIMP configuration failed.

  - Error: missing dependency mypaint-brushes-1.0

See the file 'INSTALL' for more help.

Configure failed or did not finish!

Here’s the code I am running:

# Set up some folders
mkdir $HOME/code
mkdir $HOME/code/gimpdefault
mkdir $HOME/code/gimpdefault/build
mkdir $HOME/code/gimpdefault/install
mkdir $HOME/code/gimpdefault/install/share
mkdir $HOME/code/gimpdefault/install/share/aclocal
touch $HOME/code/gimpdefault/install/share/aclocal/gimp-2.0.m4

# Clone the software — add to this list as needed on your system.
cd $HOME/code/gimpdefault/build
git clone git://git.gnome.org/glib
git clone git://git.gnome.org/babl
git clone git://git.gnome.org/gegl
git clone git://github.com/mypaint/libmypaint.git
git clone git://git.gnome.org/gimp

# Set up the prefix
export PREFIX=$HOME/code/gimpdefault/install
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
#export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
export GIO_EXTRA_MODULES=/usr/lib/gio/modules
export SRC_DIR=$HOME/code/gimpdefault/build

# Build and install glib/babl/GEGL/libmypaint/GIMP in the
# prefix — add to this list as needed on your system.

cd $SRC_DIR/glib
./autogen.sh --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/babl
./autogen.sh --prefix=$PREFIX --disable-docs
make -j3 && make -j3 install

cd $SRC_DIR/gegl
./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop
make -j3 && make -j3 install

cd $SRC_DIR/libmypaint
git checkout v1.3.0
./autogen.sh --prefix=$PREFIX
./configure --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/gimp
./autogen.sh --prefix=$PREFIX --with-gimpdir=$HOME/code/gimpdefault/install/config --disable-gtk-doc
make -j3 && make -j3 install

How can I fix this? How can I install the ‘‘mypaint-brushes-1.0’’ dependency?

There was a recent change to configure.ac in GIMP by Jehan. My guess is you need the data package

diff --git a/configure.ac b/configure.ac
index 04429b8..156085a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1672,6 +1672,8 @@ AM_CONDITIONAL(HAVE_WEBP, test "x$have_webp" = xyes)
 PKG_CHECK_MODULES(LIBMYPAINT, libmypaint >= libmypaint_required_version,,
                   [add_deps_error([libmypaint >= libmypaint_required_version])])
 
+PKG_CHECK_MODULES(MYPAINT_BRUSHES, mypaint-brushes-1.0,,
+                  [add_deps_error([mypaint-brushes-1.0])])
 
 ##################
 # Check for webkit

Simple:

Add git clone https://github.com/Jehan/mypaint-brushes to the clone section, then add $PREFIX/share/pkgconfig to the PKG_CONFIG_PATH line. Finally add autogen, configure, make, make install for mypaint-brushes. Done.

Edit: You also need to switch to the v1.3.x branch of mypaint-brushes!
If any of the steps are not clear just ask, we can sort that out and fix the script.

There’s a thread on the GIMP dev list about compiling the mypaint-brushes - several people ran into various “gotchas”, so here’s the link in case it helps anyone on pixls:

http://gimp.1065349.n5.nabble.com/Compiling-GIMP-2-9-with-the-new-mypaint-requirements-td52332.html

Thanks! I tried to fix the script but was unsuccessful! Could you guys fix the script I was trying just now:

# Set up some folders
mkdir $HOME/code
mkdir $HOME/code/gimpdefault
mkdir $HOME/code/gimpdefault/build
mkdir $HOME/code/gimpdefault/install
mkdir $HOME/code/gimpdefault/install/share
mkdir $HOME/code/gimpdefault/install/share/aclocal
touch $HOME/code/gimpdefault/install/share/aclocal/gimp-2.0.m4

# Clone the software — add to this list as needed on your system.
cd $HOME/code/gimpdefault/build
git clone git://git.gnome.org/glib
git clone git://git.gnome.org/babl
git clone git://git.gnome.org/gegl
git clone git://github.com/mypaint/libmypaint.git
git clone git://git.gnome.org/gimp
git clone https://github.com/Jehan/mypaint-brushes

# Set up the prefix
export PREFIX=$HOME/code/gimpdefault/install
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
#export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export PKG_CONFIG_PATH=$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH
export GIO_EXTRA_MODULES=/usr/lib/gio/modules
export SRC_DIR=$HOME/code/gimpdefault/build

# Build and install glib/babl/GEGL/libmypaint/GIMP in the
# prefix — add to this list as needed on your system.

cd $SRC_DIR/glib
./autogen.sh --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/babl
./autogen.sh --prefix=$PREFIX --disable-docs
make -j3 && make -j3 install

cd $SRC_DIR/gegl
./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop
make -j3 && make -j3 install

cd $SRC_DIR/libmypaint
git checkout v1.3.0
./autogen.sh --prefix=$PREFIX
./configure --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/mypaint-brushes
git checkout v1.3.0
./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop
make -j3 && make -j3 install

cd $SRC_DIR/gimp
./autogen.sh --prefix=$PREFIX --with-gimpdir=$HOME/code/gimpdefault/install/config --disable-gtk-doc
make -j3 && make -j3 install

Thank you very much!

Were there errors, or the same error as before?

This was before, and I think you need to add the share dir as mentioned by @houz to that command, for instance
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH

Thanks! Using the following script:

# Set up some folders
mkdir $HOME/code
mkdir $HOME/code/gimpdefault
mkdir $HOME/code/gimpdefault/build
mkdir $HOME/code/gimpdefault/install
mkdir $HOME/code/gimpdefault/install/share
mkdir $HOME/code/gimpdefault/install/share/aclocal
touch $HOME/code/gimpdefault/install/share/aclocal/gimp-2.0.m4

# Clone the software — add to this list as needed on your system.
cd $HOME/code/gimpdefault/build
git clone git://git.gnome.org/glib
git clone git://git.gnome.org/babl
git clone git://git.gnome.org/gegl
git clone git://github.com/mypaint/libmypaint.git
git clone git://git.gnome.org/gimp
git clone https://github.com/Jehan/mypaint-brushes

# Set up the prefix
export PREFIX=$HOME/code/gimpdefault/install
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
#export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH
export GIO_EXTRA_MODULES=/usr/lib/gio/modules
export SRC_DIR=$HOME/code/gimpdefault/build

# Build and install glib/babl/GEGL/libmypaint/GIMP in the
# prefix — add to this list as needed on your system.

cd $SRC_DIR/glib
./autogen.sh --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/babl
./autogen.sh --prefix=$PREFIX --disable-docs
make -j3 && make -j3 install

cd $SRC_DIR/gegl
./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop
make -j3 && make -j3 install

cd $SRC_DIR/libmypaint
git checkout v1.3.0
./autogen.sh --prefix=$PREFIX
./configure --prefix=$PREFIX
make -j3 && make -j3 install

cd $SRC_DIR/mypaint-brushes
./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop
make -j3 && make -j3 install

cd $SRC_DIR/gimp
./autogen.sh --prefix=$PREFIX --with-gimpdir=$HOME/code/gimpdefault/install/config --disable-gtk-doc
make -j3 && make -j3 install

I get the following error:

Error: GIMP configuration failed.

  - Error: missing dependency mypaint-brushes-1.0

See the file 'INSTALL' for more help.

Configure failed or did not finish!

Try the following:

# Set up some folders
mkdir -p $HOME/code/gimpdefault/build
mkdir -p $HOME/code/gimpdefault/install/share/aclocal
touch $HOME/code/gimpdefault/install/share/aclocal/gimp-2.0.m4

# Clone the software — add to this list as needed on your system.
cd $HOME/code/gimpdefault/build
git clone git://git.gnome.org/glib
git clone git://git.gnome.org/babl
git clone git://git.gnome.org/gegl
git clone git://github.com/mypaint/libmypaint.git
git clone git://git.gnome.org/gimp
git clone https://github.com/Jehan/mypaint-brushes

# Set up the prefix
export PREFIX=$HOME/code/gimpdefault/install
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
#export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH
export GIO_EXTRA_MODULES=/usr/lib/gio/modules
export SRC_DIR=$HOME/code/gimpdefault/build

# Build and install glib/babl/GEGL/libmypaint/GIMP in the
# prefix — add to this list as needed on your system.

cd $SRC_DIR/glib
./autogen.sh --prefix=$PREFIX
make -j3 install

cd $SRC_DIR/babl
./autogen.sh --prefix=$PREFIX --disable-docs
make -j3 install

cd $SRC_DIR/gegl
./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop
make -j3 install

cd $SRC_DIR/libmypaint
git checkout v1.3.0
./autogen.sh --prefix=$PREFIX
./configure --prefix=$PREFIX
make -j3 install

cd $SRC_DIR/mypaint-brushes
git checkout v1.3.x
./autogen.sh
./configure --prefix=$PREFIX
make -j3 install

cd $SRC_DIR/gimp
./autogen.sh --prefix=$PREFIX --with-gimpdir=$HOME/code/gimpdefault/install/config --disable-gtk-doc
make -j3 && make -j3 install

Thanks houz!

That works great!

For future reference, I am using Antergos 64 bit (Arch linux, really)!

Hi.
I’m on Arch Linux, and I added the archlinuxcn repository so to have gimp-git compiled as a package, together with its dependencies. Only problem encountered so far has been a regression on gegl-git, which has been solved. I found this when looking for a gimp package in the AUR.

Hi Dario,

Thanks for the suggestion. Using this script works very well for me: it builds a new GIMP in 5 minutes!

And it is a local copy, so I can always have GIMP 2.8 installed on my system and then compare the two :stuck_out_tongue:

The biggest advantage of using the script is you can modify the source code and compile straight away using make!

Hi. I’ve used your script and it works. Could be nice to have it in evidence somewhere, and maintaining it maybe using git.

Thanks.

Dario

The script “as written” won’t work on all versions of Linux because of differences in how the “lib” and “GIO” folders are named/located.

I just now updated (hopefully without mistakes) my “Building GIMP for artists and photographers” article to reflect the recent addition of the mypaint brushes as a dependency:

https://ninedegreesbelow.com/photography/build-gimp-in-prefix-for-artists.html

@SheetM - if you happened to get the script commands from the bottom of my “how to” article (the comments, commands and folders are a match), then I apologize for not immediately updating the article once the information had been provided on the GIMP dev mailing list on how to get GIMP to actually find the mypaint brushes.

For people who’ve never built GIMP from git before, if you think you might like to give it a try my “how to” gives some basic information on setting up a development environment plus some Linux-OS-specific information on getting the dependencies and setting up the prefix and build folders.

Manjaro / Arch has now mypaint-brushes in AUR

Something I’ve wanted to know for a long time, to add to my “how to build GIMP” article, is there a command for Arch that allows to install the dependencies for a software package, without also installing the actual package?

For example, for Debian the command for installing the dependencies for GIMP is sudo apt-get build-dep gimp, and for OpenSUSE it’s zypper si -d gimp.