Error compiling GIMP GIT

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.

I don’t know if there is a single command, but you can install dependencies from AUR repos of gegl-git, babl-git, libmypaint-git and so on… I have not done that because I want GIMP 2.8 installed on my system in order to compare performance/results with current GIMP 2.9.x.

I am not sure about the insane amount of dependencies like libtool or gtk-doc… How I got them installed in arch… hum… I can’t remember… maybe I’ve installed them alongside some other programs or with babl-git, gegl-git, etc…

No worries! That page is awesome!

pacman -Si

gives you, albeit in human readable form, the list of the dependencies of a package. With some script one could extract them from the output.

Hi @Dario - I did once install Arch on a laptop, but never managed to make the transition from the “Gentoo way” to the “Arch way”, though Arch package documentation is awesome and often a lot more helpful than Gentoo documentation, even when I’m trying to solve a Gentoo problem.

So here’s another question about Arch. If you run the command pacman -Si gimp (did I even get that much right?), and then you install all the listed dependencies, does this give you the “development files” along with the binaries?

To explain what I mean, in Gentoo, installing a package automatically installs the developement files. In most distributions, the “dev/devel” files have to be installed separately.

At least on a Antergos system I don’t seem to have the folder /dev/devel.

Not an expert…
I don’t know if possible with Manjaro + AUR. I install manually the evident dependencies (babl…) and sometimes while compiling I get a message “needs gegl version >= x.y” or “missing dependency myp…”. So I install it and recompile gimp (the bovine’s method…)

Oh, my apologies! I didn’t speak very clearly at all. What I meant was that in Debian, OpenSUSE, etc, let’s say you install “libpng”. All you get is the compiled code. You don’t get the headers and such that you’d need to actually compile the code yourself. So to get this “other stuff” for Debian-based distributions, you’d install “libpng-dev” as well as “libpng”. Some distributions use “libpng-devel” instead of “libpng-dev”.

Hi.
As far as I know, I never had to install any -dev packages (I understand what you mean) in order to compile something. I just had to install the packages and everything was at its place.
If you

pacman -Ql

a package of a library installed on your machine (-Ql gives you the list of files belonging to the package), you can see that .h files are included.

Hope to help

Ciao

Hi @Dario and thanks! I updated my “how to build” article - I’d been looking for this information about Arch for a long time.

Hi All,
as Elle Stone hints I set:

PREFIX=/usr/local/gimp-master
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 PKG_CONFIG_PATH=$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH
export GIO_EXTRA_MODULES=$PREFIX/lib/gio/modules
export SRC_DIR=$HOME/usr/local/gimp-master/build

for my necessities, but after installed babl and gegl I get:

…CC gimp_console_2.9-version.o
CCLD gimp-console-2.9
AR libapp.a
CCLD gimp-2.9
core/libappcore.a(gimpimage-undo.o): In function gimp_image_undo_push': /root/git/gimp-master/gimp/app/core/gimpimage-undo.c:402: undefined reference tog_object_new_with_properties’
collect2: error: ld returned 1 exit status
Makefile:986: recipe for target ‘gimp-console-2.9’ failed
make[4]: *** [gimp-console-2.9] Error 1
make[4]: *** Waiting for unfinished jobs…
gui/libappgui.a(gui-vtable.o): In function gui_pdb_dialog_new': /root/git/gimp-master/gimp/app/gui/gui-vtable.c:546: undefined reference tog_object_new_with_properties’
core/libappcore.a(gimpimage-undo.o): In function gimp_image_undo_push': /root/git/gimp-master/gimp/app/core/gimpimage-undo.c:402: undefined reference tog_object_new_with_properties’
collect2: error: ld returned 1 exit status
Makefile:982: recipe for target ‘gimp-2.9’ failed
make[4]: *** [gimp-2.9] Error 1
make[4]: Leaving directory '/root/git/gimp-master/gimp/app’
Makefile:1206: recipe for target ‘all-recursive’ failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/root/git/gimp-master/gimp/app’
Makefile:889: recipe for target ‘all’ failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/root/git/gimp-master/gimp/app’
Makefile:829: recipe for target ‘all-recursive’ failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/git/gimp-master/gimp’
Makefile:730: recipe for target ‘all’ failed
make: *** [all] Error 2

The function g_object_new_with_properties which is not found would have be into include/glib-2.0/gobject/gobject.h of glib-2.0 2.55.1 from git I installed with the setting before.
It seems gimp points to glib2-0 2.46 I have from my distro ( Slackware) where g_object_new_with_properties there isn’t.

with the command pkg-config I have
–libs glib-2.0
-L/usr/local/gimp-master/lib -lglib-2.0

I’m confused…

Can anyone help me??
What I 'm missing??

Cheers
Gabriele

I’m not sure if this helps. I started from @Elle build instructions, but used the shipped version of glib on Debian 9 because Gimp configure complained about missing glib-networking. Since recently Gimp requires a newer glib version than Debian 9 ships. So I added glib and glib-networking to my personal build instructions:

cd $HOME/Linux/gimp/gimpdefault/build
git clone git://git.gnome.org/glib
git clone git://git.gnome.org/glib-networking

glib-networking doesn’t contain any build instruction after cloning. Shame on me, but I don’t know how to add them. So I downloaded the latest release of glib-networking-2.54.1 and used that instead of the git version:

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

cd $SRC_DIR/glib-networking-2.54.1
./configure --prefix=$PREFIX
make -j3 && make -j3 install

Gimp builds und runs fine for me. I attach my personal build instructions, but without any waranty.
gimp_compilieren.txt (2.3 KB)

Hi thanks for the info, I’l get a try…
for glib-networking I understood it use a new configure tool . It’s called meson.

I typed:

meson directory where you want to build (as meson builddir)
then
into directory where you want to build (as builddir )

ninja

Cheers
Gabriele

@Carmelo_DrRaw
I investigated more and I found my libgegl points to /usr /lib64 instead /opt/gimp-master/lib I think because is hardcoded rpath with /usr/lib64 where I have glib 2.46 where there isn’t function g_object_new_with_properties I ran configure with --disable-rpath but nothing is changed. I ran configure with LDFLAGS="-L/opt/gimp-master/lib" but nothing is changed.

hints??

Try setting PKG_CONFIG_PATH to point to /opt/gimp-master/lib/pkgconfig

Hi houz,
it was done

PREFIX=/opt/gimp-master
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 PKG_CONFIG_PATH=$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH

I see. And glib is installed in /opt/gimp-master/?

That being said I am a little confused. Is it gegl that isn’t found or glib?

Hi, I installed
babl,gegl,glib2-2.55.1,glib-networking,GDK-Pixbuf,json-lib ( now I go by memory) all into /opt/gimp-master.

When I compile gimp with make I have the error g_object_new_with_properties is not found.
If I grep g_object_new_with_properties into /opt/gimp-master I found it is into libgobject (glib2-2.55.1) library.
Therefore I concluded the fault is gimp points to libgegl into /opt/gimp-master/lib which points to glib2-2.46 into /usr/lib64 or to libgegl into /usr/local/lib which point to glib2-2.46 ( yes I have another gegl library for gimp-cce).

I don’t know if I’m clear …:roll_eyes: