[{"id":29440,"web_url":"https://patchwork.libcamera.org/comment/29440/","msgid":"<171511292472.3440081.6641049171945758859@ping.linuxembedded.co.uk>","date":"2024-05-07T20:15:24","subject":"Re: [CI] [PATCH v1 1/2] Add compilation test with C++20","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-05-07 19:17:55)\n> libcamera currently uses C++17, but we want to prepare for a switch to\n> C++20 in the somehow distant future. Avoid C++20 regressions by adding a\n> compilation test with C++20. Do so with g++ 13, which is the most likely\n> version of g++ to support this newer language version properly.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  gitlab-ci.yml | 15 +++++++++++----\n>  1 file changed, 11 insertions(+), 4 deletions(-)\n> \n> diff --git a/gitlab-ci.yml b/gitlab-ci.yml\n> index 3dcb512525ed..225d929bd2ed 100644\n> --- a/gitlab-ci.yml\n> +++ b/gitlab-ci.yml\n> @@ -185,10 +185,17 @@ build-full:debian:13:\n>    needs:\n>      - job: container-debian:13\n>        artifacts: false\n> -  variables:\n> -    ARCH: amd64\n> -    CC: gcc-13\n> -    CXX: g++-13\n> +  parallel:\n> +    matrix:\n> +      - ARCH: amd64\n> +        CC: gcc-13\n> +        CXX: g++-13\n> +      - ARCH: amd64\n> +        CC: gcc-13\n> +        CXX: g++-13\n> +        MESON_OPTIONS: >-\n> +          ${MESON_ALL_OPTIONS}\n> +          -D cpp_std=c++20\n\nSounds good to me, but is there really a need to build with gcc-13\ntwice?\n\nI guess it does still ensure gcc-13 still is valid at C++17, and means\nwe can update our C++20 builds to later compilers too sooo\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>  \n>  # Build each commit in the branch individually to detect compilation breakages.\n>  build-history:\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 68A1EC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 May 2024 20:15:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8DF946342D;\n\tTue,  7 May 2024 22:15:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 07D80633E4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 May 2024 22:15:27 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 98C9DDFB;\n\tTue,  7 May 2024 22:15: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=\"EztbaZkU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1715112924;\n\tbh=TlmP1SfN+S2yRHbKwwiHTb7zkI0qRxhIvgduewRK864=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=EztbaZkUF6Rd5cVrXF8NDtZqw7e/wCQT12a986qDYGmF2YLvsePlNwB+cPE8SKypo\n\tWarxm7bvI5vWPmJl4kYxiPQsK+yHzwF890ZnFSdN19a/gTBvXv4Zt0VWSQubZlZv00\n\t0t1qoDQQJauCr/XDvaAVv/wUPBGvKJQezEvZ2BO8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240507181756.32635-2-laurent.pinchart@ideasonboard.com>","References":"<20240507181756.32635-1-laurent.pinchart@ideasonboard.com>\n\t<20240507181756.32635-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [CI] [PATCH v1 1/2] Add compilation test with C++20","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 07 May 2024 21:15:24 +0100","Message-ID":"<171511292472.3440081.6641049171945758859@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29442,"web_url":"https://patchwork.libcamera.org/comment/29442/","msgid":"<20240507202523.GE2012@pendragon.ideasonboard.com>","date":"2024-05-07T20:25:23","subject":"Re: [CI] [PATCH v1 1/2] Add compilation test with C++20","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, May 07, 2024 at 09:15:24PM +0100, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2024-05-07 19:17:55)\n> > libcamera currently uses C++17, but we want to prepare for a switch to\n> > C++20 in the somehow distant future. Avoid C++20 regressions by adding a\n> > compilation test with C++20. Do so with g++ 13, which is the most likely\n> > version of g++ to support this newer language version properly.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  gitlab-ci.yml | 15 +++++++++++----\n> >  1 file changed, 11 insertions(+), 4 deletions(-)\n> > \n> > diff --git a/gitlab-ci.yml b/gitlab-ci.yml\n> > index 3dcb512525ed..225d929bd2ed 100644\n> > --- a/gitlab-ci.yml\n> > +++ b/gitlab-ci.yml\n> > @@ -185,10 +185,17 @@ build-full:debian:13:\n> >    needs:\n> >      - job: container-debian:13\n> >        artifacts: false\n> > -  variables:\n> > -    ARCH: amd64\n> > -    CC: gcc-13\n> > -    CXX: g++-13\n> > +  parallel:\n> > +    matrix:\n> > +      - ARCH: amd64\n> > +        CC: gcc-13\n> > +        CXX: g++-13\n> > +      - ARCH: amd64\n> > +        CC: gcc-13\n> > +        CXX: g++-13\n> > +        MESON_OPTIONS: >-\n> > +          ${MESON_ALL_OPTIONS}\n> > +          -D cpp_std=c++20\n> \n> Sounds good to me, but is there really a need to build with gcc-13\n> twice?\n> \n> I guess it does still ensure gcc-13 still is valid at C++17, and means\n> we can update our C++20 builds to later compilers too sooo\n\nI suppose we could save CPU cycles by compiling for C++20 only in the\ngcc 13 test. Do you have a preference ?\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> >  # Build each commit in the branch individually to detect compilation breakages.\n> >  build-history:","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 7F5F0BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 May 2024 20:25:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A153A6343B;\n\tTue,  7 May 2024 22:25:33 +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 A994D63425\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 May 2024 22:25:31 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 049AFDFB;\n\tTue,  7 May 2024 22:25:28 +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=\"BFg/5U6Q\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1715113529;\n\tbh=T4L8TlcPEfK6SyCXlGqMDdGF+gJUq2IIcPSeYFXWCWM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=BFg/5U6QhIRxSSX2YUFMmkWYmd/PZP3Kw0OwnJUlCdpigWpmJj6cEQqBK356Yc2IQ\n\tuXdv2uwbxHqOvnmeaSebNcXc/grY6vy/U8V6kXlLfS8S/mQ3lTo1VbzT/fZK0xP6SW\n\tdVe6jN5WsAyrkpHUIRiTRLYmzXywSXNvUcBF80XU=","Date":"Tue, 7 May 2024 23:25:23 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [CI] [PATCH v1 1/2] Add compilation test with C++20","Message-ID":"<20240507202523.GE2012@pendragon.ideasonboard.com>","References":"<20240507181756.32635-1-laurent.pinchart@ideasonboard.com>\n\t<20240507181756.32635-2-laurent.pinchart@ideasonboard.com>\n\t<171511292472.3440081.6641049171945758859@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<171511292472.3440081.6641049171945758859@ping.linuxembedded.co.uk>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]