Error compiling GIMP GIT

Before family live took over, I used Gentoo for several years. Although it worked very well and was fast as hell, I would say it was very time consuming to maintain the system and keep running. My gut feeling suggests do not step into this, execpt running bleding edge software is your main interest.

If it is only Gimp and darktable, Debian stable does it. Debian testing would be a rolling release system as well.

I run Gentoo, but I agree 100% with @pk5dark . Gentoo is an excellent distribution for learning the ins and outs of Linux. It allows for a lot of flexibility, which is why I prefer Gentoo over other Linux distributions. But I would never recommend for anyone to switch to Gentoo just to get bleeding edge software:

First, Gentoo requires learning a lot more new stuff than you might actually want to learn. It certainly requires learning more than I want to learn. Ask me how long it’s been since I updated my kernel, and then ask me why. Actually no, don’t ask, because I don’t want to talk about it.

Second, Gentoo requires a fast internet connection and a fast computer for compiling from source every single time you update to pull in the latest software, preferably with enough RAM to allow building entirely in RAM. Ask me how long it took to do a required profile upgrade yesterday, which required recompiling and reinstalling every single package on my system, using a very specific sequence of commands. Ask me how I intend to deal with the 715 config files that now need updating. No, don’t ask, because I don’t want to talk about it :slight_smile: .

Third, not all software in the official Gentoo repository is as up-to-date as you might need. For example, right now I have to compile libvips from source if I want to install PhotoFlow, which of course also needs to be compiled from source as it’s not available from Gentoo portage. Also for GIMP 2.9, I have to install glib in the GIMP prefix, because the version of glib in Gentoo isn’t current enough, though usually it is.

If you want to switch distributions to a rolling distribution, Debian testing is a good option. Also think about OpenSUSE Tumbleweed. I think Arch also is a rolling distribution?

OpenSUSE has the nice feature that a lot of cutting-edge packages are already compiled and ready to install, whether you run Tumbleweed or simply keep up with the latest release versions of OpenSUSE. For example see:

https://software.opensuse.org/package/gimp

which shows several options for installing GIMP 2.9.9.

2 Likes

Well, the requirements are “minimum version” requirements. So install the latest of the two versions in your prefix for GIMP 2.9, or install glib from git in your prefix, which can be riskier than installing an official release version, but usually works just fine.

GEGL is actually used by software other than GIMP. So it’s entirely possible that someone might want to install GEGL without also installing GIMP, in which case “what GIMP needs” and what “some other software needs” in terms of GEGL and also in terms of other libraries such as glib, are likely to be very different. This is one of the advantages of compiling software in a prefix - if done correctly, you can install for example glib and GEGL in one prefix for GIMP, and agan in another prefix for some other software, without causing any unwanted interaction between the versions of GEGL and glib in the two different prefixes.

You might find this older article useful to peruse:

Build GIMP 2.9 from git, GIMP 2.8, & GIMP 2.6,
each in its own prefix
https://ninedegreesbelow.com/photography/build-gimp-in-prefix.html

As you might guess, library version requirements for GIMP 2.9, 2.8, and 2.6 are very different. 2.6 required libraries that were “too old” to be in my Linux repository, and 2.9 required libraries that were “too new” to be in my Linux repository. But using three different prefixes allowed all three versions to be installed, all at once, and even run all at the same time.

When I switched to Linux it was I was tired of that antivirus which rotated for minutes and those virus and malwares which were annunced.
In theese eleven years I wanted to learn more possible about this new system which was and which is unknown to most. Actually when I talk with someone and I say I have “Linux”, they say: “what?”; or “Linux, but switch to W…s”.
I’m very proud to have a Linux distro on all my pc’s (laptop,desktop,raspberry,router,NAS etc.) and I wish to understand more possible about it.

After, it arrived Photography passion and to have the lastest function is necessary for competing with friends which have the others softwares.:roll_eyes:

