Error compiling GIMP GIT

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:

To me it seems that gimp is trying to use the wrong glib and that gegl has nothing to do with it.

Once your gimp compile is in the state that it failed run make V=1 to see the actual commands make runs. Please paste the failing one. Maybe that will help.

Hi,
I got:

_make[5]: Nothing to be done for ‘all-am’.
make[5]: Leaving directory '/root/git/gimp-master/gimp/app/gui’
make[4]: Leaving directory '/root/git/gimp-master/gimp/app/gui’
Making all in .
make[4]: Entering directory ‘/root/git/gimp-master/gimp/app’
/bin/sh …/libtool --tag=CC --mode=link gcc -g -O2 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wlogical-op -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type -Wl,-u,gimp_vectors_undo_get_type -Wl,-u,gimp_vectors_mod_undo_get_type -Wl,-u,gimp_param_spec_duplicate -Wl,-u,gimp_operations_init -Wl,-u,xcf_init -Wl,-u,internal_procs_init -Wl,-u,gimp_plug_in_manager_restore -Wl,-u,gimp_pdb_compat_param_spec -Wl,-u,gimp_layer_mode_is_legacy -Wl,-u,gimp_lebl_dialog -o gimp-2.9 app.o errors.o language.o sanity.o signals.o tests.o unique.o version.o gimp-debug.o gimp-log.o main.o gui/libappgui.a menus/libappmenus.a actions/libappactions.a dialogs/libappdialogs.a tools/libapptools.a display/libappdisplay.a propgui/libapppropgui.a widgets/libappwidgets.a …/libgimpwidgets/libgimpwidgets-2.0.la -L/opt/gimp-master/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype xcf/libappxcf.a pdb/libappinternal-procs.a pdb/libapppdb.a plug-in/libappplug-in.a vectors/libappvectors.a core/libappcore.a file/libappfile.a text/libapptext.a paint/libapppaint.a operations/libappoperations.a operations/layer-modes/libapplayermodes.a operations/layer-modes-legacy/libapplayermodeslegacy.a gegl/libappgegl.a config/libappconfig.a …/libgimpconfig/libgimpconfig-2.0.la …/libgimpmath/libgimpmath-2.0.la …/libgimpthumb/libgimpthumb-2.0.la …/libgimpcolor/libgimpcolor-2.0.la …/libgimpmodule/libgimpmodule-2.0.la …/libgimpbase/libgimpbase-2.0.la -L/opt/gimp-master/lib -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig -lfreetype -L/opt/gimp-master/lib -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lharfbuzz -lcairo -L/opt/gimp-master/lib -lgio-2.0 -lgobject-2.0 -lglib-2.0 -L/opt/gimp-master/lib -lgegl-0.3 -lgegl-npd-0.3 -lm -Wl,–export-dynamic -lgmodule-2.0 -pthread -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lbabl-0.1 -L/opt/gimp-master/lib -lgobject-2.0 -lglib-2.0 -llcms2 -L/opt/gimp-master/lib -L/usr/local/lib -lgexiv2 -lgobject-2.0 -lglib-2.0 -lz -L/opt/gimp-master/lib -lmypaint -ljson-c -lgobject-2.0 -lglib-2.0 -lm -ljpeg
libtool: link: gcc -g -O2 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wlogical-op -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type -Wl,-u -Wl,gimp_vectors_undo_get_type -Wl,-u -Wl,gimp_vectors_mod_undo_get_type -Wl,-u -Wl,gimp_param_spec_duplicate -Wl,-u -Wl,gimp_operations_init -Wl,-u -Wl,xcf_init -Wl,-u -Wl,internal_procs_init -Wl,-u -Wl,gimp_plug_in_manager_restore -Wl,-u -Wl,gimp_pdb_compat_param_spec -Wl,-u -Wl,gimp_layer_mode_is_legacy -Wl,-u -Wl,gimp_lebl_dialog -o .libs/gimp-2.9 app.o errors.o language.o sanity.o signals.o tests.o unique.o version.o gimp-debug.o gimp-log.o main.o -Wl,–export-dynamic -pthread gui/libappgui.a menus/libappmenus.a actions/libappactions.a dialogs/libappdialogs.a tools/libapptools.a display/libappdisplay.a propgui/libapppropgui.a widgets/libappwidgets.a …/libgimpwidgets/.libs/libgimpwidgets-2.0.so -L/opt/gimp-master/lib -L/usr/local/lib -L/tmp/exiv2-0.25/xmpsdk/src -L/usr/lib64 /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so xcf/libappxcf.a pdb/libappinternal-procs.a pdb/libapppdb.a plug-in/libappplug-in.a vectors/libappvectors.a core/libappcore.a file/libappfile.a text/libapptext.a paint/libapppaint.a operations/libappoperations.a operations/layer-modes/libapplayermodes.a operations/layer-modes-legacy/libapplayermodeslegacy.a gegl/libappgegl.a config/libappconfig.a …/libgimpconfig/.libs/libgimpconfig-2.0.so …/libgimpmath/.libs/libgimpmath-2.0.so …/libgimpthumb/.libs/libgimpthumb-2.0.so …/libgimpcolor/.libs/libgimpcolor-2.0.so …/libgimpmodule/.libs/libgimpmodule-2.0.so /root/git/gimp-master/gimp/libgimpconfig/.libs/libgimpconfig-2.0.so /root/git/gimp-master/gimp/libgimpcolor/.libs/libgimpcolor-2.0.so /root/git/gimp-master/gimp/libgimpmath/.libs/libgimpmath-2.0.so /root/git/gimp-master/gimp/libgimpbase/.libs/libgimpbase-2.0.so …/libgimpbase/.libs/libgimpbase-2.0.so /opt/gimp-master/lib/libgdk_pixbuf-2.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libgthread-2.0.so /usr/lib64/libcairo.so /usr/lib64/libpixman-1.so /usr/lib64/libfontconfig.so /usr/lib64/libharfbuzz.so /usr/lib64/libfreetype.so -lbz2 /usr/lib64/libEGL.so /usr/lib64/libgbm.so /usr/lib64/libpng16.so /usr/lib64/libxcb-shm.so /usr/lib64/libXrender.so /usr/lib64/libGL.so /usr/lib64/libxcb-dri3.so /usr/lib64/libxcb-present.so /usr/lib64/libxcb-randr.so /usr/lib64/libxcb-xfixes.so /usr/lib64/libxcb-render.so /usr/lib64/libxcb-shape.so /usr/lib64/libxcb-sync.so /usr/lib64/libxshmfence.so /usr/lib64/libglapi.so /usr/lib64/libXdamage.so /usr/lib64/libXfixes.so /usr/lib64/libX11-xcb.so /usr/lib64/libxcb-glx.so /usr/lib64/libxcb-dri2.so /usr/lib64/libXxf86vm.so /usr/lib64/libXext.so /usr/lib64/libX11.so /usr/lib64/libxcb.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so /usr/lib64/libdrm.so /opt/gimp-master/lib/libgegl-npd-0.3.so /opt/gimp-master/lib/libgegl-0.3.so /opt/gimp-master/lib/libgthread-2.0.so /usr/lib64/libjson-glib-1.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgmodule-2.0.so /opt/gimp-master/lib/libgio-2.0.so /opt/gimp-master/lib/libgmodule-2.0.so /usr/lib64/libmount.so /usr/lib64/libblkid.so /usr/lib64/libuuid.so -lrt /opt/gimp-master/lib/libbabl-0.1.so /usr/lib64/liblcms2.so /usr/local/lib/libgexiv2.so /usr/lib64/libexiv2.so -lssh /usr/lib64/libcurl.so /usr/lib64/libidn.so -lssh2 /usr/lib64/libldap.so /usr/lib64/liblber.so /usr/lib64/libsasl2.so -lresolv -lssl -lcrypto /usr/lib64/libexpat.so -ldl /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/…/lib64/libstdc++.so -lz /opt/gimp-master/lib/libmypaint.so /usr/lib64/libjson-c.so /opt/gimp-master/lib/libgobject-2.0.so /usr/lib64/…/lib64/libffi.so /opt/gimp-master/lib/libglib-2.0.so /usr/lib64/libpcre.so -lpthread -lm /usr/lib64/libjpeg.so -pthread -Wl,-rpath -Wl,/usr/lib64/…/lib64
Makefile:982: recipe for target ‘gimp-2.9’ failed
make[4]: Leaving directory '/root/git/gimp-master/gimp/app’
Makefile:1206: recipe for target ‘all-recursive’ failed
make[3]: Leaving directory '/root/git/gimp-master/gimp/app’
Makefile:889: recipe for target ‘all’ failed
make[2]: Leaving directory '/root/git/gimp-master/gimp/app’
Makefile:829: recipe for target ‘all-recursive’ failed
make[1]: Leaving directory '/root/git/gimp-master/gimp’
Makefile:730: recipe for target ‘all’ failed
_

