Gimp-2.10.x failed to build on clang + musl based systems: "gimpbacktrace-linux.c:42:10: fatal error: 'execinfo.h' file not found"
On trying to build Gimp-2.10.x with Clang-15 on musl-1.2.3 based system (instead of glibc based) an error takes place:
clang -DHAVE_CONFIG_H -I. -I../.. -DGIMPDIR=\""GIMP"\" -DGIMP_APP_VERSION=\"2.10\" -DGIMP_USER_VERSION=\"2.10\" -DG_LOG_DOMAIN=\"Gimp-Core\" -I../.. -I../.. -I../../app -I../../app -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/gegl-0.4 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/json-glib-1.0 -pthread -I/usr/include/babl-0.1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi/include -I/usr/include/libpng16 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/libmypaint -I/usr/include/json-c -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi/include -DMYPAINT_BRUSHES_DIR=\"/usr/share/mypaint-data/2.0/brushes\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -Os -march=bdver3 -mtune=bdver3 -pipe -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes -Wstrict-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -Wmissing-format-attribute -Wformat-security -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type -c -o gimpbacktrace-windows.o gimpbacktrace-windows.c
gimpbacktrace-linux.c:42:10: fatal error: 'execinfo.h' file not found
#include <execinfo.h>
^~~~~~~~~~~~
Options --without-libbacktrace
and --without-libunwind
are applied on configuration.
Simple __GLIBC__
guard in place results in linking error (undefined symbol: backtrace
).
More details are available in https://bugs.gentoo.org/900148