However the first wish is to understand in deep this amazing world of FOSS’s and if a distro force me to that depth it 's not bad.

I’ll decide…

PS. I’ll never stop to thank, sufficiently who codes in FOSS.

Cheers
Gabriele

1 Like

ahhrg…:face_with_raised_eyebrow:
I compiled gimp into /home/gabriele/code/gimpdefault with this hint but the issue is the same:

I have

Making all in .
make[4]: Entering directory ‘/home/gabriele/code/gimpdefault/build/gimp/app’
_ CCLD gimp-2.9

_ CCLD gimp-console-2.9_
core/libappcore.a(gimpimage-undo.o): In function gimp_image_undo_push':_ _/home/gabriele/code/gimpdefault/build/gimp/app/core/gimpimage-undo.c:402: undefined reference to g_object_new_with_properties’
/home/gabriele/code/gimpdefault/install/lib/libgio-2.0.so: undefined reference to g_build_filename_valist'_ _/home/gabriele/code/gimpdefault/install/lib/libgio-2.0.so: undefined reference to g_sequence_is_empty’
collect2: error: ld returned 1 exit status
Makefile:985: 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':_ _/home/gabriele/code/gimpdefault/build/gimp/app/gui/gui-vtable.c:546: undefined reference to g_object_new_with_properties
core/libappcore.a(gimpimage-undo.o): In function gimp_image_undo_push':_ _/home/gabriele/code/gimpdefault/build/gimp/app/core/gimpimage-undo.c:402: undefined reference to g_object_new_with_properties’
/home/gabriele/code/gimpdefault/install/lib/libgio-2.0.so: undefined reference to g_build_filename_valist'_ _/home/gabriele/code/gimpdefault/install/lib/libgio-2.0.so: undefined reference to g_sequence_is_empty’
collect2: error: ld returned 1 exit status
Makefile:981: recipe for target ‘gimp-2.9’ failed
make[4]: *** [gimp-2.9] Error 1
_
and after

make V=1, I have

/usr/lib64/libglib-2.0.so […] /opt/gimp-master/lib/libglib-2.0.so

:expressionless:

echo $PREFIX $PATH $LD_LIBRARY_PATH $XDG_DATA_DIRS $ACLOCAL_FLAGS $PKG_CONFIG_PATH $GIO_EXTRA_MODULES $SRC_DIR

give
/home/gabriele/code/gimpdefault/install /home/gabriele/code/gimpdefault/install/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/opt/blender:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/lib64/qt5/bin:/usr/share/texmf/bin /home/gabriele/code/gimpdefault/install/lib: /home/gabriele/code/gimpdefault/install/share:/usr/share:/usr/share:/usr/local/share:/home/gabriele/.kde/share/ -I /home/gabriele/code/gimpdefault/install/share/aclocal /home/gabriele/code/gimpdefault/install/share/pkgconfig:/home/gabriele/code/gimpdefault/install/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig /home/gabriele/code/gimpdefault/install/lib/gio/modules /home/gabriele/code/gimpdefault/build

I do not know what to do now…
I’ll try to install glib from git into my distro glib location :neutral_face:

Have you considered trying the GIMP AppImage? It is intended exactly for this kind of cases. Just download the latest package and make it executable…

The appimage is updated every Thursday.

Hi,
yes tried it and it works.
Thanks

@dafrasaga wants to do it for the experience but nowadays we are fortunate enough to have most packages pre-built for our system.

BTW @dafrasaga, you could truncate long blocks of code by using three back ticks like so:

```
#Insert command line output.
```

turns into

#Insert command line output.

I could be wrong, but I think that’s not a safe thing to do!

It definitely isn’t.

That does indicate that GIMP isn’t seeing the right version of glib. When you look in “/home/gabriele/code/gimpdefault/install/bin”, do you see any glib executables? For example, in my own “gimpdefault/install/bin” I see these: gapplication gdbus gdbus-codegen gio gio-querymodules glib-compile-resources glib-compile-schemas glib-genmarshal glib-gettextize glib-mkenums gobject-query gresource gsettings gtester gtester-report. And of course there’s also glib “stuff” in the include, lib, and share folders.