Are you working as root? :thinking:

I compile glib, babl and so on as user and install it in my home directory.

Yes I’m compiling as root.
I want install into a high privileges because sometime I clean all my home . On one PC I have little home space and to another I save onto a NAS.
What do could change for compiling working as root?

Hmm, I don’t have any advice for anyone trying to install GIMP from git as root, nor in a folder owned by root, such as /opt or even in /usr/local - been there, done that, received emails from other people who tried it, eventually it seems to cause problems. All of the above is doubly true if you also need to install glib or similar software. Leastways I don’t know how to do do any of the above without causing problems that I don’t know how to solve. Maybe someone else can help.

I do very much appreciate the desire to have GIMP installed someplace besides one’s $HOME folder. Here’s what I would advise (and also what I actually do, as not too long ago I decided to move my build folders out of my $HOME folder):

  1. As root, make a new folder on some partition that has a lot of room, maybe call the new folder something like “MyData”. Given what you describe, I’m guessing you’d be creating or at least mounting this folder on “/”, in which case it would look like this: “/MyData”.

  2. As root, “give” that new folder to your user, using “chown” and “chgrp” - I’d have to look up the exact syntax but surely someone on this list knows the exact commands to use - I use these commands fairly often but still end up looking them up every time I want to use them.

  3. Edit: As your user (not as root), build and install GIMP and all required software that’s too new to come from your package distributor in a subfolder of the new folder that you created as root and then “gave” to yourself as user, for example in “/MyData/gimpdefault”. So build glib/babl/GEGL/GIMP/etc in subfolders of “/MyData/gimpdefault/build/” and install everything in “/MyData/gimpdefault/install”.

1 Like