Fatal error with #include "git-version.h"

Hi folks, I have used the following code to compile and build GIMP from git sources:

# 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

and I get the following error:

../app/version.c:36:10: fatal error: git-version.h: No such file or directory
 #include "git-version.h"
      ^~~~~~~~~~~~~~~
compilation terminated.

This has been reported by Michael Schumaker in Bug 792787 – Raise critical warnings in GUI with stacktrace for bug reporting? but I don’t understand what to do looking at the answer by Jehan.

Elle stone, are there any updates to your script?

What should I do?

Thanks

You’ll want to @-mention @Elle so she can get a notification that you mentioned her. :slight_smile: