[{"id":35961,"web_url":"https://patchwork.libcamera.org/comment/35961/","msgid":"<175871067761.1246375.14211605680500017928@ping.linuxembedded.co.uk>","date":"2025-09-24T10:44:37","subject":"Re: [PATCH] meson: Add option to disable libunwind integration","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Dylan Aïssi (2025-09-24 11:39:42)\n> While optional, libunwind integration is enabled when\n> meson finds it without having a way to disable it.\n> This is the case for Debian where libunwind is installed\n> by build dependencies. Since we want to reduce dependencies\n> on libunwind in Debian due to several issues with it\n> (see https://bugs.debian.org/1093688), we need an option\n> to control its activation.\n\nThat looks a bit squashed ;-) But could be rewrapped while applying:\n\n> Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>\n> ---\n>  meson_options.txt              | 5 +++++\n>  src/libcamera/base/meson.build | 2 +-\n>  2 files changed, 6 insertions(+), 1 deletion(-)\n> \n> diff --git a/meson_options.txt b/meson_options.txt\n> index 2104469e..32acb45b 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -42,6 +42,11 @@ option('lc-compliance',\n>          value : 'auto',\n>          description : 'Compile the lc-compliance test application')\n>  \n> +option('libunwind',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable libunwind provide backtraces to help debugging')\n> +\n>  option('pipelines',\n>          type : 'array',\n>          value : ['auto'],\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index a742dfdf..bcf37f71 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -27,7 +27,7 @@ libcamera_base_internal_sources = files([\n>  ])\n>  \n>  libdw = dependency('libdw', required : false)\n> -libunwind = dependency('libunwind', required : false)\n> +libunwind = dependency('libunwind', required : get_option('libunwind'))\n\nI think that's functional and reasonable to me:\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>  \n>  if cc.has_header_symbol('execinfo.h', 'backtrace')\n>      config_h.set('HAVE_BACKTRACE', 1)\n> -- \n> 2.47.3\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 C338DC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Sep 2025 10:44:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B01C6B5FB;\n\tWed, 24 Sep 2025 12:44:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DE2176B58E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Sep 2025 12:44:40 +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 F3EC6596;\n\tWed, 24 Sep 2025 12:43:16 +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=\"aMKvwr7G\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758710597;\n\tbh=JGvzcN7ebIiOpMEK2DvYu8619dMP1LuzCIDgBCeQJlU=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=aMKvwr7GsljLG5LZSSFLSsXZsmngEUwfviYqWWGTNIJrs5/ZTlvjM/5vdXPDQrXaX\n\t25cqqbGiGSpYKph1kPgEQXPAqimhqSZ7i4Z0VsRqyqwh2ub5CVjSGEBNvJVnHg5gv8\n\tPT6QbipGaccGVvwr6omyLtq3Ay3IzP1pxaKpoGbU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250924103942.38558-1-dylan.aissi@collabora.com>","References":"<20250924103942.38558-1-dylan.aissi@collabora.com>","Subject":"Re: [PATCH] meson: Add option to disable libunwind integration","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Dylan =?utf-8?b?QcOvc3Np?= <dylan.aissi@collabora.com>","To":"Dylan =?utf-8?b?QcOvc3Np?= <dylan.aissi@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 24 Sep 2025 11:44:37 +0100","Message-ID":"<175871067761.1246375.14211605680500017928@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":35962,"web_url":"https://patchwork.libcamera.org/comment/35962/","msgid":"<9e2a1cd9-ef28-46e0-a1d8-56e7c00125ee@ideasonboard.com>","date":"2025-09-24T11:11:45","subject":"Re: [PATCH] meson: Add option to disable libunwind integration","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. 09. 24. 12:39 keltezéssel, Dylan Aïssi írta:\n> While optional, libunwind integration is enabled when\n> meson finds it without having a way to disable it.\n> This is the case for Debian where libunwind is installed\n> by build dependencies. Since we want to reduce dependencies\n> on libunwind in Debian due to several issues with it\n> (see https://bugs.debian.org/1093688), we need an option\n> to control its activation.\n> \n> Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>\n> ---\n>   meson_options.txt              | 5 +++++\n>   src/libcamera/base/meson.build | 2 +-\n>   2 files changed, 6 insertions(+), 1 deletion(-)\n> \n> diff --git a/meson_options.txt b/meson_options.txt\n> index 2104469e..32acb45b 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -42,6 +42,11 @@ option('lc-compliance',\n>           value : 'auto',\n>           description : 'Compile the lc-compliance test application')\n>   \n> +option('libunwind',\n> +        type : 'feature',\n> +        value : 'auto',\n> +        description : 'Enable libunwind provide backtraces to help debugging')\n\nI think this description should be reworded, e.g.\n\n   Enable libunwind integration for (better?) backtrace generation\n\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n> +\n>   option('pipelines',\n>           type : 'array',\n>           value : ['auto'],\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index a742dfdf..bcf37f71 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -27,7 +27,7 @@ libcamera_base_internal_sources = files([\n>   ])\n>   \n>   libdw = dependency('libdw', required : false)\n> -libunwind = dependency('libunwind', required : false)\n> +libunwind = dependency('libunwind', required : get_option('libunwind'))\n>   \n>   if cc.has_header_symbol('execinfo.h', 'backtrace')\n>       config_h.set('HAVE_BACKTRACE', 1)","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 CCF11BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Sep 2025 11:11:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C51CB6B58E;\n\tWed, 24 Sep 2025 13:11:50 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3F37E69367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Sep 2025 13:11:48 +0200 (CEST)","from [192.168.33.12] (185.221.140.70.nat.pool.zt.hu\n\t[185.221.140.70])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5566F1E30;\n\tWed, 24 Sep 2025 13:10: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=\"DArTu5zG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758712224;\n\tbh=pkNDENn0V/X5bOz+iO4nFrIV07zLSlYoW5FhbZUmRhk=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=DArTu5zGjG1nEVHQN5wyrK3PKI65fIK0Uo5HomiHvM40netEZTWIc1+E+il3kMdr0\n\tpzElcKaEl2G0QwbrUGd46rYKI4dR2nPfRhI4ZrX38okh2s791+RWwnRqEmCtDfE/8u\n\tA05on3J6plMhnUJ1PZl4Rb0qbIMrgWqr81DZwqZk=","Message-ID":"<9e2a1cd9-ef28-46e0-a1d8-56e7c00125ee@ideasonboard.com>","Date":"Wed, 24 Sep 2025 13:11:45 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] meson: Add option to disable libunwind integration","To":"=?utf-8?q?Dylan_A=C3=AFssi?= <dylan.aissi@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250924103942.38558-1-dylan.aissi@collabora.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250924103942.38558-1-dylan.aissi@collabora.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":35965,"web_url":"https://patchwork.libcamera.org/comment/35965/","msgid":"<20250924120938.GA30963@pendragon.ideasonboard.com>","date":"2025-09-24T12:09:38","subject":"Re: [PATCH] meson: Add option to disable libunwind integration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Sep 24, 2025 at 01:11:45PM +0200, Barnabás Pőcze wrote:\n> 2025. 09. 24. 12:39 keltezéssel, Dylan Aïssi írta:\n> > While optional, libunwind integration is enabled when\n> > meson finds it without having a way to disable it.\n> > This is the case for Debian where libunwind is installed\n> > by build dependencies. Since we want to reduce dependencies\n> > on libunwind in Debian due to several issues with it\n> > (see https://bugs.debian.org/1093688), we need an option\n> > to control its activation.\n> > \n> > Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>\n> > ---\n> >   meson_options.txt              | 5 +++++\n> >   src/libcamera/base/meson.build | 2 +-\n> >   2 files changed, 6 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/meson_options.txt b/meson_options.txt\n> > index 2104469e..32acb45b 100644\n> > --- a/meson_options.txt\n> > +++ b/meson_options.txt\n> > @@ -42,6 +42,11 @@ option('lc-compliance',\n> >           value : 'auto',\n> >           description : 'Compile the lc-compliance test application')\n> >   \n> > +option('libunwind',\n> > +        type : 'feature',\n> > +        value : 'auto',\n> > +        description : 'Enable libunwind provide backtraces to help debugging')\n> \n> I think this description should be reworded, e.g.\n> \n>    Enable libunwind integration for (better?) backtrace generation\n\nLooks good to me. You can decide on whether or not to keep the \"better\"\nwhen you push the patch :-) Please also reflow the commit message as\nmentioned by Kieran.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> > +\n> >   option('pipelines',\n> >           type : 'array',\n> >           value : ['auto'],\n> > diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> > index a742dfdf..bcf37f71 100644\n> > --- a/src/libcamera/base/meson.build\n> > +++ b/src/libcamera/base/meson.build\n> > @@ -27,7 +27,7 @@ libcamera_base_internal_sources = files([\n> >   ])\n> >   \n> >   libdw = dependency('libdw', required : false)\n> > -libunwind = dependency('libunwind', required : false)\n> > +libunwind = dependency('libunwind', required : get_option('libunwind'))\n> >   \n> >   if cc.has_header_symbol('execinfo.h', 'backtrace')\n> >       config_h.set('HAVE_BACKTRACE', 1)","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 E54FFC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Sep 2025 12:10:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AC8486B58E;\n\tWed, 24 Sep 2025 14:10:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 66A8D69367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Sep 2025 14:10:11 +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 UTF8SMTPSA id 24B70AD0;\n\tWed, 24 Sep 2025 14:08:47 +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=\"bKxPp2s3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758715727;\n\tbh=7gsceP13kJhzMEUUl1E5CJh0ubE3anM4kRU99DyMCQs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bKxPp2s34NL3jkI5OKblUPkoRmvsSbFWozuLoQEEmZ14I9lQoji5QEfCewR15CNXh\n\tOiVxnmkotxBYPjzGUfSpnbzd6TYsy1/hGrfOZhuJom5i6R1PQmZ32L42EEONQdel0V\n\tnPvtggrzVOHGW833lb55FV8zYF7g7eLJLtZnF5aY=","Date":"Wed, 24 Sep 2025 15:09:38 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Dylan =?utf-8?b?QcOvc3Np?= <dylan.aissi@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] meson: Add option to disable libunwind integration","Message-ID":"<20250924120938.GA30963@pendragon.ideasonboard.com>","References":"<20250924103942.38558-1-dylan.aissi@collabora.com>\n\t<9e2a1cd9-ef28-46e0-a1d8-56e7c00125ee@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<9e2a1cd9-ef28-46e0-a1d8-56e7c00125ee@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>"}}]