Bug 490690 - digiKam 8.4.0, Error at Configuring, CMake Error at core/cmake/modules/FindLibheif.cmake:57
Summary: digiKam 8.4.0, Error at Configuring, CMake Error at core/cmake/modules/FindLi...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: 8.4.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-23 08:46 UTC by SigHunter
Modified: 2024-07-23 11:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.5.0
Sentry Crash Report:


Attachments
bootstrap.linux log (19.79 KB, text/x-log)
2024-07-23 08:46 UTC, SigHunter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SigHunter 2024-07-23 08:46:26 UTC
Created attachment 171922 [details]
bootstrap.linux log

SUMMARY
digiKam 8.4.0 aswell as latest git master (tested ea22fa5a12ed7b7d2d66430719db65c031b849d0) fail to configure when trying to find Libheif

CMake Error at core/cmake/modules/FindLibheif.cmake:57 (string):
  string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  core/CMakeLists.txt:56 (find_package)

-- Found Libheif: /usr/include
-- HEIF_FOUND        = TRUE
-- HEIF_INCLUDE_DIRS = /usr/include
-- HEIF_LIBRARIES    = /usr/lib64/libheif.so
-- HEIF_DEFINITIONS  = 
-- HEIF_VERSION      = 

See the full log attached


STEPS TO REPRODUCE
1. download digiKam 8.4.0, have libheif installed (in my case 1.17.6)
2. cd digikam-8.4.0
3. ./bootstrap.linux

OBSERVED RESULT
Configure ends with an error
"-- Configuring incomplete, errors occurred!"
Throws an error when detecting libheif but it actually found it, as far as i can see 
CMake Error at core/cmake/modules/FindLibheif.cmake:57 (string):
  string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  core/CMakeLists.txt:56 (find_package)

-- Found Libheif: /usr/include
-- HEIF_FOUND        = TRUE
-- HEIF_INCLUDE_DIRS = /usr/include
-- HEIF_LIBRARIES    = /usr/lib64/libheif.so
-- HEIF_DEFINITIONS  = 
-- HEIF_VERSION      = 

--  libheif found............................ YES (optional)


EXPECTED RESULT
Configure should succeed

Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.10-gentoo-dist (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 23.2 GiB of RAM
Graphics Processor: Mesa Intel® Arc

ADDITIONAL INFORMATION
Used tarball: https://download.kde.org/stable/digikam/8.4.0/digiKam-8.4.0.tar.xz and git clone https://invent.kde.org/graphics/digikam.git digikam
It is not a Gentoo packaging problem (in my opinion), as it happens with the plain source tarball
Comment 1 Maik Qualmann 2024-07-23 10:33:51 UTC
Git commit a3ff8ad14c1373f7a7d3c1c9aee4e80954e1859e by Maik Qualmann.
Committed on 23/07/2024 at 10:33.
Pushed by mqualmann into branch 'master'.

escape the input from REGEX MATCHALL

M  +1    -1    core/cmake/modules/FindLibheif.cmake

https://invent.kde.org/graphics/digikam/-/commit/a3ff8ad14c1373f7a7d3c1c9aee4e80954e1859e
Comment 2 Maik Qualmann 2024-07-23 10:34:32 UTC
Please test the fix and report.

Maik
Comment 3 SigHunter 2024-07-23 11:14:33 UTC
(In reply to Maik Qualmann from comment #2)
> Please test the fix and report.
> 
> Maik

looks good! Thank you

Libheif found and 
-- Configuring done (4.8s)
-- Generating done (5.6s)

tested with git master d5ee3471a65fc9670dbe472cdfb838a3d93aaa3d