[{"id":20241,"web_url":"https://patchwork.libcamera.org/comment/20241/","msgid":"<YWm3KM0nXy3bDLxH@pendragon.ideasonboard.com>","date":"2021-10-15T17:15:20","subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Fabrice,\n\nThank you for the patch.\n\nOn Fri, Oct 15, 2021 at 07:02:32PM +0200, Fabrice Fontaine wrote:\n> For an unknown reason, build fails with some embedded toolchains since\n> commit 92b8ccc42a0f3ad323c79bde3c132d6956011239 on:\n> \n> In file included from ../include/libcamera/base/log.h:10,\n>                  from ../src/ipa/raspberrypi/raspberrypi.cpp:18:\n> ../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)'\n> /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 3.0e+1)' is not a constant expression\n>   502 |  return __cd(__cd(__d).count() / __s);\n> ../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)'\n> /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 6.0e+1)' is not a constant expression\n\nThis seems like it could be a toolchain bug. Does it work with newer gcc\nversions on powerpc64 ?\n\nGiven that RPi is an ARM64 platform, I'd rather disable compilation of\nRPi support on powerpc64 instead of possibly harming the main user.\n\n> So drop constexpr for both divisions to fix this build failure.\n> \n> Fixes:\n>  - http://autobuild.buildroot.org/results/49caebe7ef7e3d63de49e78d5d6839dd0aedf10c\n> \n> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>\n> ---\n>  src/ipa/raspberrypi/raspberrypi.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index fed82e22..8ffb7092 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -61,7 +61,7 @@ using utils::Duration;\n>  /* Configure the sensor with these values initially. */\n>  constexpr double defaultAnalogueGain = 1.0;\n>  constexpr Duration defaultExposureTime = 20.0ms;\n> -constexpr Duration defaultMinFrameDuration = 1.0s / 30.0;\n> +Duration defaultMinFrameDuration = 1.0s / 30.0;\n>  constexpr Duration defaultMaxFrameDuration = 250.0s;\n>  \n>  /*\n> @@ -70,7 +70,7 @@ constexpr Duration defaultMaxFrameDuration = 250.0s;\n>   * we rate-limit the controller Prepare() and Process() calls to lower than or\n>   * equal to this rate.\n>   */\n> -constexpr Duration controllerMinFrameDuration = 1.0s / 60.0;\n> +Duration controllerMinFrameDuration = 1.0s / 60.0;\n>  \n>  LOG_DEFINE_CATEGORY(IPARPI)\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6982FC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Oct 2021 17:15:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D4A8368F4F;\n\tFri, 15 Oct 2021 19:15:37 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DEE2D68546\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 19:15:36 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5C6B52E3;\n\tFri, 15 Oct 2021 19:15:36 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mv0EhMBL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634318136;\n\tbh=ll4nAAJp5jQJFxr2VkcPAt5wGUrYU8ie0onL8gCEBMs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mv0EhMBLp4bYZ0l7tj2AHUR2EDd4RH1plUYOk3YKSYtAkJ9mFOUCbIh8+w+F1vz/d\n\tLkNo5CVWySzpPWtV2e8VT8IvKW3Jp7wTpSrj1qOxiUUMeSzLCgZF03CjUv9bQhWSZ0\n\t+KFlxiUGGW8xDKCkLFXJDTBgINuisPZebVjfhYG4=","Date":"Fri, 15 Oct 2021 20:15:20 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Fabrice Fontaine <fontaine.fabrice@gmail.com>","Message-ID":"<YWm3KM0nXy3bDLxH@pendragon.ideasonboard.com>","References":"<20211015170232.1146000-1-fontaine.fabrice@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211015170232.1146000-1-fontaine.fabrice@gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20242,"web_url":"https://patchwork.libcamera.org/comment/20242/","msgid":"<CAPi7W81xK8FSJbQ7xcsaMn0OFAaU+gAnXOo9URbcPm6hSRPGEQ@mail.gmail.com>","date":"2021-10-15T18:28:22","subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","submitter":{"id":22,"url":"https://patchwork.libcamera.org/api/people/22/","name":"Fabrice Fontaine","email":"fontaine.fabrice@gmail.com"},"content":"Hi Laurent,\n\nLe ven. 15 oct. 2021 à 19:15, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> a écrit :\n>\n> Hi Fabrice,\n>\n> Thank you for the patch.\n>\n> On Fri, Oct 15, 2021 at 07:02:32PM +0200, Fabrice Fontaine wrote:\n> > For an unknown reason, build fails with some embedded toolchains since\n> > commit 92b8ccc42a0f3ad323c79bde3c132d6956011239 on:\n> >\n> > In file included from ../include/libcamera/base/log.h:10,\n> >                  from ../src/ipa/raspberrypi/raspberrypi.cpp:18:\n> > ../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)'\n> > /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 3.0e+1)' is not a constant expression\n> >   502 |  return __cd(__cd(__d).count() / __s);\n> > ../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)'\n> > /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 6.0e+1)' is not a constant expression\n>\n> This seems like it could be a toolchain bug. Does it work with newer gcc\n> versions on powerpc64 ?\nIt builds fine with other toolchains.\n>\n> Given that RPi is an ARM64 platform, I'd rather disable compilation of\n> RPi support on powerpc64 instead of possibly harming the main user.\nOK, thanks for your feedback, I'll update buildroot.\n>\n> > So drop constexpr for both divisions to fix this build failure.\n> >\n> > Fixes:\n> >  - http://autobuild.buildroot.org/results/49caebe7ef7e3d63de49e78d5d6839dd0aedf10c\n> >\n> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>\n> > ---\n> >  src/ipa/raspberrypi/raspberrypi.cpp | 4 ++--\n> >  1 file changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> > index fed82e22..8ffb7092 100644\n> > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > @@ -61,7 +61,7 @@ using utils::Duration;\n> >  /* Configure the sensor with these values initially. */\n> >  constexpr double defaultAnalogueGain = 1.0;\n> >  constexpr Duration defaultExposureTime = 20.0ms;\n> > -constexpr Duration defaultMinFrameDuration = 1.0s / 30.0;\n> > +Duration defaultMinFrameDuration = 1.0s / 30.0;\n> >  constexpr Duration defaultMaxFrameDuration = 250.0s;\n> >\n> >  /*\n> > @@ -70,7 +70,7 @@ constexpr Duration defaultMaxFrameDuration = 250.0s;\n> >   * we rate-limit the controller Prepare() and Process() calls to lower than or\n> >   * equal to this rate.\n> >   */\n> > -constexpr Duration controllerMinFrameDuration = 1.0s / 60.0;\n> > +Duration controllerMinFrameDuration = 1.0s / 60.0;\n> >\n> >  LOG_DEFINE_CATEGORY(IPARPI)\n> >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\nBest Regards,\n\nFabrice","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 36984C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Oct 2021 18:29:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C03368F4F;\n\tFri, 15 Oct 2021 20:29:41 +0200 (CEST)","from mail-lf1-x136.google.com (mail-lf1-x136.google.com\n\t[IPv6:2a00:1450:4864:20::136])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 42EA468546\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 20:29:40 +0200 (CEST)","by mail-lf1-x136.google.com with SMTP id u21so42157250lff.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 11:29:40 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Xc+4+oif\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc:content-transfer-encoding;\n\tbh=cowdYMzd5rww+bhIfocFrdX6x2iEgYBKf9UZT7VFrVc=;\n\tb=Xc+4+oifMQFaZrLjrAcYOlzVsy/eB0V2GdjcdsTiYCG8DEeoi80UQJowy3RlFHwNnW\n\tnPPCmYKcgR2TVps0lJJ+I5Pw0ap3UsBg4YGabmUOMF15yNa1FL3XbpQdfT0jHGeg6aiM\n\tckg8jUaBdS/tiDMywwprFLLRtPyeEdHgSAHfsY8RY7f5Gwu7BnI5bh5EaMkcbaFxOpm6\n\tb5MkPsAYmVbckwaXX680VW+2YxzUWqm6yF0cIPUODlKTxXX4ujUpMUx0tc313oPUffED\n\tsgfezFOML1eTZ7klCTJOXu8+uWbSr6wBF1uPmGdoqxq4bhLDk5zyX7NdbVrCtBVMVM3M\n\tqbGw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=cowdYMzd5rww+bhIfocFrdX6x2iEgYBKf9UZT7VFrVc=;\n\tb=pJKTSLSBpNQO9piA23Tm0kSJ8GQip2AJ3WSo1zD0vGKH5gsZAnh+5gzuqRYDF8Evet\n\tepIO+cxr/6BN6MCgmudYQuOIVwLaovRojIe6QcIZvrmrHidRjB8fz1Ji6XwmfjHgqRfP\n\tn1KMeGzWgwxjslLWzIZlSraDscpDQnmskdrPsbDDA6H0oVJTXVBQCrY9D3xHpweE1moC\n\tBeiC5YCq2oqxiG+mJNoLf+ajF6kRqrcQKjseYMJ4UAow05ATHsmVqvpd/fmCqXpW4pWn\n\tt6W6jq7oGd+iBtOp9X8DDF8A0anyf1NeOU4MRu7XqFKwQEWx/wJFnHUdvKj1/PAQ19P5\n\t4ZuQ==","X-Gm-Message-State":"AOAM533aKim+Tsq4GneZCGA4cqyXZgXb03DM3N55vswK3x0vusLg9mhj\n\tQmoKLmQJMx9R3j4AhkaAM9NgkNPKunE0OSJA/sFbextt","X-Google-Smtp-Source":"ABdhPJyOPu17uSztuB0YUxVsJTz81z7l/lBQ5gJHWzhJbULVJQwoC+jYUv5Bf5pIUXuiBLfRF+Cvt5mJStRo/BPUME8=","X-Received":"by 2002:ac2:4f8a:: with SMTP id\n\tz10mr13464989lfs.686.1634322579392; \n\tFri, 15 Oct 2021 11:29:39 -0700 (PDT)","MIME-Version":"1.0","References":"<20211015170232.1146000-1-fontaine.fabrice@gmail.com>\n\t<YWm3KM0nXy3bDLxH@pendragon.ideasonboard.com>","In-Reply-To":"<YWm3KM0nXy3bDLxH@pendragon.ideasonboard.com>","From":"Fabrice Fontaine <fontaine.fabrice@gmail.com>","Date":"Fri, 15 Oct 2021 20:28:22 +0200","Message-ID":"<CAPi7W81xK8FSJbQ7xcsaMn0OFAaU+gAnXOo9URbcPm6hSRPGEQ@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","Subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20243,"web_url":"https://patchwork.libcamera.org/comment/20243/","msgid":"<YWnl/AxB9Saxo+/f@pendragon.ideasonboard.com>","date":"2021-10-15T20:35:08","subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Fabrice,\n\nOn Fri, Oct 15, 2021 at 08:28:22PM +0200, Fabrice Fontaine wrote:\n> Le ven. 15 oct. 2021 à 19:15, Laurent Pinchart a écrit :\n> > On Fri, Oct 15, 2021 at 07:02:32PM +0200, Fabrice Fontaine wrote:\n> > > For an unknown reason, build fails with some embedded toolchains since\n> > > commit 92b8ccc42a0f3ad323c79bde3c132d6956011239 on:\n> > >\n> > > In file included from ../include/libcamera/base/log.h:10,\n> > >                  from ../src/ipa/raspberrypi/raspberrypi.cpp:18:\n> > > ../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)'\n> > > /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 3.0e+1)' is not a constant expression\n> > >   502 |  return __cd(__cd(__d).count() / __s);\n> > > ../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)'\n> > > /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 6.0e+1)' is not a constant expression\n> >\n> > This seems like it could be a toolchain bug. Does it work with newer gcc\n> > versions on powerpc64 ?\n>\n> It builds fine with other toolchains.\n\nDoes that include newer powerpc64 toolchains ? I'd like to know if we\nshould report a bug to gcc of if it's fixed already.\n\n> > Given that RPi is an ARM64 platform, I'd rather disable compilation of\n> > RPi support on powerpc64 instead of possibly harming the main user.\n>\n> OK, thanks for your feedback, I'll update buildroot.\n\nThank you.\n\n> > > So drop constexpr for both divisions to fix this build failure.\n> > >\n> > > Fixes:\n> > >  - http://autobuild.buildroot.org/results/49caebe7ef7e3d63de49e78d5d6839dd0aedf10c\n> > >\n> > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>\n> > > ---\n> > >  src/ipa/raspberrypi/raspberrypi.cpp | 4 ++--\n> > >  1 file changed, 2 insertions(+), 2 deletions(-)\n> > >\n> > > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > index fed82e22..8ffb7092 100644\n> > > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > @@ -61,7 +61,7 @@ using utils::Duration;\n> > >  /* Configure the sensor with these values initially. */\n> > >  constexpr double defaultAnalogueGain = 1.0;\n> > >  constexpr Duration defaultExposureTime = 20.0ms;\n> > > -constexpr Duration defaultMinFrameDuration = 1.0s / 30.0;\n> > > +Duration defaultMinFrameDuration = 1.0s / 30.0;\n> > >  constexpr Duration defaultMaxFrameDuration = 250.0s;\n> > >\n> > >  /*\n> > > @@ -70,7 +70,7 @@ constexpr Duration defaultMaxFrameDuration = 250.0s;\n> > >   * we rate-limit the controller Prepare() and Process() calls to lower than or\n> > >   * equal to this rate.\n> > >   */\n> > > -constexpr Duration controllerMinFrameDuration = 1.0s / 60.0;\n> > > +Duration controllerMinFrameDuration = 1.0s / 60.0;\n> > >\n> > >  LOG_DEFINE_CATEGORY(IPARPI)\n> > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9F061C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Oct 2021 20:35:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1172368F4F;\n\tFri, 15 Oct 2021 22:35:26 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 34DF668546\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 22:35:25 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 901342E3;\n\tFri, 15 Oct 2021 22:35:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"jE1plgR6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634330124;\n\tbh=/6rE0lmtGKbsW+RISmAFQ+f//KzgwHLq/aH2xcR0MoM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jE1plgR6e5PfbquqL+rnibR8rUSGxAgYxOuXUNONLIZZnn8heAcw2iThBcZRw+gYm\n\t++V7cMSCBnWeRFyAn4i4rEFKrDJpo8O/mheXli1qsjr/t3r+3dppZY4tog5CWWHrCF\n\tr2ptBKm/Pp4BVtOW9tsVy1HgFDz+QH365JzBwJB4=","Date":"Fri, 15 Oct 2021 23:35:08 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Fabrice Fontaine <fontaine.fabrice@gmail.com>","Message-ID":"<YWnl/AxB9Saxo+/f@pendragon.ideasonboard.com>","References":"<20211015170232.1146000-1-fontaine.fabrice@gmail.com>\n\t<YWm3KM0nXy3bDLxH@pendragon.ideasonboard.com>\n\t<CAPi7W81xK8FSJbQ7xcsaMn0OFAaU+gAnXOo9URbcPm6hSRPGEQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<CAPi7W81xK8FSJbQ7xcsaMn0OFAaU+gAnXOo9URbcPm6hSRPGEQ@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20254,"web_url":"https://patchwork.libcamera.org/comment/20254/","msgid":"<CAPi7W83beiyGuvDOroqvgAd4jJ4k9s1SaXExLKDK+S9yGQOdcw@mail.gmail.com>","date":"2021-10-16T20:36:05","subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","submitter":{"id":22,"url":"https://patchwork.libcamera.org/api/people/22/","name":"Fabrice Fontaine","email":"fontaine.fabrice@gmail.com"},"content":"Le ven. 15 oct. 2021 à 22:35, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> a écrit :\n>\n> Hi Fabrice,\n>\n> On Fri, Oct 15, 2021 at 08:28:22PM +0200, Fabrice Fontaine wrote:\n> > Le ven. 15 oct. 2021 à 19:15, Laurent Pinchart a écrit :\n> > > On Fri, Oct 15, 2021 at 07:02:32PM +0200, Fabrice Fontaine wrote:\n> > > > For an unknown reason, build fails with some embedded toolchains since\n> > > > commit 92b8ccc42a0f3ad323c79bde3c132d6956011239 on:\n> > > >\n> > > > In file included from ../include/libcamera/base/log.h:10,\n> > > >                  from ../src/ipa/raspberrypi/raspberrypi.cpp:18:\n> > > > ../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)'\n> > > > /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 3.0e+1)' is not a constant expression\n> > > >   502 |  return __cd(__cd(__d).count() / __s);\n> > > > ../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)'\n> > > > /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/powerpc64-buildroot-linux-gnu/include/c++/9.3.0/chrono:502:32: error: '(1.0e+0l / 6.0e+1)' is not a constant expression\n> > >\n> > > This seems like it could be a toolchain bug. Does it work with newer gcc\n> > > versions on powerpc64 ?\n> >\n> > It builds fine with other toolchains.\n>\n> Does that include newer powerpc64 toolchains ? I'd like to know if we\n> should report a bug to gcc of if it's fixed already.\nI have the same build failure with a glibc toolchain and gcc 10.3.0\n(qemu_ppc64_e5500_defconfig).\n\n>\n> > > Given that RPi is an ARM64 platform, I'd rather disable compilation of\n> > > RPi support on powerpc64 instead of possibly harming the main user.\n> >\n> > OK, thanks for your feedback, I'll update buildroot.\n>\n> Thank you.\n>\n> > > > So drop constexpr for both divisions to fix this build failure.\n> > > >\n> > > > Fixes:\n> > > >  - http://autobuild.buildroot.org/results/49caebe7ef7e3d63de49e78d5d6839dd0aedf10c\n> > > >\n> > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>\n> > > > ---\n> > > >  src/ipa/raspberrypi/raspberrypi.cpp | 4 ++--\n> > > >  1 file changed, 2 insertions(+), 2 deletions(-)\n> > > >\n> > > > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > > index fed82e22..8ffb7092 100644\n> > > > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > > > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > > @@ -61,7 +61,7 @@ using utils::Duration;\n> > > >  /* Configure the sensor with these values initially. */\n> > > >  constexpr double defaultAnalogueGain = 1.0;\n> > > >  constexpr Duration defaultExposureTime = 20.0ms;\n> > > > -constexpr Duration defaultMinFrameDuration = 1.0s / 30.0;\n> > > > +Duration defaultMinFrameDuration = 1.0s / 30.0;\n> > > >  constexpr Duration defaultMaxFrameDuration = 250.0s;\n> > > >\n> > > >  /*\n> > > > @@ -70,7 +70,7 @@ constexpr Duration defaultMaxFrameDuration = 250.0s;\n> > > >   * we rate-limit the controller Prepare() and Process() calls to lower than or\n> > > >   * equal to this rate.\n> > > >   */\n> > > > -constexpr Duration controllerMinFrameDuration = 1.0s / 60.0;\n> > > > +Duration controllerMinFrameDuration = 1.0s / 60.0;\n> > > >\n> > > >  LOG_DEFINE_CATEGORY(IPARPI)\n> > > >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 94D9AC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 16 Oct 2021 20:37:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D59D168F59;\n\tSat, 16 Oct 2021 22:37:27 +0200 (CEST)","from mail-lj1-x234.google.com (mail-lj1-x234.google.com\n\t[IPv6:2a00:1450:4864:20::234])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D5AA160501\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 16 Oct 2021 22:37:25 +0200 (CEST)","by mail-lj1-x234.google.com with SMTP id t20so684333ljk.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 16 Oct 2021 13:37:25 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Z33o/73i\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc:content-transfer-encoding;\n\tbh=UEkmE+sjZZfJLOFR6Jwy0yu00URDcwM8WT0L6Gq/7kE=;\n\tb=Z33o/73ipueXwKAf9AQtV440z+JqkKvC8IYPSJNgs1YTQF6QKO/s+8Vg+vJrZVtoph\n\t3r7sjsc8XYcCtpG8Jd38SqSI/7Bxv0Snw1QoyyB30VvgMscInd6R0nT0jgRVS/USEi4D\n\tZvBA4O8ECpjkyTF6UuQQMqdrQA+ar2XJAqetaf7l78wXItGw1PREjV0q8q6P2mPC2Rum\n\t7KWjWPTyem8zMRbiEn79Vge3q6sqLP8FzAzil0KT9hN+B/LwwVOqJOSJ1w4mZhgJcNO1\n\tgrb/XGQAKLfTPYPgFpHaphhJPa7FrilEtMKFYx0kM/7e7LseeRwlzOfLZa9Ra6gvLPec\n\tOKiw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=UEkmE+sjZZfJLOFR6Jwy0yu00URDcwM8WT0L6Gq/7kE=;\n\tb=3BL+Fjswy8z2Bky4ay8X36jHC3WGmjpxhIN5kHTkkAI/heo4M0FEs/g72T6+i3XByZ\n\tu98/0OM5EXwc/MGUQsIQpE8GM+POKUUva1LPWHgICC4mAyFZRWzyrDaNDmDPsWr1zh9L\n\tOpg4zTLJngRQTrYWi+9vt/Q+dJ86gyHLms/ZlZEcqkMTcVfhc56aPGhLSdydV6wUNjVM\n\tuhT4xyBkrMNWgf+7JYaPG8ua8wSnf3MSldS2zaG5e1ogR/P+EVM2JzlfZ8oQHdfcKTQV\n\tGMWkG6sS+lUSP0i+90pUog5ooFRDzg+fNdAi/qDvWdkFER0q9CKj6kJPdKNvuN+TIJxi\n\tLjlA==","X-Gm-Message-State":"AOAM5306nBB+zFprwAve0XUTBMdlfUz5rlg4oawWpaQEGhiUCVWP5fa1\n\tWga0DzJdzO/jPp87Yid2Z9PBANbQ+PJA4C15+GZTESvLlnc=","X-Google-Smtp-Source":"ABdhPJwwBB7ZEhpz/0ArQKjGP1oXexRBdoaHaMPzj6m8b2Gnks1fisJiNJcTbAc+hJGVhO1ck7b1QANq6Vx2DVPiWj0=","X-Received":"by 2002:a2e:a170:: with SMTP id\n\tu16mr21476706ljl.108.1634416644972; \n\tSat, 16 Oct 2021 13:37:24 -0700 (PDT)","MIME-Version":"1.0","References":"<20211015170232.1146000-1-fontaine.fabrice@gmail.com>\n\t<YWm3KM0nXy3bDLxH@pendragon.ideasonboard.com>\n\t<CAPi7W81xK8FSJbQ7xcsaMn0OFAaU+gAnXOo9URbcPm6hSRPGEQ@mail.gmail.com>\n\t<YWnl/AxB9Saxo+/f@pendragon.ideasonboard.com>","In-Reply-To":"<YWnl/AxB9Saxo+/f@pendragon.ideasonboard.com>","From":"Fabrice Fontaine <fontaine.fabrice@gmail.com>","Date":"Sat, 16 Oct 2021 22:36:05 +0200","Message-ID":"<CAPi7W83beiyGuvDOroqvgAd4jJ4k9s1SaXExLKDK+S9yGQOdcw@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","Subject":"Re: [libcamera-devel] [PATCH] src/ipa/raspberrypi/raspberrypi.cpp:\n\tdrop constexpr for division","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]