Just to clarify further, here is the instructions I have been 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
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/x86_64-linux-gnu/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
./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
when I get to the lines
cd $SRC_DIR/gimp
./autogen.sh --prefix=$PREFIX --with-gimpdir=$HOME/code/gimpdefault/install/config --disable-gtk-doc
I get the error:
WARNING: GCC 7.2.0 has a serious bug affecting GEGL/GIMP. We advise
against using this version of the compiler (previous and
further versions are fine).
See https://bugzilla.gnome.org/show_bug.cgi?id=787222
Error: GIMP configuration failed.
- Error: missing dependency libmypaint >= 1.3.0
See the file 'INSTALL' for more help.
Configure failed or did not finish!
If I do âdpkg -s libmypaintâ I get:
dpkg-query: package 'libmypaint' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
and the same for glib, babl and gegl. For example, for babl I get:
dpkg-query: package 'babl' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
However, it is weird as I successfully compiled GLIB, GEGL, BABL and LIBMYPAINT without any errorsâŚ
Any idea of what could be going wrong?
We should ping @Elle to see if her build instructions are up to date (not that this is the problem, but better to remove uncertainty). I can try building it on another machine shortly to test with you, but itâll be a little later today.
This is the first problem. You just canât compile GIMP from git using gcc 7.2.0 - the problem is well-documented in the linked-to bug report.
If memory serves me correctly - and someone please correct me if Iâm wrong - dpkg searches for files that are installed by a debian-based package manager. The package manager has no way of knowing what is installed in the GIMP prefix. The point of installing in a prefix is to avoid having the packages installed in the prefix interfere with packages installed by the package manager. So itâs good that dpkg doesnât find the software that is installed in the prefix.
The only thing that might cause a problem in the instructions in my article is libmypaint. The workaround is to reset the libmypaint git code back to a particular commit, which was before one of the functions that GIMP uses was changed in libmypaint, but not in GIMP-2.9. GIMP needs the equivalent of libmypaint 1.3.
To reset libmypaint from git back to the correct âlast good commit for GIMP-2.9â, first uninstall libmypaint from the prefix, and then run this command in the libmypaint build folder:
At this point the command âgit logâ run in the libmypaint folder should show this:
commit c196a86886fce9b3c9980a4412f4ce3847855493 (HEAD -> master)
Merge: 4213d8c 1bc955b
Author: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Tue May 23 00:17:18 2017 -0400
Merge pull request #84 from QuLogic/build-cleanup
Build cleanup
Then reinstall libmypaint starting from ./autogen.sh
Maybe something has changed upstream in libmypaint to make the above libmypaint workaround unnecessary, but I sort of think not. Right now Iâm using libmypaint 1.3 from gentoo portage instead of building it myself. But when I was building it from git, the only way that I know of to get GIMP to work with libmypaint from git was to reset libmypaint back to the above commit.
It is a shame that Ubuntu 17.10 comes with GCC 7.2.0 pre-installed. My next step is to install a different version of gcc! Then I will check if I still get the same type of problem with libmypaint.
I am not sure⌠Doesnât seem too easy to do. Now maybe the best alternative is to downgrade to Ubuntu 17.04 or 16.04. And hope that gcc 7.2 is not installed with the updates!
My impression is that compiling gcc is not very easy to do. Would it be worth your while to file a bug report with Ubuntu, and point them to this gcc bug report?
It might actually be easiest to switch your compiler from gcc to clang for now (until the bug fix is available in the repos). You should be able to just install clang from the package repos and then set export CC=clang to get clang instead of gcc.
Thanks Michael Henning, I have managed to build a GIMP binary using clang 4.0.1 using
CC=clang
and the trick by patdavid also solved my problem with libmypaint:
git clone https://github.com/mypaint/libmypaint.git
cd libmypaint/
git checkout v1.3.0
Now, when I try to execute the binary, it displays:
Liblcms2 version mismatch!
GIMP was compiled against LittleCMS version 2.8, but the
LittleCMS version found at runtime is only 2.7.
Somehow you or your software packager managed
to install a LittleCMS that is older than what GIMP was
built against.
Please make sure that the installed LittleCMS version
is at least 2.8 and that headers and library match.
I have downloaded liblcms2-2 version 2.8 from:
then went to the folder and did:
./configure
make
sudo make install
but still no luck. Any ideas how to get around this?
After establishing the prefix and installing lcms 2.8 in the prefix folder, did you recompile babl/GEGL/libmypaint/GIMP starting from ./autogen.sh?
Iâm not sure if everything from babl forward needs to be recompiled. But better to be on the safe side as babl/GEGL/libmypaint compile fairly quickly, and GIMP does not.
I have downloaded it to $PREFIX/lcms2-2.8 and then run
./configure
make
sudo make install
After that I ran:
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
./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
but it is still displaying the error:
Liblcms2 version mismatch!
GIMP was compiled against LittleCMS version 2.8, but the
LittleCMS version found at runtime is only 2.7.
Somehow you or your software packager managed
to install a LittleCMS that is older than what GIMP was
built against.
Please make sure that the installed LittleCMS version
is at least 2.8 and that headers and library match.
Hmm, why use âsudoâ to install lcms in the prefix? This seems like not a good idea. Did lcms actually install in the prefix? Or maybe in /usr/local? I donât know where lcms defaults to for the install prefix if one isnât specified.
Try âmake uninstall && make cleanâ for lcms-2.8. And then use ./autogen.sh --prefix=$PREFIX when installing lcms, and check to make sure itâs really installed in the prefix.
Also try uninstalling and cleaning and maybe even âgit clean -xdfâ for babl/GEGL/GIMP, before running the ./autogen.sh command to reinstall, after making sure lcms really is installed in the prefix.
Hmm, âwhereisâ is one of those nice little commands that I never remember to make note of. But it doesnât tell you what version of lcms2 is installed.
Anyway, no doubt you already had lcms2 installed through the Ubuntu package manager. You might have installed over the top of the package manager version with the âsudoâ command during the first install of 2.8. Or maybe it got installed in /usr/local. So check /usr/local/include to see if lcms2.h is also there.
To see if there is a version of lcms in the prefix, look in the prefix install folder (well, thatâs the actual $PREFIX folder when you are following my how to build guide). If you see " . . . /install/include/lcms2.h" (where " . . . /" is where you put everything for installing GIMP-2.9), then lcms2 is installed in the prefix. Also you should see " . . . /install/bin/tificc".
If you type â/usr/bin/tificcâ one of the first couple of lines of ouput tells you which version of lcms has been installed in /usr. Hereâs what I see:
$ /usr/bin/tificc
little cms ICC profile applier for TIFF - v6.2 [LittleCMS 2.08]
Let me know what you find in the various places that various versions of lcms2 might be hiding, and then it will be easier to figure out the next step.
Yes, thatâs why lcms 2.8 needs to be compiled from source and installed in the same folders as babl/GEGL/GIMP from git. I was just giving an example of what the tificc output looks like, because thatâs an easy way to see which version of lcms is installed.
If lcms-2.8 is successfully installed in the prefix, then the corresponding âtificcâ will be located in $PREFIX/bin, in which case the command would be â$PREFIX/bin/tificcâ.