Bug 393449 - Failure to build from source (CMake error)
Summary: Failure to build from source (CMake error)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: 6.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-24 05:29 UTC by Luca Beltrame
Modified: 2020-08-04 11:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2018-04-24 05:29:38 UTC
Since a while, digikam has failed to build in the OBS to a CMake error. Excerpt from the log:

[  315s] -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
[  315s] -- Checking for module 'lcms2'
[  315s] --   Found lcms2, version 2.9
[  315s] -- Found lcms version 2.09, /usr/lib64/liblcms2.so
[  315s] -- Found EXPAT: /usr/lib64/libexpat.so (found version "2.2.5") 
[  315s] -- Looking for pthread.h
[  315s] -- Looking for pthread.h - found
[  315s] -- Looking for pthread_create
[  316s] -- Looking for pthread_create - not found
[  316s] -- Looking for pthread_create in pthreads
[  316s] -- Looking for pthread_create in pthreads - not found
[  316s] -- Looking for pthread_create in pthread
[  316s] -- Looking for pthread_create in pthread - found
[  316s] -- Found Threads: TRUE  
[  316s] -- Found Exiv2: /usr/lib64/libexiv2.so (found suitable version "0.26.0", minimum required is "0.26") 
[  316s] -- Checking for module 'libavcodec'
[  316s] --   No package 'libavcodec' found
[  316s] -- Checking for module 'libavfilter'
[  316s] --   No package 'libavfilter' found
[  316s] -- Checking for module 'libavformat'
[  316s] --   No package 'libavformat' found
[  316s] -- Checking for module 'libavdevice'
[  316s] --   No package 'libavdevice' found
[  316s] -- Checking for module 'libavutil'
[  316s] --   No package 'libavutil' found
[  316s] -- Checking for module 'libswscale'
[  316s] --   No package 'libswscale' found
[  316s] -- Checking for module 'libpostproc'
[  316s] --   No package 'libpostproc' found
[  316s] -- Could NOT find FFmpeg (missing: FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIRS AVFILTER_LIBRARIES AVFILTER_INCLUDE_DIRS AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIRS AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIRS SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIRS) 
[  316s] -- FFMPEG_FOUND        = FALSE
[  316s] -- FFMPEG_INCLUDE_DIRS = 
[  316s] -- FFMPEG_LIBRARIES    = 
[  316s] -- FFMPEG_DEFINITIONS  = 
[  316s] -- QtAV search path: /usr/lib64/cmake
[  316s] -- Found QtAV: /usr/lib64/libQtAV.so;/usr/lib64/libQtAVWidgets.so  
[  316s] -- Found QtAV version 1.12.0
[  316s] -- QtAV_FOUND       = TRUE
[  316s] -- QtAV_INCLUDE_DIR = /usr/include/qt5/QtAV /usr/include/qt5/QtAVWidgets
[  316s] -- QtAV_LIBRARIES   = /usr/lib64/libQtAV.so;/usr/lib64/libQtAVWidgets.so
[  316s] -- QtAV_VERSION     = 1.12.0
[  316s] CMake Error at core/CMakeLists.txt:239 (if):
[  316s]   if given arguments:
[  316s] 
[  316s]     "AND" "AND" "AND" "AND"
[  316s] 
[  316s]   Unknown arguments specified
[  316s] 
[  316s] 
[  316s] -- Configuring incomplete, errors occurred!
[  316s] See also "/home/abuild/rpmbuild/BUILD/digikam-5.7.0git1176~a6f70d0fda/build/CMakeFiles/CMakeOutput.log".
[  316s] See also "/home/abuild/rpmbuild/BUILD/digikam-5.7.0git1176~a6f70d0fda/build/CMakeFiles/CMakeError.log".

My guess is something is not properly found, and is evaluated to a string rather than a boolean like it should be, resulting in a syntax error.
Comment 1 caulier.gilles 2018-04-24 05:37:21 UTC
The missing components are ffmpeg shared libraries.
Comment 2 Luca Beltrame 2018-04-24 05:42:24 UTC
(In reply to caulier.gilles from comment #1)
> The missing components are ffmpeg shared libraries.

Yes, I checked and that's the case. But it should not error out if they aren't found.
Comment 3 caulier.gilles 2018-04-24 05:53:42 UTC
Git commit 8490f4873741d0f379b71eb8735ceb2dfdb2cf1a by Gilles Caulier.
Committed on 24/04/2018 at 05:51.
Pushed by cgilles into branch 'master'.

if a ffmpeg library is not detected by cmakr, force internal variable to false

M  +7    -4    core/cmake/modules/FindFFmpeg.cmake

https://commits.kde.org/digikam/8490f4873741d0f379b71eb8735ceb2dfdb2cf1a
Comment 4 caulier.gilles 2018-08-17 11:24:37 UTC
Luca,

A 6.0.0-beta tarball is provided for testing at this place :

https://files.kde.org/digikam/

Please check if problem still here.

Gilles Caulier
Comment 5 caulier.gilles 2020-08-04 08:15:10 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best Regards

Gilles Caulier
Comment 6 Luca Beltrame 2020-08-04 10:03:27 UTC
Confirmed building.