-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git master : Debian 12 Bookworm : Building darktable triggers internal compiler error #14701
Comments
As posted on pxls.us: 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 |
Also tested with |
Compiles with clang. |
I also have been unable to build darktable with GCC for some months now, and have been using clang instead. The error I get is precisely the one shown here. It looks like a bug in GCC, perhaps (?) @TurboGit I am also using Debian sid, and due to a hardware failure, I have just re-installed the system, so this is a fresh Debian stable install that was upgraded to sid... Should be the same as yours! I suppose it may be something hardware or firmware specific (gcc-12 + Debian version of firmware blobs + specific hardware triggering the problem).
The commands used to compile dt were:
I'm not sure what other information would be relevant. |
@KarlMagnusLarsson @jpellegrini What is your |
I am using Intel® Core™ i7-3770K × 8 on ASUSTeK COMPUTER INC. P8Z77-V (computer build 2013, so semi-old). Debian 11 + selfcompiled gcc 12.2.0 (gnu/gcc standard code) worked fine when it comes to building darktable. I have tried to install this Debian package: |
@LebedevRI -- here it is:
|
@jpellegrini when GCC crashes with |
Hello @LebedevRI. The output of
Regarding this:
OK, I see. That could explain why gcc (Debian 12.2.0-14) 12.2.0 does not work. But I also tried to compile and bootstrap my own gnu/gcc 12.2.0 and use that to compile darktable and I get exactly the same error with my self compiled gcc 12.2.0. |
Nope. Not a single line is added to the |
Unfortunate.
and once it crashes, do
and show the output? |
and run /home/magnus/camera2/test2/darktable-gcc12/bin/gcc -DAVIF_DLL -DDT_HAVE_SIGNAL_TRACE -DGDK_DISABLE_DEPRECATED -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_24 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_MIN_REQUIRED -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DHAVE_BUILTIN_CPU_SUPPORTS -DHAVE_CONFIG_H -DHAVE_GAME -DHAVE_GMIC -DHAVE_GPHOTO2 -DHAVE_GRAPHICSMAGICK -DHAVE_ICU -DHAVE_IMATH -DHAVE_ISO_CODES -DHAVE_KWALLET -DHAVE_LIBAVIF=1 -DHAVE_LIBEXIV2_WITH_ISOBMFF=1 -DHAVE_LIBHEIF=1 -DHAVE_LIBJXL -DHAVE_LIBRAW=1 -DHAVE_LIBSECRET -DHAVE_MAP -DHAVE_OPENCL -DHAVE_OPENEXR -DHAVE_OPENJPEG -DHAVE_OSMGPSMAP_110_OR_NEWER -DHAVE_OSMGPSMAP_NEWER_THAN_110 -DHAVE_PRINT -DHAVE_SQLITE_324_OR_NEWER -DHAVE_VISIBILITY -DHAVE_WEBP -DLIBHEIF_EXPORTS -DLIBRAW_NODLL -DNATIVE_ARCH -DSQLITE_CORE -DSQLITE_ENABLE_ICU -DUSE_COLORDGTK -DUSE_LUA -D_XOPEN_SOURCE=700 -Dlib_darktable_EXPORTS -I/home/magnus/camera2/test2/darktable-gcc12/darktable/build/bin -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/LuaAutoC -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/whereami/src -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/LibRaw -isystem /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external -isystem /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/OpenCL -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/pixman-1 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem /usr/include/libxml2 -isystem /usr/include/lensfun -isystem /usr/include/librsvg-2.0 -isystem /usr/include/json-glib-1.0 -isystem /usr/include/openjpeg-2.5 -isystem /usr/include/libsecret-1 -isystem /usr/include/GraphicsMagick -isystem /usr/include/lua5.4 -isystem /usr/include/osmgpsmap-1.0 -isystem /usr/include/libsoup-2.4 -isystem /usr/include/colord-1 -isystem /home/magnus/camera2/test2/darktable-gcc12/include/Imath -isystem /home/magnus/camera2/test2/darktable-gcc12/include/OpenEXR -Wall -Wformat -Wformat-security -Wshadow -Wtype-limits -Wvla -Wold-style-declaration -Wmaybe-uninitialized -Wno-unknown-pragmas -Wno-error=varargs -Wno-format-truncation -Wno-error=address-of-packed-member -fopenmp -march=native -msse2 -g -mfpmath=sse -O3 -DNDEBUG -O3 -ffast-math -fno-finite-math-only -fexpensive-optimizations -fPIC -Werror -Wfatal-errors -std=c99 -MD -MT bin/CMakeFiles/lib_darktable.dir/common/iop_order.c.o -MF CMakeFiles/lib_darktable.dir/common/iop_order.c.o.d -o CMakeFiles/lib_darktable.dir/common/iop_order.c.o -c /home/magnus/camera2/test2/darktable-gcc12/darktable/src/common/iop_order.c
My apologies for the screenshot. I am sure there is a better way. This is using my own gcc 12.2.0 from gnu/gcc code. The debian gcc 12.2.0 did not have any symbols in it. |
I did all that, but gdb said there was no assembly to show. The command line that I used (which I copied from the compilation process) did have the |
Hm, that is not it. |
/home/magnus/camera2/test2/darktable-gcc12/bin/gcc -DAVIF_DLL -DDT_HAVE_SIGNAL_TRACE -DGDK_DISABLE_DEPRECATED -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_24 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_MIN_REQUIRED -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DHAVE_BUILTIN_CPU_SUPPORTS -DHAVE_CONFIG_H -DHAVE_GAME -DHAVE_GMIC -DHAVE_GPHOTO2 -DHAVE_GRAPHICSMAGICK -DHAVE_ICU -DHAVE_IMATH -DHAVE_ISO_CODES -DHAVE_KWALLET -DHAVE_LIBAVIF=1 -DHAVE_LIBEXIV2_WITH_ISOBMFF=1 -DHAVE_LIBHEIF=1 -DHAVE_LIBJXL -DHAVE_LIBRAW=1 -DHAVE_LIBSECRET -DHAVE_MAP -DHAVE_OPENCL -DHAVE_OPENEXR -DHAVE_OPENJPEG -DHAVE_OSMGPSMAP_110_OR_NEWER -DHAVE_OSMGPSMAP_NEWER_THAN_110 -DHAVE_PRINT -DHAVE_SQLITE_324_OR_NEWER -DHAVE_VISIBILITY -DHAVE_WEBP -DLIBHEIF_EXPORTS -DLIBRAW_NODLL -DNATIVE_ARCH -DSQLITE_CORE -DSQLITE_ENABLE_ICU -DUSE_COLORDGTK -DUSE_LUA -D_XOPEN_SOURCE=700 -Dlib_darktable_EXPORTS -I/home/magnus/camera2/test2/darktable-gcc12/darktable/build/bin -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/LuaAutoC -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/whereami/src -I/home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/LibRaw -isystem /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external -isystem /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/OpenCL -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/pixman-1 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem /usr/include/libxml2 -isystem /usr/include/lensfun -isystem /usr/include/librsvg-2.0 -isystem /usr/include/json-glib-1.0 -isystem /usr/include/openjpeg-2.5 -isystem /usr/include/libsecret-1 -isystem /usr/include/GraphicsMagick -isystem /usr/include/lua5.4 -isystem /usr/include/osmgpsmap-1.0 -isystem /usr/include/libsoup-2.4 -isystem /usr/include/colord-1 -isystem /home/magnus/camera2/test2/darktable-gcc12/include/Imath -isystem /home/magnus/camera2/test2/darktable-gcc12/include/OpenEXR -Wall -Wformat -Wformat-security -Wshadow -Wtype-limits -Wvla -Wold-style-declaration -Wmaybe-uninitialized -Wno-unknown-pragmas -Wno-error=varargs -Wno-format-truncation -Wno-error=address-of-packed-member -fopenmp -march=native -msse2 -g -mfpmath=sse -O3 -DNDEBUG -O3 -ffast-math -fno-finite-math-only -fexpensive-optimizations -fPIC -Werror -Wfatal-errors -std=c99 -MD -MT bin/CMakeFiles/lib_darktable.dir/common/iop_order.c.o -MF CMakeFiles/lib_darktable.dir/common/iop_order.c.o.d -o CMakeFiles/lib_darktable.dir/common/iop_order.c.o -c /home/magnus/camera2/test2/darktable-gcc12/darktable/src/common/iop_order.c -wrapper gdb,--args home/magnus/camera2/test2/darktable-gcc12/bin/cc1
Starting program: /home/magnus/camera2/test2/darktable-gcc12/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/cc1 -quiet -I /home/magnus/camera2/test2/darktable-gcc12/darktable/build/bin -I /home/magnus/camera2/test2/darktable-gcc12/darktable/src -I /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/LuaAutoC -I /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/whereami/src -I /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/LibRaw -imultiarch x86_64-linux-gnu -MD CMakeFiles/lib_darktable.dir/common/iop_order.c.d -MF CMakeFiles/lib_darktable.dir/common/iop_order.c.o.d -MT bin/CMakeFiles/lib_darktable.dir/common/iop_order.c.o -D_REENTRANT -D AVIF_DLL -D DT_HAVE_SIGNAL_TRACE -D GDK_DISABLE_DEPRECATED -D GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_24 -D GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_MIN_REQUIRED -D GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -D GTK_DISABLE_DEPRECATED -D GTK_DISABLE_SINGLE_INCLUDES -D HAVE_BUILTIN_CPU_SUPPORTS -D HAVE_CONFIG_H -D HAVE_GAME -D HAVE_GMIC -D HAVE_GPHOTO2 -D HAVE_GRAPHICSMAGICK -D HAVE_ICU -D HAVE_IMATH -D HAVE_ISO_CODES -D HAVE_KWALLET -D HAVE_LIBAVIF=1 -D HAVE_LIBEXIV2_WITH_ISOBMFF=1 -D HAVE_LIBHEIF=1 -D HAVE_LIBJXL -D HAVE_LIBRAW=1 -D HAVE_LIBSECRET -D HAVE_MAP -D HAVE_OPENCL -D HAVE_OPENEXR -D HAVE_OPENJPEG -D HAVE_OSMGPSMAP_110_OR_NEWER -D HAVE_OSMGPSMAP_NEWER_THAN_110 -D HAVE_PRINT -D HAVE_SQLITE_324_OR_NEWER -D HAVE_VISIBILITY -D HAVE_WEBP -D LIBHEIF_EXPORTS -D LIBRAW_NODLL -D NATIVE_ARCH -D SQLITE_CORE -D SQLITE_ENABLE_ICU -D USE_COLORDGTK -D USE_LUA -D _XOPEN_SOURCE=700 -D lib_darktable_EXPORTS -D NDEBUG -isystem /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external -isystem /home/magnus/camera2/test2/darktable-gcc12/darktable/src/external/OpenCL -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/pixman-1 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem /usr/include/libxml2 -isystem /usr/include/lensfun -isystem /usr/include/librsvg-2.0 -isystem /usr/include/json-glib-1.0 -isystem /usr/include/openjpeg-2.5 -isystem /usr/include/libsecret-1 -isystem /usr/include/GraphicsMagick -isystem /usr/include/lua5.4 -isystem /usr/include/osmgpsmap-1.0 -isystem /usr/include/libsoup-2.4 -isystem /usr/include/colord-1 -isystem /home/magnus/camera2/test2/darktable-gcc12/include/Imath -isystem /home/magnus/camera2/test2/darktable-gcc12/include/OpenEXR /home/magnus/camera2/test2/darktable-gcc12/darktable/src/common/iop_order.c -march=ivybridge -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mno-avx2 -mno-sse4a -mno-fma4 -mno-xop -mno-fma -mno-avx512f -mno-bmi -mno-bmi2 -maes -mpclmul -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd -mno-avx512er -mno-avx512pf -mno-avx512vbmi -mno-avx512ifma -mno-avx5124vnniw -mno-avx5124fmaps -mno-avx512vpopcntdq -mno-avx512vbmi2 -mno-gfni -mno-vpclmulqdq -mno-avx512vnni -mno-avx512bitalg -mno-avx512bf16 -mno-avx512vp2intersect -mno-3dnow -mno-adx -mno-abm -mno-cldemote -mno-clflushopt -mno-clwb -mno-clzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mno-lzcnt -mno-movbe -mno-movdir64b -mno-movdiri -mno-mwaitx -mno-pconfig -mno-pku -mno-prefetchwt1 -mno-prfchw -mno-ptwrite -mno-rdpid -mrdrnd -mno-rdseed -mno-rtm -mno-serialize -mno-sgx -mno-sha -mno-shstk -mno-tbm -mno-tsxldtrk -mno-vaes -mno-waitpkg -mno-wbnoinvd -mxsave -mno-xsavec -mxsaveopt -mno-xsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni -mno-avx512fp16 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=ivybridge -quiet -dumpdir CMakeFiles/lib_darktable.dir/common/ -dumpbase iop_order.c.c -dumpbase-ext .c -msse2 -mfpmath=sse -g -O3 -O3 -Wall -Wformat=1 -Wformat-security -Wshadow -Wtype-limits -Wvla -Wold-style-declaration -Wmaybe-uninitialized -Wno-unknown-pragmas -Wno-error=varargs -Wformat-truncation=0 -Wno-error=address-of-packed-member -Werror -Wfatal-errors -std=c99 -fopenmp -ffast-math -fno-finite-math-only -fexpensive-optimizations -fPIC -o /tmp/cccAqOcr.s Program received signal SIGILL, Illegal instruction. |
Ok, I did
Then
I got something a bit different from @KarlMagnusLarsson :
Then, |
@KarlMagnusLarsson yup, there you go: it's Why GCC is built in a way that requires BMI1 is their (or rather, debian's) bug. |
@jpellegrini for you it's You all should really report this to debian gcc maintainers... |
@jpellegrini @KarlMagnusLarsson thank you! |
Sure! |
@LebedevRI, thank you for the feedback.
Which I am asking, since I can rebuild my own gcc-12.2.0 from gnu/gcc source. I am not using Debian's build script. |
|
export CFLAGS="-march=native" ../configure
|
You probably want to either just remove |
Hello, @LebedevRI, I do not think there is a gcc internal libisl available. I already point start of LD_LIBRARY_PATH to my own gcc libs. I need isl for Graphite optimizations. What I could do is to build my own local isl and point to that. |
@LebedevRI , @jpellegrini
With my local gcc and local libisl I can build and run darktable. |
The Debian GCC packages for x86_64-linux are built without any arch settings, meaning x86-86-v1. You can see how GCC is configured by calling gcc -v. The dt build script doesn't work for me, asking for LLVM as well, so I cannot check. What I already see in the build script so far is: so dt is playing around with some build flags on it's own. Please point me to the command line and the preprocessed source which is supposed to generate any instructions for a higher baseline. |
@doko42 hi! Please note that the "illegal instruction" is encountered in |
@doko42, FWIW, i can "reproduce" on a clean debian sid:
|
@doko42 here's the bug you requested: https://buildd.debian.org/status/fetch.php?pkg=isl&arch=amd64&ver=0.26-2&stamp=1686530707&raw=0
Notice anything funny there? :) |
@LebedevRI wrote:
That is correct, as originally pointed out by @LebedevRI in (libisl issue, shlx instruction x86-64-v3?), In my case I had to fix both gcc (compile with native) and a newly compiled libisl in workaround. It is quite possible @jpellegrini had only one issue, with libisl, but I seem to have an additional gcc issue as well. |
@KarlMagnusLarsson there is only a single issue. If you look at both of those backtraces, |
Yes, only the isl issue with me, probably because my CPU is different from yours... |
Because one of the CPUs tested supports BMI1 but not BMI2, and the other supports neither (right?) |
Aha, OK. Thank you @LebedevRI for pointing that out. I somehow worked around this regarding darktable code. The workaround is much easier if I just need a new libisl. I will try that. @doko42 wrote:
You do not need the build script. LLVM is supposed to be optional dependency for dt. This works fine for dt source:
|
thanks for tracking that down. You need to configure isl --without-gcc-arch. Currently building for Debian unstable. |
I'm surprised there is no required lintian check for this -- passing |
lintian is not doing any analysis of the build logs |
Hello @LebedevRI , @jpellegrini and @doko42, only building new ISL library works for me. No need to mess with own gcc build at all. I thought I had two separate issues one in Debian gcc and another in debian libisl23. I do not. Issue is confined to libisl23 from Debian bookworm. I have this:
I build ISL like shown below. I do not set any particular CFLAGS or CXXFLAGS. I use gcc (Debian 12.2.0-14) 12.2.0 standard gcc from Debian 12 Bookworm. I then make sure that cmake and darktable finds my new libisl during configure of darktable and during execution of darktable.
With this local libisl I can build and run darktable from git master. |
Hello @KarlMagnusLarsson @LebedevRI @doko42 -- the new version of libisl is available on sid, and... It works!!! 😁 |
@KarlMagnusLarsson @jpellegrini @LebedevRI @doko42 |
Yes -- I opened a bug in the gcc package (reassigned to libisl): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038603 and they fixed it quite quickly! |
I will stay on Debian 12, stable. I will have to wait for this libisl issue to be fixed in stable. I compile my own libisl meanwhile. |
Continuing the discussion from Debian 12 Bookworm : Building darktable triggers internal compiler error: This is now fixed, also in Debian stable Bookworm, after upgrade 12.4 -> 12.5: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038603 in libisl23/stable,now 0.25-1.1 amd64. It has been a long wait for me using libisl-0.26 compiled from source, meanwhile. However, now I can compile darktable source using regular libisl23/stable,now 0.25-1.1 amd64 from Debian. Thank you for the issue report and subsequent comments @jpellegrini, @LebedevRI and all. |
6+ months to get this fixed. WTF debian. |
Describe the bug
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
Then I get
internal compiler error: Illegal instruction
Expected behavior
Darktable should complete the compile step.
Logfile | Screenshot | Screencast
No response
Commit
release-4.3.0-2518-gccb3310858
Where did you install darktable from?
self compiled
darktable version
release-4.3.0-2518-gccb3310858
What OS are you using?
Linux
What is the version of your OS?
Debian 12.0
Describe your system?
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
VIDIA Corporation TU104GL [Quadro RTX 4000], Nvidia Driver Version: 525.105.17-1 amd64
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
The text was updated successfully, but these errors were encountered: