[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 caulier.gil...@gmail.com changed: What|Removed |Added Resolution|--- |FIXED Status|CONFIRMED |RESOLVED Version Fixed In||8.1.0 -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #18 from Graeme Hewson --- I'm the original reporter of the problem. I'm pleased to say the AppImage works fine on an AMD Athlon II under Kubuntu 23.04. -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #17 from caulier.gil...@gmail.com --- Note : here only Intel CPU based computer are available to test. So i cannot validate myself the fixes. Gilles Caulier -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #16 from caulier.gil...@gmail.com --- Hi all, The current code of future 8.1.0 is patched. I recompiled the Linux AppImage pre-release to see if problem is reproducible (it's compiled under Ubuntu 18.04). Files are there : https://files.kde.org/digikam/ Please check at least to see if problem still reproducible with this bundle on your computer. Best Gilles Caulier -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #11 from caulier.gil...@gmail.com --- To Erich Eickmeyer comment 4: This is how original QtAV deal with SSE instructions. I only port all QtAV rules to a modern CMake implementation. C++ codes still the same. Gilles Caulier -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #15 from caulier.gil...@gmail.com --- Git commit 799953eef9f43fb38d781cff8bea8eb201bb78bb by Gilles Caulier. Committed on 26/05/2023 at 07:09. Pushed by cgilles into branch 'master'. Handle SSE2 and SSE4 combination, not as separated support while compiling QtAV code M +12 -5core/cmake/rules/RulesMediaPlayer.cmake M +3-1core/libs/video/qtav/CMakeLists.txt https://invent.kde.org/graphics/digikam/-/commit/799953eef9f43fb38d781cff8bea8eb201bb78bb -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #14 from caulier.gil...@gmail.com --- In fact the wrong logic can be seen in C++ code : https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/video/qtav/utils/GPUMemCopy.cpp#L108 The cache used to copy with SSE is initialized if at least SSE2 is detected. there is nothing done with SSE4. But SSE2 always exist if SSE4 is detected. In cmake we expect SSE2 or SSE4, not Both at same time: https://invent.kde.org/graphics/digikam/-/blob/master/core/cmake/rules/RulesMediaPlayer.cmake#L417 Gilles Caulier -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #13 from caulier.gil...@gmail.com --- To Fabian Vogt comment 9: This is completly wrong. Both SSE 2 or 4 are detected, definition are set and ALSO the CPU flags. Read well the cmake code AND the cmake Media player configuration report done before the compilation : 1/ SSE detection : https://invent.kde.org/graphics/digikam/-/blob/master/core/cmake/rules/RulesMediaPlayer.cmake#L43 2/ SSE compiler flags + report of detection : https://invent.kde.org/graphics/digikam/-/blob/master/core/cmake/rules/RulesMediaPlayer.cmake#L128 3/ SSE definitions for the code compilation : https://invent.kde.org/graphics/digikam/-/blob/master/core/cmake/rules/RulesMediaPlayer.cmake#L417 4/ Report of compiler flags passed to QtAV code : https://invent.kde.org/graphics/digikam/-/blob/master/core/cmake/rules/RulesMediaPlayer.cmake#L556 5/ Compilation of QtAV SSE code depending of the cmake detection : https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/video/qtav/CMakeLists.txt#L144 6/ Definitions and flags passed to compile QtAV code depending of SSE detection : https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/video/qtav/CMakeLists.txt#L457 I double check the cmake configuration report and the compilation rules with "export VERBOSE=1" to see if code is well compile with defintions and flags, and all is fine. I think the error can be located in the cmake code here : https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/video/qtav/CMakeLists.txt#L150 These rules compile SSE4 code if SSE4 is detected, else SSE2 code if SSE2 is detected. it never compile both at the same time, so there is a risk to switch to a void(void) function not compiled at run-time when different architecture is used. Gilles Caulier -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #12 from Erich Eickmeyer --- (In reply to caulier.gilles from comment #11) > To Erich Eickmeyer comment 4: > > This is how original QtAV deal with SSE instructions. I only port all QtAV > rules to a modern CMake implementation. C++ codes still the same. > > Gilles Caulier If you have ported the QtAV rules into your code, then by that logic it is a bug in your code. -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #10 from caulier.gil...@gmail.com --- As explained here : https://stackoverflow.com/questions/6901369/how-to-detect-sse-availability-in-cmake The VS code from github include the OptimizeForArchitecture.cmake, which come from KDE in fact. I tried to see the file is included in Extra Cmake Module from KF5 framework, but i don't find it. Perhaps it come from another KDE project. OptimizeForArchitecture.cmake could be used in place to handle and setup compilation with CPU supporting SSE instructions. Gilles -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #9 from Fabian Vogt --- QtAV upstream does this correctly already: src/utils/CopyFrame_SSE4.cpp is built with -msse4.1, src/utils/CopyFrame_SSE2.cpp is built with -msse2 and src/utils/GPUMemCopy.cpp decides during runtime which of those to call. Unfortunately digikam reimplemented everything in custom cmake, which broke this. -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 Paul changed: What|Removed |Added CC||pip@gmx.com -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #8 from Fabian Vogt --- (In reply to Antonio Rojas from comment #7) > You can set -DSSE4_1_FOUND=OFF at configure time. As a workaround that's certainly possible, but it's not a proper solution. This will break e.g. once checks for AVX are added. -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 --- Comment #7 from Antonio Rojas --- You can set -DSSE4_1_FOUND=OFF at configure time. -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 Fabian Vogt changed: What|Removed |Added Severity|normal |crash Ever confirmed|0 |1 Status|REPORTED|CONFIRMED --- Comment #6 from Fabian Vogt --- Any news here? digikam just crashes on many user systems just because it was built on hardware which supported SSE4.1. -- You are receiving this mail because: You are watching all bug changes.
[digikam] [Bug 465548] digiKam crashes with illegal instruction on AMD Athlon II due to SSE detection with CMake
https://bugs.kde.org/show_bug.cgi?id=465548 caulier.gil...@gmail.com changed: What|Removed |Added CC||caulier.gil...@gmail.com Summary|digikam crashes with|digiKam crashes with |illegal instruction on AMD |illegal instruction on AMD |Athlon II |Athlon II due to SSE ||detection with CMake Component|general |Portability-Cmake -- You are receiving this mail because: You are watching all bug changes.