Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947607 - media-gfx/gimp-3*: fails building on musl systems, segfaults during build (script-fu: gimp_flush(): error: Broken pipe; Segmentation fault)
Summary: media-gfx/gimp-3*: fails building on musl systems, segfaults during build (sc...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sergey Torokhov
URL: https://gitlab.gnome.org/GNOME/gimp/-...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: musl-porting 951566
  Show dependency tree
 
Reported: 2025-01-06 12:54 UTC by ernsteiswuerfel
Modified: 2025-04-18 15:07 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (gimp-3.0.0_rc2:20250104-171353.log.xz,76.55 KB, application/x-xz)
2025-01-06 12:54 UTC, ernsteiswuerfel
Details
emerge --info (file_947607.txt,7.71 KB, text/plain)
2025-01-06 12:54 UTC, ernsteiswuerfel
Details
build.log.xz (3.0.0_rc3) (gimp-3.0.0_rc3:20250310-002359.log.xz,77.13 KB, application/x-xz)
2025-03-10 00:35 UTC, ernsteiswuerfel
Details
build.log.xz (amd64, 3.0.0_rc3 w. gcc-14) (gimp-3.0.0_rc3:20250317-212501.log.xz,74.51 KB, application/x-xz)
2025-03-17 22:06 UTC, ernsteiswuerfel
Details
build.log.xz (amd64, 3.0.0 w. gcc-14) (gimp-3.0.0:20250319-162434.log.xz,73.59 KB, application/x-xz)
2025-03-25 17:32 UTC, ernsteiswuerfel
Details
Build log (build.log.xz,78.44 KB, application/x-xz)
2025-04-05 13:26 UTC, Jakov Smolić
Details
Test suite log (testlog.xz,11.63 KB, application/x-xz)
2025-04-05 13:27 UTC, Jakov Smolić
Details
build.log.gz (non-musl, during normal build of GIMP 3.0.2) (build.log.gz,155.85 KB, application/gzip)
2025-04-10 11:30 UTC, Navid Zamani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2025-01-06 12:54:20 UTC
Created attachment 915984 [details]
build.log.xz

Builds fine on glibc but not on my musl-based systems:

[...]
[3680/3681] clang++  -o app/gimp-3.0 app/gimp-3.0.p/main.c.o -Wl,--as-needed -Wl,--no-undefined -O2 -march=znver2 -pipe -fuse-ld=bfd -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs '-Wl,-rpath,$ORIGIN/../libgimpbase:$ORIGIN/../libgimpcolor:$ORIGIN/../libgimpconfig:$ORIGIN/../libgimpmath:$ORIGIN/../libgimpmodule:$ORIGIN/../libgimpthumb:$ORIGIN/../libgimpwidgets' -Wl,-rpath-link,/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/libgimpbase -Wl,-rpath-link,/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/libgimpcolor -Wl,-rpath-link,/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/libgimpconfig -Wl,-rpath-link,/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/libgimpmath -Wl,-rpath-link,/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/libgimpmodule -Wl,-rpath-link,/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/libgimpthumb -Wl,-rpath-link,/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/libgimpwidgets -Wl,--start-group libgimpbase/libgimpbase-3.0.so.0.0.0 libgimpcolor/libgimpcolor-3.0.so.0.0.0 libgimpconfig/libgimpconfig-3.0.so.0.0.0 libgimpmath/libgimpmath-3.0.so.0.0.0 libgimpmodule/libgimpmodule-3.0.so.0.0.0 libgimpthumb/libgimpthumb-3.0.so.0.0.0 app/core/libappcore.a app/file/libappfile.a app/file-data/libappfiledata.a app/gegl/libappgegl.a app/gegl/libgimp-gegl-loops-simd_sse2.a app/pdb/libappinternalprocs.a app/operations/layer-modes/libapplayermodes.a app/operations/layer-modes/libgimpoperationlayermode-composite-simd_sse2.a app/operations/layer-modes/libgimpoperationnormal-simd_sse2.a app/operations/layer-modes/libgimpoperationnormal-simd_sse41.a app/operations/layer-modes-legacy/libapplayermodeslegacy.a app/operations/libappoperations.a app/paint/libapppaint.a app/pdb/libapppdb.a app/plug-in/libappplug-in.a app/text/libapptext.a app/vectors/libappvectors.a app/xcf/libappxcf.a app/config/libappconfig.a app/actions/libappactions.a app/dialogs/libappdialogs.a app/display/libappdisplay.a app/gui/libappgui.a app/menus/libappmenus.a app/propgui/libapppropgui.a app/tools/libapptools.a app/widgets/libappwidgets.a libgimpwidgets/libgimpwidgets-3.0.so.0.0.0 app/libapp.a /usr/lib/libcairo.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libgegl-0.4.so /usr/lib/libgegl-npd-0.4.so -Wl,--export-dynamic /usr/lib/libgmodule-2.0.so -pthread /usr/lib/libjson-glib-1.0.so /usr/lib/libgio-2.0.so /usr/lib/libbabl-0.1.so /usr/lib/libgexiv2.so /usr/lib/liblcms2.so /usr/lib/liblcms2_fast_float.so /usr/lib/liblcms2_threaded.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libharfbuzz.so /usr/lib/libpangoft2-1.0.so /usr/lib/libfontconfig.so /usr/lib/libfreetype.so /usr/lib/libgtk-3.so /usr/lib/libgdk-3.so /usr/lib/libatk-1.0.so /usr/lib/libcairo-gobject.so /usr/lib/libmypaint.so -fopenmp /usr/lib/libjson-c.so /usr/lib/libappstream-glib.so -lm -ldl /usr/lib/libarchive.so -fopenmp /usr/lib/libz.so -Wl,--end-group -fopenmp
[3681/3681] /usr/lib/python-exec/python3.12/meson --internal exe --unpickle /var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/meson-private/meson_exe_in-build-gimp.sh_d8d0812f49d6bca471740b37e3408e1dea51f7ed.dat
FAILED: gimp-data/images/gimp-splash.png 
/usr/lib/python-exec/python3.12/meson --internal exe --unpickle /var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/meson-private/meson_exe_in-build-gimp.sh_d8d0812f49d6bca471740b37e3408e1dea51f7ed.dat
while executing ['/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0-RC2/tools/in-build-gimp.sh', '-nidfs', '../gimp-3.0.0-RC2/gimp-data/images/gimp-splash.xcf.xz', '--batch-interpreter', 'python-fu-eval', '-b', '-', '--quit']
--- stdout ---
INFO: temporary GIMP configuration directory: /var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/.GIMP3-build-config-UOpx14

--- stderr ---
GIMP-Warning: Illegal variable name in environment file /var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0-RC2/data/environ/meson.build: 

GIMP-Warning: Illegal variable name in environment file /var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0-RC2/data/environ/meson.build:  environ_config.set('BIN_PATH', 'PATH

Failed to parse tag cache: No such file or directory

(script-fu:4722): scriptfu-WARNING **: 18:26:49.538: Failed to load main initialization file
GIMP-Warning: Welcome to GIMP 3.0.0-RC2!

/var/tmp/portage/media-gfx/gimp-3.0.0_rc2/work/gimp-3.0.0_rc2-build/plug-ins/script-fu/script-fu: fatal error: GIMP crashed

(script-fu:4722): LibGimp-WARNING **: 18:26:51.923: script-fu: gimp_flush(): error: Broken pipe
Segmentation fault

ninja: build stopped: subcommand failed.
 * ERROR: media-gfx/gimp-3.0.0_rc2::gentoo failed (compile phase):
 *   ninja -v -j5 -l5 failed
Comment 1 ernsteiswuerfel archtester 2025-01-06 12:54:57 UTC
Created attachment 915985 [details]
emerge --info
Comment 2 Sergey Torokhov 2025-01-20 18:40:45 UTC
Looks similar to https://gitlab.gnome.org/GNOME/gimp/-/issues/11369

The solution was:

> It's fixed with GI_TYPELIB_PATH set correctly.  
> ninja still complains about gimp-splash.png, but gimp-splash.png gets build with ninja install, so I'm a happy camper.

Also there is a comment [1] that refer to "preparing to build instructions" [2]

[1] https://gitlab.gnome.org/GNOME/gimp/-/issues/11369#note_2088969
[2] https://testing.developer.gimp.org/core/setup/build/#preparing-for-building

But I have no idea how to quick fix it and need to read upstream issue discussion more accurate.
Comment 3 ernsteiswuerfel archtester 2025-01-20 19:53:51 UTC
(In reply to Sergey Torokhov from comment #2)
> Looks similar to https://gitlab.gnome.org/GNOME/gimp/-/issues/11369
> 
> [...]
> 
> But I have no idea how to quick fix it and need to read upstream issue
> discussion more accurate.
Thanks for looking into this! I am not in a hurry. ;)
Comment 4 ernsteiswuerfel archtester 2025-03-10 00:35:51 UTC
Created attachment 920451 [details]
build.log.xz (3.0.0_rc3)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-12 19:17:35 UTC
Some hackery may be needed to run the failing command under gdb (as there's some indirection with a script too) to get a backtrace.
Comment 6 Sergey Torokhov 2025-03-17 21:01:36 UTC
ernsteiswuerfel, did you try to build with GCC instead of Clang? The upstream said that

> ... build system is capable of getting a stacktrace when gcc is installed.

And other member of upstream reported that 

> babl, GEGL and GIMP both builds and runs on other musl based systems like postmarketos/alpine (at least on aarch64).


Was this issue observed for gimp 3.0.0_rc1 too?

P.S.
The Gimp 3.0.0 was released.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-17 21:04:35 UTC
(In reply to Sergey Torokhov from comment #6)
> P.S.
> The Gimp 3.0.0 was released.

\o/ I'll merge a PR whenever you submit it.
Comment 8 ernsteiswuerfel archtester 2025-03-17 22:06:21 UTC
Created attachment 921058 [details]
build.log.xz (amd64, 3.0.0_rc3 w. gcc-14)

(In reply to Sergey Torokhov from comment #6)
> ernsteiswuerfel, did you try to build with GCC instead of Clang? The
> upstream said that
The failure does not look much different to me when built with gcc (see build.log.xz).

> Was this issue observed for gimp 3.0.0_rc1 too?
Yes. But now as you mention it - one of the earlier 2.99.x versions build fine.
Comment 9 Larry the Git Cow gentoo-dev 2025-03-18 19:23:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a71f8186fffc22dbcda9bd7c4943fb33a78d628

commit 7a71f8186fffc22dbcda9bd7c4943fb33a78d628
Author:     Sergey Torokhov <torokhov-s-a@yandex.ru>
AuthorDate: 2025-03-18 19:01:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-03-18 19:22:31 +0000

    media-gfx/gimp: 3.0.0 version bump
    
    QA warning is presented:
    QA Notice: Package triggers severe warnings which indicate that it                                                                                                                                             │
               may exhibit random runtime failures.                                                                                                                                                                │
    extensions/goat-exercises/goat-exercise-vala.p/goat-exercise-vala.c:303:24:
    warning: assignment to ‘GtkBox *’ {aka ‘struct _GtkBox *’}
    from incompatible pointer type ‘GtkWidget *’ {aka ‘struct _GtkWidget *’}
    [-Wincompatible-pointer-types]
    
    Still affected "fails test "gimp:app / core" TIMEOUT" issue (936290)
    
    Remove workaround with renaming to zzz-gimp.desktop (#679220)
    
    Bug: https://bugs.gentoo.org/936290
    Closes: https://bugs.gentoo.org/679220
    Bug: https://bugs.gentoo.org/947607
    Bug: https://bugs.gentoo.org/769350
    Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-gfx/gimp/Manifest          |   1 +
 media-gfx/gimp/gimp-3.0.0.ebuild | 258 +++++++++++++++++++++++++++++++++++++++
 media-gfx/gimp/gimp-9999.ebuild  |   4 -
 3 files changed, 259 insertions(+), 4 deletions(-)
Comment 10 ernsteiswuerfel archtester 2025-03-25 17:32:09 UTC
Created attachment 922753 [details]
build.log.xz (amd64, 3.0.0 w. gcc-14)

With 3.0.0 I got:

[...]
FAILED: gimp-data/images/gimp-splash.png
/usr/lib/python-exec/python3.13/meson --internal exe --unpickle /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/meson-private/meson_exe_in-build-gimp.sh_0a96fbb888d1479b8cbc66743906324a3902fd36.dat
while executing ['/var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0/tools/in-build-gimp.sh', '-nidfs', '../gimp-3.0.0/gimp-data/images/gimp-splash.xcf.xz', '--batch-interpreter', 'python-fu-eval', '-b', '-', '--quit']
--- stdout ---
INFO: temporary GIMP configuration directory: /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/.GIMP3-build-config-M14N5h
RUNNING: cat /dev/stdin | /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/app/gimp-console-3.0 -nidfs ../gimp-3.0.0/gimp-data/images/gimp-splash.xcf.xz --batch-interpreter python-fu-eval -b - --quit

--- stderr ---
GIMP-Warning: Illegal variable name in environment file /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0/data/environ/meson.build:

GIMP-Warning: Illegal variable name in environment file /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0/data/environ/meson.build:  environ_config.set('BIN_PATH', 'PATH

Failed to parse tag cache: No such file or directory
GEGL-Message: 13:00:21.333: Module '/usr/lib/gegl-0.4/raw-load.so' load error: Error relocating /lib/libraw.so.23: __kmpc_global_thread_num: symbol not found
GEGL-Message: 13:00:21.525: Module '/usr/lib/gegl-0.4/raw-load.so' load error: Error relocating /lib/libraw.so.23: __kmpc_global_thread_num: symbol not found
GEGL-Message: 13:00:22.511: Module '/usr/lib/gegl-0.4/raw-load.so' load error: Error relocating /lib/libraw.so.23: __kmpc_global_thread_num: symbol not found
GEGL-Message: 13:00:23.915: Module '/usr/lib/gegl-0.4/raw-load.so' load error: Error relocating /lib/libraw.so.23: __kmpc_global_thread_num: symbol not found
GEGL-Message: 13:00:24.614: Module '/usr/lib/gegl-0.4/raw-load.so' load error: Error relocating /lib/libraw.so.23: __kmpc_global_thread_num: symbol not found
GEGL-Message: 13:00:24.724: Module '/usr/lib/gegl-0.4/raw-load.so' load error: Error relocating /lib/libraw.so.23: __kmpc_global_thread_num: symbol not found

(script-fu:8451): scriptfu-WARNING **: 13:00:25.276: Failed to load main initialization file
GIMP-Warning: Welcome to GIMP 3.0.0!

/var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/plug-ins/script-fu/script-fu: fatal error: GIMP crashed

(python-eval.py:8457): LibGimpBase-WARNING **: 13:00:28.302: python-eval.py: gimp_wire_read(): unexpected EOF

(script-fu:8451): LibGimp-WARNING **: 13:00:28.302: script-fu: gimp_flush(): error: Broken pipe
Segmentation fault

ninja: build stopped: subcommand failed.
 * ERROR: media-gfx/gimp-3.0.0::gentoo failed (compile phase):


So I rebuilt media-libs/libraw-0.21.2 with gcc and ld.bfd too. Now I am getting the original error message again:

[...]
FAILED: gimp-data/images/gimp-splash.png
/usr/lib/python-exec/python3.13/meson --internal exe --unpickle /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/meson-private/meson_exe_in-build-gimp.sh_0a96fbb888d1479b8cbc66743906324a3902fd36.dat
while executing ['/var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0/tools/in-build-gimp.sh', '-nidfs', '../gimp-3.0.0/gimp-data/images/gimp-splash.xcf.xz', '--batch-interpreter', 'python-fu-eval', '-b', '-', '--quit']
--- stdout ---
INFO: temporary GIMP configuration directory: /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/.GIMP3-build-config-E1LJ7p
RUNNING: cat /dev/stdin | /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/app/gimp-console-3.0 -nidfs ../gimp-3.0.0/gimp-data/images/gimp-splash.xcf.xz --batch-interpreter python-fu-eval -b - --quit

--- stderr ---
GIMP-Warning: Illegal variable name in environment file /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0/data/environ/meson.build:

GIMP-Warning: Illegal variable name in environment file /var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0/data/environ/meson.build:  environ_config.set('BIN_PATH', 'PATH

Failed to parse tag cache: No such file or directory

(script-fu:8431): scriptfu-WARNING **: 17:34:19.869: Failed to load main initialization file
GIMP-Warning: Welcome to GIMP 3.0.0!

/var/tmp/portage/media-gfx/gimp-3.0.0/work/gimp-3.0.0-build/plug-ins/script-fu/script-fu: fatal error: GIMP crashed

(python-eval.py:8437): LibGimpBase-WARNING **: 17:34:22.899: python-eval.py: gimp_wire_read(): unexpected EOF

(script-fu:8431): LibGimp-WARNING **: 17:34:22.899: script-fu: gimp_flush(): error: Broken pipe
Segmentation fault

ninja: build stopped: subcommand failed.
 * ERROR: media-gfx/gimp-3.0.0::gentoo failed (compile phase):
Comment 11 Jakov Smolić archtester gentoo-dev 2025-04-05 13:24:37 UTC
I hit a similar error on non-musl rv64 system although it happened while running tests. I'll try to get a backtrace later
Comment 12 Jakov Smolić archtester gentoo-dev 2025-04-05 13:26:40 UTC
Created attachment 923592 [details]
Build log
Comment 13 Jakov Smolić archtester gentoo-dev 2025-04-05 13:27:14 UTC
Created attachment 923593 [details]
Test suite log
Comment 14 Navid Zamani 2025-04-10 11:30:30 UTC Comment hidden (offtopic)
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-10 11:37:55 UTC Comment hidden (offtopic)
Comment 16 aryan 2025-04-18 15:07:56 UTC
I have this exact issue on my musl/llvm system when compiling gimp-3.0.2. Is there a fix for this?