Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libcamera for openSUSE:Factory 
checked in at 2021-09-03 21:25:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libcamera (Old)
 and      /work/SRC/openSUSE:Factory/.libcamera.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libcamera"

Fri Sep  3 21:25:40 2021 rev:8 rq:914789 version:0~2809.e0704e97

Changes:
--------
--- /work/SRC/openSUSE:Factory/libcamera/libcamera.changes      2021-07-26 
17:38:43.898048320 +0200
+++ /work/SRC/openSUSE:Factory/.libcamera.new.1899/libcamera.changes    
2021-09-03 21:26:07.426173745 +0200
@@ -1,0 +2,7 @@
+Fri Aug 27 18:03:48 UTC 2021 - Antonio Larrosa <alarr...@suse.com>
+
+- Add patch to work around what seems to be a bug in gcc 11 with
+  constexpr being treated as "non const" only in ppc64/ppc64le:
+  * fix-ppc64.patch
+
+-------------------------------------------------------------------

New:
----
  fix-ppc64.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libcamera.spec ++++++
--- /var/tmp/diff_new_pack.3zPShY/_old  2021-09-03 21:26:07.862174199 +0200
+++ /var/tmp/diff_new_pack.3zPShY/_new  2021-09-03 21:26:07.866174203 +0200
@@ -28,6 +28,7 @@
 Source:         %name-%version.tar.xz
 Source1:        baselibs.conf
 Patch1:         vers.diff
+Patch2:         fix-ppc64.patch
 BuildRequires:  boost-devel
 BuildRequires:  c++_compiler
 BuildRequires:  libQt5Core-devel
@@ -96,7 +97,11 @@
 This is its integration plugin for gstreamer.
 
 %prep
-%autosetup -p1
+%autosetup -p1 -N
+%patch1 -p1
+%ifarch ppc64 ppc64le
+%patch2 -p1
+%endif
 
 %build
 export CFLAGS="%optflags -Wno-error"

++++++ fix-ppc64.patch ++++++
From: Antonio Larrosa <alarr...@suse.com>
Subject: Work around what seems to be a gcc bug only happening in ppc64/ppc64le

When building code like:
constexpr Duration defaultMinFrameDuration = 1.0s / 30.0;
or
constexpr Duration controllerMinFrameDuration = 1.0s / 60.0;

gcc 11.1.1 is giving this error:

[  235s] In file included from ../include/libcamera/base/log.h:10,
[  235s]                  from ../src/ipa/raspberrypi/raspberrypi.cpp:18:
[  235s] ../src/ipa/raspberrypi/raspberrypi.cpp:64:53:   in ???constexpr??? 
expansion of ???std::chrono::operator/<long double, std::ratio<1>, 
double>(std::literals::chrono_literals::operator""s(1.0e+0l), 3.0e+1)???
[  235s] /usr/include/c++/11/chrono:710:39: error: ???(1.0e+0l / 3.0e+1)??? is 
not a constant expression
[  235s]   710 |         return __cd(__cd(__d).count() / __s);
[  235s]       |                     ~~~~~~~~~~~~~~~~~~^~~~~
[  235s] ../src/ipa/raspberrypi/raspberrypi.cpp:73:56:   in ???constexpr??? 
expansion of ???std::chrono::operator/<long double, std::ratio<1>, 
double>(std::literals::chrono_literals::operator""s(1.0e+0l), 6.0e+1)???

This change works around it to let it build fine.

Index: libcamera-0~2809.e0704e97/src/ipa/raspberrypi/raspberrypi.cpp
===================================================================
--- libcamera-0~2809.e0704e97.orig/src/ipa/raspberrypi/raspberrypi.cpp
+++ libcamera-0~2809.e0704e97/src/ipa/raspberrypi/raspberrypi.cpp
@@ -61,7 +61,7 @@ using utils::Duration;
 /* Configure the sensor with these values initially. */
 constexpr double defaultAnalogueGain = 1.0;
 constexpr Duration defaultExposureTime = 20.0ms;
-constexpr Duration defaultMinFrameDuration = 1.0s / 30.0;
+const Duration defaultMinFrameDuration = 1.0s / 30.0;
 constexpr Duration defaultMaxFrameDuration = 250.0s;
 
 /*
@@ -70,7 +70,7 @@ constexpr Duration defaultMaxFrameDurati
  * we rate-limit the controller Prepare() and Process() calls to lower than or
  * equal to this rate.
  */
-constexpr Duration controllerMinFrameDuration = 1.0s / 60.0;
+const Duration controllerMinFrameDuration = 1.0s / 60.0;
 
 LOG_DEFINE_CATEGORY(IPARPI)
 

Reply via email to