Debian 12 Bookworm : Building darktable triggers internal compiler error

Hello developers, testers and all,

I have done apt-get full-upgrade to Debian 12 Bookworm, from Debian 11.

When I try to build darktable git master, I trigger a gcc internal compiler error.

Steps to reproduce

git clone --recurse-submodules https://github.com/darktable-org/darktable.git
cd darktable
git submodule update --init
git pull --recurse-submodules
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="$HOME/darktable-debian12/install" -DCMAKE_BUILD_TYPE=Release ..
make -j8

Then I get internal compiler error: Illegal instruction:

[ 20%] Building C object bin/CMakeFiles/lib_darktable.dir/common/iop_order.c.o
during GIMPLE pass: graphite
/home/magnus/camera2/test2/darktable-gcc12/darktable/src/common/iop_order.c: In function ‘_insert_before.isra’:
/home/magnus/camera2/test2/darktable-gcc12/darktable/src/common/iop_order.c:404:15: internal compiler error: Illegal instruction
  404 | static GList *_insert_before(GList *iop_order_list,
      |               ^~~~~~~~~~~~~~
0xc35e5f crash_signal
	../../gcc/toplev.cc:322
0x7f7824cbdf8f ???
	./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x18722d1 graphite_transform_loops()
	../../gcc/graphite.cc:430
0x18738f0 graphite_transforms
	../../gcc/graphite.cc:536
0x18738f0 execute
	../../gcc/graphite.cc:613
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make[2]: *** [bin/CMakeFiles/lib_darktable.dir/build.make:726: bin/CMakeFiles/lib_darktable.dir/common/iop_order.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2473: bin/CMakeFiles/lib_darktable.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

What is going on here?

On Debian 11 I used my own gcc-12-2-0 from standard gnu/gcc code. That worked fine. I used standard gcc-10 from Debian 11 before gcc-12 requirement. That also worked fine.

EDIT: Debian 12 use gcc (Debian 12.2.0-14) 12.2.0.

I know that at least @Pascal_Obry has Debian. Question : Gnome 4x (40-44) : Is color management working for Darktable application and Gnome 40 to 44 desktop on X11? - #5 by Pascal_Obry

You should post your compiler issues on darktable github instead of pixl.us

Hello @g-man,

Yes, I might also post an issue report. But before I do that I just want to check for some feedback and if this is already encountered or reported. I do not think this is an issue with darktable git master code.

Issue posted here: git master : Debian 12 Bookworm : Building darktable triggers internal compiler error · Issue #14701 · darktable-org/darktable · GitHub

And I was about to build darktable without issue on my side. As I’m up-to-date on Debian/sid I’m basically using bookworm:

$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hello,

Do I understand correctly that you can build on Debian/sid gcc (Debian 12.2.0-14) 12.2.0?

Yes, no problem at all on my side. See also my answer on the GitHub issue. Better keep the discussion on GitHub at this point BTW.

1 Like