Hmm, “echoing” all that at once makes it very difficult to read. Here’s what the information looks like when sorted out, one “echo” at a time:

$PREFIX: /home/gabriele/code/gimpdefault/install 

$PATH: /home/gabriele/code/gimpdefault/install/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/opt/blender:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/lib64/qt5/bin:/usr/share/texmf/bin 

$LD_LIBRARY_PATH: /home/gabriele/code/gimpdefault/install/lib: 

$XDG_DATA_DIRS: /home/gabriele/code/gimpdefault/install/share:/usr/share:/usr/share:/usr/local/share:/home/gabriele/.kde/share/ 

$ACLOCAL_FLAGS: /home/gabriele/code/gimpdefault/install/share/aclocal 

$PKG_CONFIG_PATH: /home/gabriele/code/gimpdefault/install/share/pkgconfig:/home/gabriele/code/gimpdefault/install/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig 

$GIO_EXTRA_MODULES:  /home/gabriele/code/gimpdefault/install/lib/gio/modules

$SRC_DIR: /home/gabriele/code/gimpdefault/build

Comparing your ouput to what I see after establishing the prefix and build folders for GIMP, one thing that stands out is the result of echo $GIO_EXTRA_MODULES. You get home/gabriele/code/gimpdefault/install/lib/gio/modules. I get this:

echo $GIO_EXTRA_MODULES
/usr/lib/gio/modules

This is almost certainly a problem, even if it’s not the problem. Your system “gio extra modules” are probably located at “/usr/lib/gio/modules” or “/usr/lib64/gio/modules” or “/usr/lib/x86_64-linux-gnu/gio/modules”, or something similar, depending on what version of Linux you are using.

Hi Elle,
into bin,include and share I have

Summary

bin/:
total 1572
-rwxr-xr-x 1 gabriele gabriele 41696 Jan 24 07:06 gapplication
-rwxr-xr-x 1 gabriele gabriele 209800 Jan 24 17:56 gcut
-rwxr-xr-x 1 gabriele gabriele 140120 Jan 24 07:06 gdbus
-rwxr-xr-x 1 gabriele gabriele 2085 Jan 24 07:06 gdbus-codegen
-rwxr-xr-x 1 gabriele gabriele 28560 Jan 24 17:51 gdk-pixbuf-csource
-rwxr-xr-x 1 gabriele gabriele 23736 Jan 24 17:51 gdk-pixbuf-pixdata
-rwxr-xr-x 1 gabriele gabriele 37328 Jan 24 17:51 gdk-pixbuf-query-loaders
-rwxr-xr-x 1 gabriele gabriele 43128 Jan 24 17:52 gdk-pixbuf-thumbnailer
-rwxr-xr-x 1 gabriele gabriele 76928 Jan 24 17:56 gegl
-rwxr-xr-x 1 gabriele gabriele 29016 Jan 24 17:56 gegl-imgcmp
-rwxr-xr-x 1 gabriele gabriele 271736 Jan 24 07:06 gio
-rwxr-xr-x 1 gabriele gabriele 25856 Jan 24 07:06 gio-querymodules
-rwxr-xr-x 1 gabriele gabriele 111040 Jan 24 07:06 glib-compile-resources
-rwxr-xr-x 1 gabriele gabriele 152184 Jan 24 07:06 glib-compile-schemas
-rwxr-xr-x 1 gabriele gabriele 40929 Jan 24 07:06 glib-genmarshal
-rwxr-xr-x 1 gabriele gabriele 5410 Jan 24 07:06 glib-gettextize
-rwxr-xr-x 1 gabriele gabriele 27653 Jan 24 07:06 glib-mkenums
-rwxr-xr-x 1 gabriele gabriele 26320 Jan 24 07:06 gobject-query
-rwxr-xr-x 1 gabriele gabriele 53800 Jan 24 07:06 gresource
-rwxr-xr-x 1 gabriele gabriele 61144 Jan 24 07:06 gsettings
-rwxr-xr-x 1 gabriele gabriele 72760 Jan 24 07:06 gtester
-rwxr-xr-x 1 gabriele gabriele 18830 Jan 24 07:06 gtester-report
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 07:13 installed-tests
-rwxr-xr-x 1 gabriele gabriele 27368 Jan 24 07:13 json-glib-format
-rwxr-xr-x 1 gabriele gabriele 24664 Jan 24 07:13 json-glib-validate

