Control: tags -1 +patch  +sid  +experimental

On Sun, 17 Dec 2023 02:09:02 +0200 Adrian Bunk <b...@debian.org> wrote:
> Source: linphone
> Version: 5.2.0-4
> Severity: serious
> Tags: ftbfs
> Forwarded: 
> https://gitlab.linphone.org/BC/public/liblinphone/-/commit/5cff6f87a82cea59041869a6d1ed391921ab589d
> 
> https://buildd.debian.org/status/logs.php?pkg=linphone&ver=5.2.0-4%2Bb1
> 
> ...
> In file included from /usr/include/ZXing/Flags.h:8,
>                  from /usr/include/ZXing/BarcodeFormat.h:9,
>                  from /<<PKGBUILDDIR>>/src/factory/factory.cpp:25:
> /usr/include/ZXing/BitHacks.h:37:55: error: ‘is_integral_v’ is not a member 
> of ‘std’; did you mean ‘is_integral’?
>    37 | template<typename T, typename = 
>std::enable_if_t<std::is_integral_v<T>>>
>       |                                                       ^~~~~~~~~~~~~
>       |                                                       is_integral
> ...


Looks like the reason is that zxing-cpp headers require C++17 features 
(std::is_integral_v),
while current linphone is built with C++14 by default [2].

[2] https://sources.debian.org/src/linphone/5.2.0-4/CMakeLists.txt/#L96

With the current condition, the simple solution would be patching linphone to 
be built
using C++17 standard (see patch below). My local rebuilds did not reveal 
regressions
after switching to C++17 from C++14, and in the meanwhile linphone upstream has 
already
made such switch in the trunk code [3].

[3] 
https://gitlab.linphone.org/BC/public/liblinphone/-/commit/5cff6f87a82cea59041869a6d1ed391921ab589d

+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b3060af..c846dc7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -93,7 +93,7 @@ cmake_dependent_option(ENABLE_QRCODE "Enable QRCode support" 
YES "ENABLE_VIDEO"
+ # * DISABLE_BC_PACKAGE_SEARCH: skip find_package() for every BC package 
(bctoolbox, ortp, etc.)
+ # * DISABLE_SOCI_PACKAGE_SEARCH: skip find_package() for Soci.
+ 
+-set(CMAKE_CXX_STANDARD 14)
++set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_EXTENSIONS NO)
+ 
+ if(NOT CMAKE_BUILD_TYPE)


Thanks,
Boyuan Yang

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to