[{"id":36349,"web_url":"https://patchwork.libcamera.org/comment/36349/","msgid":"<176095285719.336133.7721361013931945534@localhost>","date":"2025-10-20T09:34:17","subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Laurent,\n\nQuoting Laurent Pinchart (2025-10-19 16:07:38)\n> The libyuv wrap uses a libyuv commit between versions 1770 and 1772,\n> more than 5 years old. This specifies CMake 2.8 as the minimum required\n> version.\n> \n> The most recent CMake has dropped compatibility with versions older than\n> 3.5 in CMake 4.0. CMake 3.5 was released in 2016, and all distributions\n> we care about ship more recent versions. With CMake 4.0 or newer,\n> shipped for instance by Gentoo, compilation of the libyuv wrap fails.\n> \n> Update the wrap to version 1908, which is the oldest that requires CMake\n> 3.5 or newer. This introduces another issue: due to a bug in Meson (see\n> https://github.com/mesonbuild/meson/issues/10764), PIC handling is\n> broken when a CMake project wraps a static library into another static\n> library that has no additional source file. Work around it by wrapping\n> the libyuv static library again, manually setting 'pic' to true.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/meson.build         | 16 +++++++++++++++-\n>  subprojects/libyuv.wrap |  2 +-\n>  2 files changed, 16 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/meson.build b/src/meson.build\n> index 8eb8f05b362f..9b63c8e845d8 100644\n> --- a/src/meson.build\n> +++ b/src/meson.build\n> @@ -55,7 +55,21 @@ if (pipelines.contains('virtual') or get_option('android').allowed()) and \\\n>           '-Wno-unused-parameter')\n>      libyuv_vars.append_link_args('-ljpeg')\n>      libyuv = cmake.subproject('libyuv', options : libyuv_vars)\n> -    libyuv_dep = libyuv.dependency('yuv')\n> +\n> +    # Meson fails to apply the -fPIC flag to static libraries produced by CMake\n> +    # that wraps other static libraries without adding any source file, despite\n> +    # setting CMAKE_POSITION_INDEPENDENT_CODE to ON. See\n> +    # https://github.com/mesonbuild/meson/issues/10764.\n> +    #\n> +    # Work around the issue by wrapping the libyuv static library into another\n> +    # static library with 'pic' set to true.\n> +    libyuv_static = static_library('libyuv-static',\n> +                                   dependencies : libyuv.dependency('yuv'),\n> +                                   pic : true,\n> +                                   install : false)\n> +    libyuv_include = libyuv.include_directories('yuv')\n> +    libyuv_dep = declare_dependency(link_with : libyuv_static,\n> +                                    include_directories : libyuv_include)\n\nImpressive for how long these bugs can hide given that -fPIC has been\naround for more than a day...\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\n>  endif\n>  \n>  # libcamera must be built first as a dependency to the other components.\n> diff --git a/subprojects/libyuv.wrap b/subprojects/libyuv.wrap\n> index 3417e73f376c..70039b705925 100644\n> --- a/subprojects/libyuv.wrap\n> +++ b/subprojects/libyuv.wrap\n> @@ -3,4 +3,4 @@\n>  [wrap-git]\n>  directory = libyuv\n>  url = https://chromium.googlesource.com/libyuv/libyuv.git\n> -revision = 93b1b332cd60b56ab90aea14182755e379c28a80\n> +revision = 23d416d6f32539bc7e44afa2bec6ce0128dbed0b\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 28187BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Oct 2025 09:34:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EDD2B606F4;\n\tMon, 20 Oct 2025 11:34:21 +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 43DF4606AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Oct 2025 11:34:20 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:9f50:5b33:d3ec:e1ea])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 7EAA3F52;\n\tMon, 20 Oct 2025 11:32:37 +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=\"ue6p9+ye\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760952757;\n\tbh=IRKfaxlNvphnw/T2zcZOhapd4bWzHDPC4ajs7Uya2RU=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=ue6p9+ye1xHj90u8Mq4eynemG7XeOxnsXbzle/57RxuLaZWOHqBwPL1pb1iOp3IWd\n\trk2bQ+OeEp0c8vriAN7RU/p31twIKj1tHECghk646asqb7u0apzSCsHdtwArERDx3E\n\tho2ofWwTGeXLEKCG6fWuaobhSTZUaFU4Fkbio7S8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>","References":"<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 20 Oct 2025 11:34:17 +0200","Message-ID":"<176095285719.336133.7721361013931945534@localhost>","User-Agent":"alot/0.12.dev8+g2c003385c862.d20250602","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":36351,"web_url":"https://patchwork.libcamera.org/comment/36351/","msgid":"<176095364778.756374.17797547438875882230@ping.linuxembedded.co.uk>","date":"2025-10-20T09:47:27","subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-10-19 15:07:38)\n> The libyuv wrap uses a libyuv commit between versions 1770 and 1772,\n> more than 5 years old. This specifies CMake 2.8 as the minimum required\n> version.\n> \n> The most recent CMake has dropped compatibility with versions older than\n> 3.5 in CMake 4.0. CMake 3.5 was released in 2016, and all distributions\n> we care about ship more recent versions. With CMake 4.0 or newer,\n> shipped for instance by Gentoo, compilation of the libyuv wrap fails.\n> \n> Update the wrap to version 1908, which is the oldest that requires CMake\n> 3.5 or newer. This introduces another issue: due to a bug in Meson (see\n\nWhat's the pin on cmake 3.5 ?\n\n> https://github.com/mesonbuild/meson/issues/10764), PIC handling is\n> broken when a CMake project wraps a static library into another static\n> library that has no additional source file. Work around it by wrapping\n> the libyuv static library again, manually setting 'pic' to true.\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/meson.build         | 16 +++++++++++++++-\n>  subprojects/libyuv.wrap |  2 +-\n>  2 files changed, 16 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/meson.build b/src/meson.build\n> index 8eb8f05b362f..9b63c8e845d8 100644\n> --- a/src/meson.build\n> +++ b/src/meson.build\n> @@ -55,7 +55,21 @@ if (pipelines.contains('virtual') or get_option('android').allowed()) and \\\n>           '-Wno-unused-parameter')\n>      libyuv_vars.append_link_args('-ljpeg')\n>      libyuv = cmake.subproject('libyuv', options : libyuv_vars)\n> -    libyuv_dep = libyuv.dependency('yuv')\n> +\n> +    # Meson fails to apply the -fPIC flag to static libraries produced by CMake\n> +    # that wraps other static libraries without adding any source file, despite\n> +    # setting CMAKE_POSITION_INDEPENDENT_CODE to ON. See\n> +    # https://github.com/mesonbuild/meson/issues/10764.\n> +    #\n> +    # Work around the issue by wrapping the libyuv static library into another\n> +    # static library with 'pic' set to true.\n> +    libyuv_static = static_library('libyuv-static',\n> +                                   dependencies : libyuv.dependency('yuv'),\n> +                                   pic : true,\n> +                                   install : false)\n> +    libyuv_include = libyuv.include_directories('yuv')\n> +    libyuv_dep = declare_dependency(link_with : libyuv_static,\n> +                                    include_directories : libyuv_include)\n>  endif\n>  \n>  # libcamera must be built first as a dependency to the other components.\n> diff --git a/subprojects/libyuv.wrap b/subprojects/libyuv.wrap\n> index 3417e73f376c..70039b705925 100644\n> --- a/subprojects/libyuv.wrap\n> +++ b/subprojects/libyuv.wrap\n> @@ -3,4 +3,4 @@\n>  [wrap-git]\n>  directory = libyuv\n>  url = https://chromium.googlesource.com/libyuv/libyuv.git\n> -revision = 93b1b332cd60b56ab90aea14182755e379c28a80\n> +revision = 23d416d6f32539bc7e44afa2bec6ce0128dbed0b\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 E3C1EBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Oct 2025 09:47:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 16520606F4;\n\tMon, 20 Oct 2025 11:47: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 D980B606F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Oct 2025 11:47:30 +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 30F13161;\n\tMon, 20 Oct 2025 11:45:48 +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=\"FefwshCH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760953548;\n\tbh=9+htnFSe69trnYOzIDNMazWDIL1vZ8urQASFphLrNp8=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=FefwshCHiwTM0MfaRBm9h+d2q1dTUgYE9st77jozR9n48SjslWO//UUa5T3ODd4wP\n\tcYSOhqT76lrA5d1VOew/gDMnuPACclK7gO0BmfOA9Ec1qcakKQnFISaGKGjZDkyvG0\n\t2sh5dYNabIj/twC+1GkFheMjw4YLK+60ttMhxpVY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>","References":"<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 20 Oct 2025 10:47:27 +0100","Message-ID":"<176095364778.756374.17797547438875882230@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":36352,"web_url":"https://patchwork.libcamera.org/comment/36352/","msgid":"<176095369827.756374.10969044442848317255@ping.linuxembedded.co.uk>","date":"2025-10-20T09:48:18","subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Kieran Bingham (2025-10-20 10:47:27)\n> Quoting Laurent Pinchart (2025-10-19 15:07:38)\n> > The libyuv wrap uses a libyuv commit between versions 1770 and 1772,\n> > more than 5 years old. This specifies CMake 2.8 as the minimum required\n> > version.\n> > \n> > The most recent CMake has dropped compatibility with versions older than\n> > 3.5 in CMake 4.0. CMake 3.5 was released in 2016, and all distributions\n> > we care about ship more recent versions. With CMake 4.0 or newer,\n> > shipped for instance by Gentoo, compilation of the libyuv wrap fails.\n> > \n> > Update the wrap to version 1908, which is the oldest that requires CMake\n> > 3.5 or newer. This introduces another issue: due to a bug in Meson (see\n> \n> What's the pin on cmake 3.5 ?\n\nSorry it was right there above - but I glossed over it on the first pass\ndown then read upwards on the second pass ;-)\n\n--\nKieran\n\n> \n> > https://github.com/mesonbuild/meson/issues/10764), PIC handling is\n> > broken when a CMake project wraps a static library into another static\n> > library that has no additional source file. Work around it by wrapping\n> > the libyuv static library again, manually setting 'pic' to true.\n> \n> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/meson.build         | 16 +++++++++++++++-\n> >  subprojects/libyuv.wrap |  2 +-\n> >  2 files changed, 16 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/src/meson.build b/src/meson.build\n> > index 8eb8f05b362f..9b63c8e845d8 100644\n> > --- a/src/meson.build\n> > +++ b/src/meson.build\n> > @@ -55,7 +55,21 @@ if (pipelines.contains('virtual') or get_option('android').allowed()) and \\\n> >           '-Wno-unused-parameter')\n> >      libyuv_vars.append_link_args('-ljpeg')\n> >      libyuv = cmake.subproject('libyuv', options : libyuv_vars)\n> > -    libyuv_dep = libyuv.dependency('yuv')\n> > +\n> > +    # Meson fails to apply the -fPIC flag to static libraries produced by CMake\n> > +    # that wraps other static libraries without adding any source file, despite\n> > +    # setting CMAKE_POSITION_INDEPENDENT_CODE to ON. See\n> > +    # https://github.com/mesonbuild/meson/issues/10764.\n> > +    #\n> > +    # Work around the issue by wrapping the libyuv static library into another\n> > +    # static library with 'pic' set to true.\n> > +    libyuv_static = static_library('libyuv-static',\n> > +                                   dependencies : libyuv.dependency('yuv'),\n> > +                                   pic : true,\n> > +                                   install : false)\n> > +    libyuv_include = libyuv.include_directories('yuv')\n> > +    libyuv_dep = declare_dependency(link_with : libyuv_static,\n> > +                                    include_directories : libyuv_include)\n> >  endif\n> >  \n> >  # libcamera must be built first as a dependency to the other components.\n> > diff --git a/subprojects/libyuv.wrap b/subprojects/libyuv.wrap\n> > index 3417e73f376c..70039b705925 100644\n> > --- a/subprojects/libyuv.wrap\n> > +++ b/subprojects/libyuv.wrap\n> > @@ -3,4 +3,4 @@\n> >  [wrap-git]\n> >  directory = libyuv\n> >  url = https://chromium.googlesource.com/libyuv/libyuv.git\n> > -revision = 93b1b332cd60b56ab90aea14182755e379c28a80\n> > +revision = 23d416d6f32539bc7e44afa2bec6ce0128dbed0b\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 39311C3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Oct 2025 09:48:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DAFBD606FC;\n\tMon, 20 Oct 2025 11:48:22 +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 88EF0606F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Oct 2025 11:48:21 +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 EA12A161;\n\tMon, 20 Oct 2025 11:46:38 +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=\"AEEmJuQG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760953599;\n\tbh=fUhvhd0oPPFUz0T/Vj0dluf2ZaiApcqiaVtsmXCRXLk=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=AEEmJuQGegwdcONAaaUdmtt/Ax7Y0mussk98mJ4+sjSYcM+FXL/S8j6mvZeMQ3q8I\n\tWsfhb7SeHaUyNtlDZljv4YG7c1H4HWt/M+7HPl0Gfi8zvHXkyzfcSgZkxC2oAu9i/K\n\t5+6cuUAMRVIVEOHAqq5P7fYSndpLEytMJcFuanNo=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<176095364778.756374.17797547438875882230@ping.linuxembedded.co.uk>","References":"<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>\n\t<176095364778.756374.17797547438875882230@ping.linuxembedded.co.uk>","Subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 20 Oct 2025 10:48:18 +0100","Message-ID":"<176095369827.756374.10969044442848317255@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":36353,"web_url":"https://patchwork.libcamera.org/comment/36353/","msgid":"<f66f223d-b07f-4ae9-9331-30f6a3971b63@ideasonboard.com>","date":"2025-10-20T09:48:41","subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 10. 19. 16:07 keltezéssel, Laurent Pinchart írta:\n> The libyuv wrap uses a libyuv commit between versions 1770 and 1772,\n> more than 5 years old. This specifies CMake 2.8 as the minimum required\n> version.\n> \n> The most recent CMake has dropped compatibility with versions older than\n> 3.5 in CMake 4.0. CMake 3.5 was released in 2016, and all distributions\n> we care about ship more recent versions. With CMake 4.0 or newer,\n> shipped for instance by Gentoo, compilation of the libyuv wrap fails.\n> \n> Update the wrap to version 1908, which is the oldest that requires CMake\n> 3.5 or newer. This introduces another issue: due to a bug in Meson (see\n\nAny reason not to update to the latest version that has acceptable\ndependencies for libcamera?\n\n\nRegards,\nBarnabás Pőcze\n\n\n> https://github.com/mesonbuild/meson/issues/10764), PIC handling is\n> broken when a CMake project wraps a static library into another static\n> library that has no additional source file. Work around it by wrapping\n> the libyuv static library again, manually setting 'pic' to true.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>   src/meson.build         | 16 +++++++++++++++-\n>   subprojects/libyuv.wrap |  2 +-\n>   2 files changed, 16 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/meson.build b/src/meson.build\n> index 8eb8f05b362f..9b63c8e845d8 100644\n> --- a/src/meson.build\n> +++ b/src/meson.build\n> @@ -55,7 +55,21 @@ if (pipelines.contains('virtual') or get_option('android').allowed()) and \\\n>            '-Wno-unused-parameter')\n>       libyuv_vars.append_link_args('-ljpeg')\n>       libyuv = cmake.subproject('libyuv', options : libyuv_vars)\n> -    libyuv_dep = libyuv.dependency('yuv')\n> +\n> +    # Meson fails to apply the -fPIC flag to static libraries produced by CMake\n> +    # that wraps other static libraries without adding any source file, despite\n> +    # setting CMAKE_POSITION_INDEPENDENT_CODE to ON. See\n> +    # https://github.com/mesonbuild/meson/issues/10764.\n> +    #\n> +    # Work around the issue by wrapping the libyuv static library into another\n> +    # static library with 'pic' set to true.\n> +    libyuv_static = static_library('libyuv-static',\n> +                                   dependencies : libyuv.dependency('yuv'),\n> +                                   pic : true,\n> +                                   install : false)\n> +    libyuv_include = libyuv.include_directories('yuv')\n> +    libyuv_dep = declare_dependency(link_with : libyuv_static,\n> +                                    include_directories : libyuv_include)\n>   endif\n> \n>   # libcamera must be built first as a dependency to the other components.\n> diff --git a/subprojects/libyuv.wrap b/subprojects/libyuv.wrap\n> index 3417e73f376c..70039b705925 100644\n> --- a/subprojects/libyuv.wrap\n> +++ b/subprojects/libyuv.wrap\n> @@ -3,4 +3,4 @@\n>   [wrap-git]\n>   directory = libyuv\n>   url = https://chromium.googlesource.com/libyuv/libyuv.git\n> -revision = 93b1b332cd60b56ab90aea14182755e379c28a80\n> +revision = 23d416d6f32539bc7e44afa2bec6ce0128dbed0b\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 3C10FC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Oct 2025 09:48:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DEA1A60708;\n\tMon, 20 Oct 2025 11:48:46 +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 99B02606F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Oct 2025 11:48:45 +0200 (CEST)","from [192.168.33.28] (185.182.214.105.nat.pool.zt.hu\n\t[185.182.214.105])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EC120192C;\n\tMon, 20 Oct 2025 11:47:02 +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=\"WS70zzFk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760953623;\n\tbh=rswWtMFVfXz+ARLpjp6OE9xoaH8Ukfj3PijGOmDZJqU=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=WS70zzFk94Bh7T53VDtEN7X8lNHKzGKOlOLsg8hZBvMbjuUapzHzqxKc7E67bAhu6\n\t1ZJxnTOKH5nZnP3WrV5qg4QEFHrcLPsRkl2iZbc0Xm2qqZaHKQG3cp0Jo2FJXg5XRK\n\tzD+Oc+39ZlIyGUcRpFKagtAG5B158Kt6YmEX3Uf4=","Message-ID":"<f66f223d-b07f-4ae9-9331-30f6a3971b63@ideasonboard.com>","Date":"Mon, 20 Oct 2025 11:48:41 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<mCFBgeKN_Atm_UVRAoB4TyNF_CtRkxzMXiDgpGE1QDrYKktaoRU7Z_jhG6xqmUR9wqDqq9KdL9oIfwIVIX6VNg==@protonmail.internalid>\n\t<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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":36356,"web_url":"https://patchwork.libcamera.org/comment/36356/","msgid":"<20251020100059.GA6159@pendragon.ideasonboard.com>","date":"2025-10-20T10:00:59","subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Oct 20, 2025 at 11:48:41AM +0200, Barnabás Pőcze wrote:\n> 2025. 10. 19. 16:07 keltezéssel, Laurent Pinchart írta:\n> > The libyuv wrap uses a libyuv commit between versions 1770 and 1772,\n> > more than 5 years old. This specifies CMake 2.8 as the minimum required\n> > version.\n> > \n> > The most recent CMake has dropped compatibility with versions older than\n> > 3.5 in CMake 4.0. CMake 3.5 was released in 2016, and all distributions\n> > we care about ship more recent versions. With CMake 4.0 or newer,\n> > shipped for instance by Gentoo, compilation of the libyuv wrap fails.\n> > \n> > Update the wrap to version 1908, which is the oldest that requires CMake\n> > 3.5 or newer. This introduces another issue: due to a bug in Meson (see\n> \n> Any reason not to update to the latest version that has acceptable\n> dependencies for libcamera?\n\nNot really. The oldest CMake shipped by Debian or Ubuntu is 3.18 in\nDebian Bullseye. The latest libyuv version (1921) requires CMake 3.16or\nnewer. I'll update to that.\n\n> > https://github.com/mesonbuild/meson/issues/10764), PIC handling is\n> > broken when a CMake project wraps a static library into another static\n> > library that has no additional source file. Work around it by wrapping\n> > the libyuv static library again, manually setting 'pic' to true.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >   src/meson.build         | 16 +++++++++++++++-\n> >   subprojects/libyuv.wrap |  2 +-\n> >   2 files changed, 16 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/src/meson.build b/src/meson.build\n> > index 8eb8f05b362f..9b63c8e845d8 100644\n> > --- a/src/meson.build\n> > +++ b/src/meson.build\n> > @@ -55,7 +55,21 @@ if (pipelines.contains('virtual') or get_option('android').allowed()) and \\\n> >            '-Wno-unused-parameter')\n> >       libyuv_vars.append_link_args('-ljpeg')\n> >       libyuv = cmake.subproject('libyuv', options : libyuv_vars)\n> > -    libyuv_dep = libyuv.dependency('yuv')\n> > +\n> > +    # Meson fails to apply the -fPIC flag to static libraries produced by CMake\n> > +    # that wraps other static libraries without adding any source file, despite\n> > +    # setting CMAKE_POSITION_INDEPENDENT_CODE to ON. See\n> > +    # https://github.com/mesonbuild/meson/issues/10764.\n> > +    #\n> > +    # Work around the issue by wrapping the libyuv static library into another\n> > +    # static library with 'pic' set to true.\n> > +    libyuv_static = static_library('libyuv-static',\n> > +                                   dependencies : libyuv.dependency('yuv'),\n> > +                                   pic : true,\n> > +                                   install : false)\n> > +    libyuv_include = libyuv.include_directories('yuv')\n> > +    libyuv_dep = declare_dependency(link_with : libyuv_static,\n> > +                                    include_directories : libyuv_include)\n> >   endif\n> > \n> >   # libcamera must be built first as a dependency to the other components.\n> > diff --git a/subprojects/libyuv.wrap b/subprojects/libyuv.wrap\n> > index 3417e73f376c..70039b705925 100644\n> > --- a/subprojects/libyuv.wrap\n> > +++ b/subprojects/libyuv.wrap\n> > @@ -3,4 +3,4 @@\n> >   [wrap-git]\n> >   directory = libyuv\n> >   url = https://chromium.googlesource.com/libyuv/libyuv.git\n> > -revision = 93b1b332cd60b56ab90aea14182755e379c28a80\n> > +revision = 23d416d6f32539bc7e44afa2bec6ce0128dbed0b","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 50B16C3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Oct 2025 10:01:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D848A60713;\n\tMon, 20 Oct 2025 12:01:10 +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 6735D606BC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Oct 2025 12:01:09 +0200 (CEST)","from pendragon.ideasonboard.com (87-94-110-32.bb.dnainternet.fi\n\t[87.94.110.32])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 7F538F52;\n\tMon, 20 Oct 2025 11:59:26 +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=\"LqD9OpOv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760954366;\n\tbh=WZF3nJmUYN0CDiYXVYkavGaYN/NonYjzVjmmWn6H1qw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=LqD9OpOvKSkpsAeEUwSRzL4e0INHRCWjqCJLPAkIcvMsknwBCzhD/j/8sClK+A4rk\n\tVqgiT+bPaEOMuaDY9l9T9lBla1Nuck3kNe+sY9hcgb6Lo0XJpGqSP7mh48I1q9qAGc\n\tMXZrN7U50NGC23yO8MsDQuMafL1ZZgI/SKfQLAOQ=","Date":"Mon, 20 Oct 2025 13:00:59 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] subprojects: libyuv: Bump to version 1908","Message-ID":"<20251020100059.GA6159@pendragon.ideasonboard.com>","References":"<mCFBgeKN_Atm_UVRAoB4TyNF_CtRkxzMXiDgpGE1QDrYKktaoRU7Z_jhG6xqmUR9wqDqq9KdL9oIfwIVIX6VNg==@protonmail.internalid>\n\t<20251019140738.30325-1-laurent.pinchart@ideasonboard.com>\n\t<f66f223d-b07f-4ae9-9331-30f6a3971b63@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<f66f223d-b07f-4ae9-9331-30f6a3971b63@ideasonboard.com>","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>"}}]