include/:
total 32
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 17:53 babl-0.1
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 08:21 gdk-pixbuf-2.0
drwxr-xr-x 6 gabriele gabriele 4096 Jan 24 17:56 gegl-0.3
drwxr-xr-x 2 gabriele gabriele 4096 Jan 24 18:04 gexiv2
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 07:04 gio-unix-2.0
drwxr-xr-x 5 gabriele gabriele 4096 Jan 24 07:06 glib-2.0
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 07:13 json-glib-1.0
drwxr-xr-x 2 gabriele gabriele 4096 Jan 24 17:58 libmypaint

share/:
total 60
drwxr-xr-x 2 gabriele gabriele 4096 Jan 24 07:06 aclocal
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 07:04 bash-completion
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 18:02 dbus-1
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 07:04 gdb
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 07:04 gettext
drwxr-xr-x 2 gabriele gabriele 4096 Jan 24 18:04 gir-1.0
drwxr-xr-x 6 gabriele gabriele 4096 Jan 24 07:04 glib-2.0
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 17:56 gtk-doc
drwxr-xr-x 4 gabriele gabriele 4096 Jan 24 18:02 installed-tests
drwxr-xr-x 114 gabriele gabriele 4096 Jan 24 18:02 locale
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 08:21 man
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 17:58 mypaint-data
drwxr-xr-x 2 gabriele gabriele 4096 Jan 24 17:58 pkgconfig
drwxr-xr-x 2 gabriele gabriele 4096 Jan 24 17:52 thumbnailers
drwxr-xr-x 3 gabriele gabriele 4096 Jan 24 17:56 vala

Hi Elle, I reread this
What you mean here when you talk about GIO_EXTRA_MODULES=/usr/lib/gio/modules… you mean if you install GIMP and all its dependencies into the $PREFIX you have to install GIO , which is part of GLib, not in the $PREFIX but under /usr or lib or lib64 all based on the distribution?

If it is ,I under /usr/lib64 have GIO which is installed by my distribution… and If I install GIO from glib for git gimp I’ll rewrite GIO libs of my distro…
I’m confused

Hi Gabriele,

Hmm, I can see the room for confusion. But no, don’t install GIO for glib for git gimp in /usr/lib64. Leave system libraries alone, let your Linux repository take care of all system libraries.

Looking at your list of installed files, you are installing a whole lot more stuff in the prefix than I’ve ever had to install. So maybe what you really need to do is somehow “add” the prefix “gio” stuff to the system “gio” stuff, similarly to how we add the prefix path to the system path, and such. But this is a guess, a wild and probably completely off-base guess, I’ve never had to do this and I don’t even know if what I just said makes any sense.

At this point I don’t really know what needs to be done given the very large number of software packages that you’ve had to install to get GIMP 2.9 up and running.

Here’s what I would suggest: Replace the “GIO” line for establishing the prefix with your system library location, and then do “make uninstall && make clean && git clean -xdf” and start over at “./autogen.sh” at least for babl/GEGL/mypaint/GIMP, and possibly even for everything that you installed in the prefix, basically just starting over. If this doesn’t work, then someone more knowledgeable than I am regarding system libraries and especially glib-related libraries will have to help figure out why installing GIMP from git in a prefix isn’t working.

