GIMP 3.0.3 Compilation Problems (original) (raw)
Hi All,
I have problems to compiling GIMP Master lately…
I made pulling of all directories (babl, gegl and gimp) normally.
The babl was compiled with:meson setup .. -Dprefix="${GIMP_PREFIX}" -Dwith-docs=false --buildtype="release"
The Gegl and GIMP normally with:meson setup .. -Dprefix="${GIMP_PREFIX}"
Babl and Gegl were compiled without problems.
I have attention to delete the built directory for all (Babl, Gegl and GIMP) and create a new build directory for each one.
When I compiled GIMP, I had this output in my terminal:
[jag@fedora _build]$ ninja && ninja install
[54/2606] Compiling C object libgimpconfig/libgimpconfig-3.0.so.0.0.3.p/gimpconfig-serialize.c.o
FAILED: libgimpconfig/libgimpconfig-3.0.so.0.0.3.p/gimpconfig-serialize.c.o
cc -Ilibgimpconfig/libgimpconfig-3.0.so.0.0.3.p -Ilibgimpconfig -I../libgimpconfig -I. -I.. -I/usr/include/cairo -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/include/libmount -I/usr/include/blkid -I/home/jag/gimp-devels/gimp-3.0/include/gegl-0.4 -I/usr/include/gio-unix-2.0 -I/usr/include/json-glib-1.0 -I/home/jag/gimp-devels/gimp-3.0/include/babl-0.1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -Wabsolute-value -Wdeclaration-after-statement -Wenum-conversion -Wno-strict-prototypes -Wold-style-definition -Wunused-function -Wunused-value -Werror=implicit-function-declaration -fdiagnostics-show-option -fno-common -Wformat -Wformat-security -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wpointer-arith -Wreturn-type -Wtype-limits -DHAVE_CONFIG_H -fPIC -pthread -DWITH_GZFILEOP '-DG_LOG_DOMAIN="LibGimpConfig"' -DGIMP_CONFIG_COMPILATION -MD -MQ libgimpconfig/libgimpconfig-3.0.so.0.0.3.p/gimpconfig-serialize.c.o -MF libgimpconfig/libgimpconfig-3.0.so.0.0.3.p/gimpconfig-serialize.c.o.d -o libgimpconfig/libgimpconfig-3.0.so.0.0.3.p/gimpconfig-serialize.c.o -c ../libgimpconfig/gimpconfig-serialize.c
../libgimpconfig/gimpconfig-serialize.c: In function ‘gimp_config_serialize_value’:
../libgimpconfig/gimpconfig-serialize.c:525:16: error: two or more data types in declaration specifiers
525 | gboolean bool;
| ^~~~
../libgimpconfig/gimpconfig-serialize.c:525:7: warning: useless type name in empty declaration
525 | gboolean bool;
| ^~~~~~~~
../libgimpconfig/gimpconfig-serialize.c:527:12: error: expected identifier or ‘(’ before ‘=’ token
527 | bool = g_value_get_boolean (value);
| ^
In file included from /usr/include/glib-2.0/glib/giochannel.h:36,
from /usr/include/glib-2.0/glib.h:56,
from /usr/include/glib-2.0/gobject/gbinding.h:30,
from /usr/include/glib-2.0/glib-object.h:24,
from /home/jag/gimp-devels/gimp-3.0/include/gegl-0.4/gegl.h:22,
from ../libgimpconfig/gimpconfig-serialize.c:25:
../libgimpconfig/gimpconfig-serialize.c:528:29: error: expected expression before ‘bool’
528 | g_string_append (str, bool ? "yes" : "no");
| ^~~~
/usr/include/glib-2.0/glib/gstring.h:269:26: note: in definition of macro ‘g_string_append’
269 | (__builtin_constant_p (val) ? \
| ^~~
../libgimpconfig/gimpconfig-serialize.c:528:34: error: expected ‘)’ before ‘?’ token
528 | g_string_append (str, bool ? "yes" : "no");
| ^
/usr/include/glib-2.0/glib/gstring.h:271:35: note: in definition of macro ‘g_string_append’
271 | const char * const __val = (val); \
| ^~~
/usr/include/glib-2.0/glib/gstring.h:271:34: note: to match this ‘(’
271 | const char * const __val = (val); \
| ^
../libgimpconfig/gimpconfig-serialize.c:528:7: note: in expansion of macro ‘g_string_append’
528 | g_string_append (str, bool ? "yes" : "no");
| ^~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gstring.h:271:39: error: expected expression before ‘;’ token
271 | const char * const __val = (val); \
| ^
../libgimpconfig/gimpconfig-serialize.c:528:7: note: in expansion of macro ‘g_string_append’
528 | g_string_append (str, bool ? "yes" : "no");
| ^~~~~~~~~~~~~~~
../libgimpconfig/gimpconfig-serialize.c:528:29: error: expected expression before ‘bool’
528 | g_string_append (str, bool ? "yes" : "no");
| ^~~~
/usr/include/glib-2.0/glib/gstring.h:251:37: note: in definition of macro ‘g_string_append_len’
251 | g_string_append_len_inline (gstr, val, len)
| ^~~
../libgimpconfig/gimpconfig-serialize.c:528:7: note: in expansion of macro ‘g_string_append’
528 | g_string_append (str, bool ? "yes" : "no");
| ^~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gstring.h:251:3: error: too few arguments to function ‘g_string_append_len_inline’; expected 3, have 2
251 | g_string_append_len_inline (gstr, val, len)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gstring.h:278:5: note: in expansion of macro ‘g_string_append_len’
278 | g_string_append_len (gstr, val, (gssize) -1))
| ^~~~~~~~~~~~~~~~~~~
../libgimpconfig/gimpconfig-serialize.c:528:7: note: in expansion of macro ‘g_string_append’
528 | g_string_append (str, bool ? "yes" : "no");
| ^~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gstring.h:218:1: note: declared here
218 | g_string_append_len_inline (GString *gstring,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
[59/2606] Compiling C object libgimpconfig/libgimpconfig-3.0.so.0.0.3.p/gimpconfigwriter.c.o
ninja: build stopped: subcommand failed.
barefootliam (Liam Quin) April 22, 2025, 9:23pm 2
Yes, this looks like a mistake; for now, change bool to yesorno, i think.
(this would be better as a gitlab bug report i think)
Which gcc version exactly? It compiles here, but it might be that gtk or some other header started included stdbool.h that defines “bool”.
Americo_Gobbo (Americo Gobbo) April 23, 2025, 2:01pm 3
Hi, asking gcc -v
[jag@fedora ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,cobol,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-15.0.1-build/gcc-15.0.1-20250329/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.1 20250329 (Red Hat 15.0.1-0) (GCC)
Americo_Gobbo (Americo Gobbo) April 23, 2025, 4:53pm 4
It’s hard for me understand what to do I am a novice and only an artist that try to do the essential to follow the developing of GIMP.
barefootliam (Liam Quin) April 23, 2025, 8:57pm 5
Thanks, @Americo_Gobbo - gcc 15 is fairly new, and it defaults to a newer version of the GNU C Language. Adding -std=gnu17 to CFLAGS is probably needed; i’ll try and look tonight.
barefootliam (Liam Quin) April 25, 2025, 3:35am 6
I made a merge requst to gimp with the changes needed, or compiling with -std=gnu17. To do that, add a line
‘c_std=gnu17’,
after line 6 of meson.build, giving:
project('gimp',
'c', 'cpp',
version: '3.0.3',
meson_version: '>=0.61.0',
default_options: [
'cpp_std=gnu++14',
'c_std=gnu17',
'buildtype=debugoptimized',
],
)
i think.
Americo_Gobbo (Americo Gobbo) April 25, 2025, 5:29pm 7
I compiled the last source without problems with this change on meson.build.
thanks.
americo