Hi,
after last failures I upgrade to bleeding edge of my distro where there’s glib2-2.54.3 :slightly_smiling_face:
but when I compile libmypaint I have (I had to install json-c from git because it removed :roll_eyes:) :

make[2]: Entering directory ‘/root/git/libmypaint’
depbase=echo mypaint-brush.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||';
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/local/include/json-c -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_POSIX_C_SOURCE=200809L -g -O2 -MT mypaint-brush.lo -MD -MP -MF $depbase.Tpo -c -o mypaint-brush.lo mypaint-brush.c &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/local/include/json-c -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_POSIX_C_SOURCE=200809L -g -O2 -MT mypaint-brush.lo -MD -MP -MF .deps/mypaint-brush.Tpo -c mypaint-brush.c -fPIC -DPIC -o .libs/mypaint-brush.o
mypaint-brush.c: In function ‘mypaint_brush_new’:
mypaint-brush.c:133:26: error: ‘FALSE’ undeclared (first use in this function); did you mean ‘FILE’?
self->print_inputs = FALSE;
^~~~~
FILE
mypaint-brush.c:133:26: note: each undeclared identifier is reported only once for each function it appears in
mypaint-brush.c:142:29: error: ‘TRUE’ undeclared (first use in this function)
self->reset_requested = TRUE;
^~~~
mypaint-brush.c: In function ‘mypaint_brush_reset’:
mypaint-brush.c:225:29: error: ‘TRUE’ undeclared (first use in this function)
self->reset_requested = TRUE;
^~~~
mypaint-brush.c: In function ‘mypaint_brush_stroke_to’:
mypaint-brush.c:961:31: error: ‘FALSE’ undeclared (first use in this function); did you mean ‘FILE’?
self->reset_requested = FALSE;
^~~~~
FILE
mypaint-brush.c:980:14: error: ‘TRUE’ undeclared (first use in this function)
return TRUE;
^~~~
mypaint-brush.c: In function ‘obj_get’:
mypaint-brush.c:1100:44: error: ‘TRUE’ undeclared (first use in this function)
&& (obj_out ? (*obj_out != NULL) : TRUE);
^~~~
mypaint-brush.c: In function ‘update_brush_setting_from_json_object’:
mypaint-brush.c:1120:16: error: ‘FALSE’ undeclared (first use in this function); did you mean ‘FILE’?
return FALSE;
^~~~~
FILE
mypaint-brush.c:1167:12: error: ‘TRUE’ undeclared (first use in this function)

return TRUE;
^~~~
mypaint-brush.c: In function ‘update_brush_from_json_object’:
mypaint-brush.c:1177:16: error: ‘FALSE’ undeclared (first use in this function); did you mean ‘FILE’?
return FALSE;
^~~~~
FILE
mypaint-brush.c:1193:28: error: ‘TRUE’ undeclared (first use in this function)
gboolean updated_all = TRUE;
^~~~
mypaint-brush.c: In function ‘mypaint_brush_from_string’:
mypaint-brush.c:1227:16: error: ‘FALSE’ undeclared (first use in this function); did you mean ‘FILE’?
return FALSE;
^~~~~
FILE
make[2]: *** [Makefile:730: mypaint-brush.lo] Error 1
make[2]: Leaving directory ‘/root/git/libmypaint’
make[1]: *** [Makefile:840: all-recursive] Error 1
make[1]: Leaving directory ‘/root/git/libmypaint’
make: *** [Makefile:598: all] Error 2

Any hints??

Cheers

Include stdbool.h which gets you true / false in C vs TRUE / FALSE which might be defined in another header possibly missing.

Hi,
my apology but how to do it?? I’m noob…:neutral_face:

Unsure of the best way to go about it, could you post the whole thing including the configure phase?

Do You mean all output of configure and make? It’s long…