[{"id":20705,"web_url":"https://patchwork.libcamera.org/comment/20705/","msgid":"<20211108084358.wktow32uhld2gg7g@uno.localdomain>","date":"2021-11-08T08:43:58","subject":"Re: [libcamera-devel] [PATCH] lc-compliance: Build with googltest\n\tin subproject","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Hiro,\n\nOn Mon, Nov 08, 2021 at 03:01:35PM +0900, Hirokazu Honda wrote:\n> libgtest-dev is provided as a static library. The compiler and linker\n\nIsn't this actually a distribution-specific decision (to ship gtest as\na static library or not) ?\n\nIt however causes issues, in example building on Debian 10 with gcc8\nhttp://buildbot.uovobw.net:8080/#/builders/6/builds/1\n\n> to create the static library might be different from ones used for\n> libcamera. This causes a problem upon linking.\n>\n> This puts googltest code to subprojects, builds the code and link it\n> for lc-compliance. However, libgtest is locally built as a library on\n> ChromeOS and thus the used compiler and linker are the same as one\n> used for libcamera. We don't do these on ChromeOS build environment.\n>\n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  README.rst                    |  2 +-\n>  src/lc-compliance/meson.build | 14 ++++++++++----\n>  subprojects/.gitignore        |  4 +++-\n>  subprojects/gtest.wrap        | 15 +++++++++++++++\n>  4 files changed, 29 insertions(+), 6 deletions(-)\n>  create mode 100644 subprojects/gtest.wrap\n>\n> diff --git a/README.rst b/README.rst\n> index 8af5f118..c48b4dba 100644\n> --- a/README.rst\n> +++ b/README.rst\n> @@ -99,7 +99,7 @@ for android: [optional]\n>          libexif-dev libjpeg-dev libyaml-dev\n>\n>  for lc-compliance: [optional]\n> -        libevent-dev libgtest-dev\n> +        libevent-dev\n>\n>  Using GStreamer plugin\n>  ~~~~~~~~~~~~~~~~~~~~~~\n> diff --git a/src/lc-compliance/meson.build b/src/lc-compliance/meson.build\n> index aa5852f6..4d13ad00 100644\n> --- a/src/lc-compliance/meson.build\n> +++ b/src/lc-compliance/meson.build\n> @@ -1,15 +1,21 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n> -libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))\n> -libgtest = dependency('gtest', required : get_option('lc-compliance'))\n> -\n> -if not (libevent.found() and libgtest.found())\n> +if not get_option('lc-compliance').enabled()\n\nWhy change this ? Shouldn't this just become\n\nlibevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))\n\nif not (libevent.found()\n      lc_compliance_enabled = false\n      subdir_done()\nendif\n\nAfaict meson 'auto' features should be enabled/disabled depending on\nthe availability of its dependencies at runtime ?\n\nI'm not against changing this to be a boolean like in example the\n'v4l2' build-option, but a default should then be provided in\nmeson_options.txt ?\n\n>      lc_compliance_enabled = false\n>      subdir_done()\n>  endif\n>\n>  lc_compliance_enabled = true\n>\n> +libevent = dependency('libevent_pthreads', required : true)\n> +\n> +if get_option('android_platform') == 'cros'\n> +   libgtest = dependency('gtest', required : true)\n> +else\n> +   libgtest_sp = subproject('gtest')\n> +   libgtest = libgtest_sp.get_variable('gtest_dep')\n> +endif\n> +\n>  lc_compliance_sources = files([\n>      '../cam/event_loop.cpp',\n>      '../cam/options.cpp',\n> diff --git a/subprojects/.gitignore b/subprojects/.gitignore\n> index 410b8bd6..82ef2c83 100644\n> --- a/subprojects/.gitignore\n> +++ b/subprojects/.gitignore\n> @@ -1 +1,3 @@\n> -/libyuv\n> \\ No newline at end of file\n> +/libyuv\n> +/googletest-release*\n> +/packagecache\n\nWhat's packagecache and why is added here now ?\n\n> \\ No newline at end of file\n> diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap\n> new file mode 100644\n> index 00000000..8513793f\n> --- /dev/null\n> +++ b/subprojects/gtest.wrap\n> @@ -0,0 +1,15 @@\n> +[wrap-file]\n> +directory = googletest-release-1.11.0\n> +source_url = https://github.com/google/googletest/archive/release-1.11.0.zip\n> +source_filename = gtest-1.11.0.zip\n> +source_hash = 353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a\n> +patch_filename = gtest_1.11.0-1_patch.zip\n> +patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.11.0-1/get_patch\n> +patch_hash = d38c39184384608b08419be52aed1d0f9d9d1b5ed71c0c35e51cccbdddab7084\n> +\n> +[provide]\n> +gtest = gtest_dep\n> +gtest_main = gtest_main_dep\n> +gmock = gmock_dep\n> +gmock_main = gmock_main_dep\n> +\n\nI get a complaint when applying the patch\n\n.git/rebase-apply/patch:82: new blank line at EOF.\n+\nwarning: 1 line adds whitespace errors.\n\nThe change fixes building on older platforms where indeed the static\nlibrary and libcamera were built with two different compilers version\nand we had errors at linking time. Very nice!\n\nTested-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n\n> --\n> 2.34.0.rc0.344.g81b53c2807-goog\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 D4448BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Nov 2021 08:43:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0A4FD6034D;\n\tMon,  8 Nov 2021 09:43:07 +0100 (CET)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BFF5B60235\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Nov 2021 09:43:05 +0100 (CET)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 1EABE240013;\n\tMon,  8 Nov 2021 08:43:04 +0000 (UTC)"],"Date":"Mon, 8 Nov 2021 09:43:58 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20211108084358.wktow32uhld2gg7g@uno.localdomain>","References":"<20211108060135.370781-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211108060135.370781-1-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH] lc-compliance: Build with googltest\n\tin subproject","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":20706,"web_url":"https://patchwork.libcamera.org/comment/20706/","msgid":"<163636865519.287435.14376883702208068658@Monstersaurus>","date":"2021-11-08T10:50:55","subject":"Re: [libcamera-devel] [PATCH] lc-compliance: Build with googltest\n\tin subproject","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jacopo Mondi (2021-11-08 08:43:58)\n> Hi Hiro,\n> \n> On Mon, Nov 08, 2021 at 03:01:35PM +0900, Hirokazu Honda wrote:\n> > libgtest-dev is provided as a static library. The compiler and linker\n> \n> Isn't this actually a distribution-specific decision (to ship gtest as\n> a static library or not) ?\n> \n> It however causes issues, in example building on Debian 10 with gcc8\n> http://buildbot.uovobw.net:8080/#/builders/6/builds/1\n> \n> > to create the static library might be different from ones used for\n> > libcamera. This causes a problem upon linking.\n> >\n> > This puts googltest code to subprojects, builds the code and link it\n> > for lc-compliance. However, libgtest is locally built as a library on\n> > ChromeOS and thus the used compiler and linker are the same as one\n> > used for libcamera. We don't do these on ChromeOS build environment.\n> >\n> > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> > ---\n> >  README.rst                    |  2 +-\n> >  src/lc-compliance/meson.build | 14 ++++++++++----\n> >  subprojects/.gitignore        |  4 +++-\n> >  subprojects/gtest.wrap        | 15 +++++++++++++++\n> >  4 files changed, 29 insertions(+), 6 deletions(-)\n> >  create mode 100644 subprojects/gtest.wrap\n> >\n> > diff --git a/README.rst b/README.rst\n> > index 8af5f118..c48b4dba 100644\n> > --- a/README.rst\n> > +++ b/README.rst\n> > @@ -99,7 +99,7 @@ for android: [optional]\n> >          libexif-dev libjpeg-dev libyaml-dev\n> >\n> >  for lc-compliance: [optional]\n> > -        libevent-dev libgtest-dev\n> > +        libevent-dev\n> >\n> >  Using GStreamer plugin\n> >  ~~~~~~~~~~~~~~~~~~~~~~\n> > diff --git a/src/lc-compliance/meson.build b/src/lc-compliance/meson.build\n> > index aa5852f6..4d13ad00 100644\n> > --- a/src/lc-compliance/meson.build\n> > +++ b/src/lc-compliance/meson.build\n> > @@ -1,15 +1,21 @@\n> >  # SPDX-License-Identifier: CC0-1.0\n> >\n> > -libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))\n> > -libgtest = dependency('gtest', required : get_option('lc-compliance'))\n> > -\n> > -if not (libevent.found() and libgtest.found())\n> > +if not get_option('lc-compliance').enabled()\n> \n> Why change this ? Shouldn't this just become\n> \n> libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))\n> \n> if not (libevent.found()\n>       lc_compliance_enabled = false\n>       subdir_done()\n> endif\n> \n> Afaict meson 'auto' features should be enabled/disabled depending on\n> the availability of its dependencies at runtime ?\n> \n> I'm not against changing this to be a boolean like in example the\n> 'v4l2' build-option, but a default should then be provided in\n> meson_options.txt ?\n\nI don't think we should change the behaviour here. If libevent_pthreads\nisn't found, then lc-compliance should be disabled.\n\nIf it is found, then it can be automatically enabled, since we will\neither use the (CrOS) provided gtest, or we will build it ourselves\nthrough the wrap.\n\n\n> \n> >      lc_compliance_enabled = false\n> >      subdir_done()\n> >  endif\n> >\n> >  lc_compliance_enabled = true\n> >\n> > +libevent = dependency('libevent_pthreads', required : true)\n> > +\n> > +if get_option('android_platform') == 'cros'\n> > +   libgtest = dependency('gtest', required : true)\n> > +else\n> > +   libgtest_sp = subproject('gtest')\n> > +   libgtest = libgtest_sp.get_variable('gtest_dep')\n> > +endif\n> > +\n> >  lc_compliance_sources = files([\n> >      '../cam/event_loop.cpp',\n> >      '../cam/options.cpp',\n> > diff --git a/subprojects/.gitignore b/subprojects/.gitignore\n> > index 410b8bd6..82ef2c83 100644\n> > --- a/subprojects/.gitignore\n> > +++ b/subprojects/.gitignore\n> > @@ -1 +1,3 @@\n> > -/libyuv\n> > \\ No newline at end of file\n> > +/libyuv\n> > +/googletest-release*\n> > +/packagecache\n> \n> What's packagecache and why is added here now ?\n> \n> > \\ No newline at end of file\n> > diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap\n> > new file mode 100644\n> > index 00000000..8513793f\n> > --- /dev/null\n> > +++ b/subprojects/gtest.wrap\n> > @@ -0,0 +1,15 @@\n> > +[wrap-file]\n> > +directory = googletest-release-1.11.0\n> > +source_url = https://github.com/google/googletest/archive/release-1.11.0.zip\n> > +source_filename = gtest-1.11.0.zip\n> > +source_hash = 353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a\n> > +patch_filename = gtest_1.11.0-1_patch.zip\n> > +patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.11.0-1/get_patch\n> > +patch_hash = d38c39184384608b08419be52aed1d0f9d9d1b5ed71c0c35e51cccbdddab7084\n> > +\n> > +[provide]\n> > +gtest = gtest_dep\n> > +gtest_main = gtest_main_dep\n> > +gmock = gmock_dep\n> > +gmock_main = gmock_main_dep\n> > +\n> \n> I get a complaint when applying the patch\n> \n> .git/rebase-apply/patch:82: new blank line at EOF.\n> +\n> warning: 1 line adds whitespace errors.\n> \n> The change fixes building on older platforms where indeed the static\n> library and libcamera were built with two different compilers version\n> and we had errors at linking time. Very nice!\n> \n> Tested-by: Jacopo Mondi <jacopo@jmondi.org>\n\nI think this will fix things for me too, so I'm looking forward to\nseeing it merged.\n\nThanks.\n\nKieran\n\n\n> \n> Thanks\n>    j\n> \n> > --\n> > 2.34.0.rc0.344.g81b53c2807-goog\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 6D6E8BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Nov 2021 10:51:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD2B76034D;\n\tMon,  8 Nov 2021 11:50:59 +0100 (CET)","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 5672560235\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Nov 2021 11:50:58 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D7B58E51;\n\tMon,  8 Nov 2021 11:50:57 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Bd680PzL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1636368657;\n\tbh=nMNibU03cUal5320JS3JOh0aM06237yhdT0VT9CJHyA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Bd680PzLHYdVJFb8KNk9VBKjzvQvhGQnnu29J16Svjw1jDmwKPoyKsQgnpl+2WTZa\n\tkJzGHMIogu+L1iHoHJDKzh8wCxW0h4jdmQUibNHbe2AqT9e1R8qGijD7kk2Yjbyr4B\n\t+eazl8ObtKcqqBVQlEfvxvEtyQJn4bM84MeimBa8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211108084358.wktow32uhld2gg7g@uno.localdomain>","References":"<20211108060135.370781-1-hiroh@chromium.org>\n\t<20211108084358.wktow32uhld2gg7g@uno.localdomain>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>, Jacopo Mondi <jacopo@jmondi.org>","Date":"Mon, 08 Nov 2021 10:50:55 +0000","Message-ID":"<163636865519.287435.14376883702208068658@Monstersaurus>","User-Agent":"alot/0.9.1","Subject":"Re: [libcamera-devel] [PATCH] lc-compliance: Build with googltest\n\tin subproject","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":20739,"web_url":"https://patchwork.libcamera.org/comment/20739/","msgid":"<CAO5uPHNTWRmGN4gYHgeYNQv9f7AGSQ_Cq00vuFMZAV6KW-Pc=w@mail.gmail.com>","date":"2021-11-09T05:31:45","subject":"Re: [libcamera-devel] [PATCH] lc-compliance: Build with googltest\n\tin subproject","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran and Jacopo, thank you for commenting.\n\nOn Mon, Nov 8, 2021 at 7:50 PM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Quoting Jacopo Mondi (2021-11-08 08:43:58)\n> > Hi Hiro,\n> >\n> > On Mon, Nov 08, 2021 at 03:01:35PM +0900, Hirokazu Honda wrote:\n> > > libgtest-dev is provided as a static library. The compiler and linker\n> >\n> > Isn't this actually a distribution-specific decision (to ship gtest as\n> > a static library or not) ?\n> >\n> > It however causes issues, in example building on Debian 10 with gcc8\n> > http://buildbot.uovobw.net:8080/#/builders/6/builds/1\n> >\n> > > to create the static library might be different from ones used for\n> > > libcamera. This causes a problem upon linking.\n> > >\n> > > This puts googltest code to subprojects, builds the code and link it\n> > > for lc-compliance. However, libgtest is locally built as a library on\n> > > ChromeOS and thus the used compiler and linker are the same as one\n> > > used for libcamera. We don't do these on ChromeOS build environment.\n> > >\n> > > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> > > ---\n> > >  README.rst                    |  2 +-\n> > >  src/lc-compliance/meson.build | 14 ++++++++++----\n> > >  subprojects/.gitignore        |  4 +++-\n> > >  subprojects/gtest.wrap        | 15 +++++++++++++++\n> > >  4 files changed, 29 insertions(+), 6 deletions(-)\n> > >  create mode 100644 subprojects/gtest.wrap\n> > >\n> > > diff --git a/README.rst b/README.rst\n> > > index 8af5f118..c48b4dba 100644\n> > > --- a/README.rst\n> > > +++ b/README.rst\n> > > @@ -99,7 +99,7 @@ for android: [optional]\n> > >          libexif-dev libjpeg-dev libyaml-dev\n> > >\n> > >  for lc-compliance: [optional]\n> > > -        libevent-dev libgtest-dev\n> > > +        libevent-dev\n> > >\n> > >  Using GStreamer plugin\n> > >  ~~~~~~~~~~~~~~~~~~~~~~\n> > > diff --git a/src/lc-compliance/meson.build b/src/lc-compliance/meson.build\n> > > index aa5852f6..4d13ad00 100644\n> > > --- a/src/lc-compliance/meson.build\n> > > +++ b/src/lc-compliance/meson.build\n> > > @@ -1,15 +1,21 @@\n> > >  # SPDX-License-Identifier: CC0-1.0\n> > >\n> > > -libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))\n> > > -libgtest = dependency('gtest', required : get_option('lc-compliance'))\n> > > -\n> > > -if not (libevent.found() and libgtest.found())\n> > > +if not get_option('lc-compliance').enabled()\n> >\n> > Why change this ? Shouldn't this just become\n> >\n> > libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))\n> >\n> > if not (libevent.found()\n> >       lc_compliance_enabled = false\n> >       subdir_done()\n> > endif\n> >\n> > Afaict meson 'auto' features should be enabled/disabled depending on\n> > the availability of its dependencies at runtime ?\n> >\n> > I'm not against changing this to be a boolean like in example the\n> > 'v4l2' build-option, but a default should then be provided in\n> > meson_options.txt ?\n>\n> I don't think we should change the behaviour here. If libevent_pthreads\n> isn't found, then lc-compliance should be disabled.\n>\n> If it is found, then it can be automatically enabled, since we will\n> either use the (CrOS) provided gtest, or we will build it ourselves\n> through the wrap.\n>\n>\n> >\n> > >      lc_compliance_enabled = false\n> > >      subdir_done()\n> > >  endif\n> > >\n> > >  lc_compliance_enabled = true\n> > >\n> > > +libevent = dependency('libevent_pthreads', required : true)\n> > > +\n> > > +if get_option('android_platform') == 'cros'\n> > > +   libgtest = dependency('gtest', required : true)\n> > > +else\n> > > +   libgtest_sp = subproject('gtest')\n> > > +   libgtest = libgtest_sp.get_variable('gtest_dep')\n> > > +endif\n> > > +\n> > >  lc_compliance_sources = files([\n> > >      '../cam/event_loop.cpp',\n> > >      '../cam/options.cpp',\n> > > diff --git a/subprojects/.gitignore b/subprojects/.gitignore\n> > > index 410b8bd6..82ef2c83 100644\n> > > --- a/subprojects/.gitignore\n> > > +++ b/subprojects/.gitignore\n> > > @@ -1 +1,3 @@\n> > > -/libyuv\n> > > \\ No newline at end of file\n> > > +/libyuv\n> > > +/googletest-release*\n> > > +/packagecache\n> >\n> > What's packagecache and why is added here now ?\n> >\n\n\nThe packages are cached in the directory.\n$ ls subprojects/packagecache/\ngtest_1.11.0-1_patch.zip  gtest-1.11.0.zip\n\nIf I understand the meson doc correctly [1], meson checks if a package\nis downloaded or not by seeing source_filename/patch_filename and\ncomparing the computed hash with source_hash/patch_hash.\nDefinitely, we would not like to put it in git history. So we should\nadd packagecache to .gitignore.\n\n[1] https://mesonbuild.com/Wrap-dependency-system-manual.html#accepted-configuration-properties-for-wraps\n> > > \\ No newline at end of file\n> > > diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap\n> > > new file mode 100644\n> > > index 00000000..8513793f\n> > > --- /dev/null\n> > > +++ b/subprojects/gtest.wrap\n> > > @@ -0,0 +1,15 @@\n> > > +[wrap-file]\n> > > +directory = googletest-release-1.11.0\n> > > +source_url = https://github.com/google/googletest/archive/release-1.11.0.zip\n> > > +source_filename = gtest-1.11.0.zip\n> > > +source_hash = 353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a\n> > > +patch_filename = gtest_1.11.0-1_patch.zip\n> > > +patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.11.0-1/get_patch\n> > > +patch_hash = d38c39184384608b08419be52aed1d0f9d9d1b5ed71c0c35e51cccbdddab7084\n> > > +\n> > > +[provide]\n> > > +gtest = gtest_dep\n> > > +gtest_main = gtest_main_dep\n> > > +gmock = gmock_dep\n> > > +gmock_main = gmock_main_dep\n> > > +\n> >\n> > I get a complaint when applying the patch\n> >\n> > .git/rebase-apply/patch:82: new blank line at EOF.\n> > +\n> > warning: 1 line adds whitespace errors.\n> >\n\nI downloaded this wrap file by `meson wrap install gtest`.\nIt is interesting it has the redundant empty line.\nRemoved the line.\n\nThanks,\n-Hiro\n> > The change fixes building on older platforms where indeed the static\n> > library and libcamera were built with two different compilers version\n> > and we had errors at linking time. Very nice!\n> >\n> > Tested-by: Jacopo Mondi <jacopo@jmondi.org>\n>\n> I think this will fix things for me too, so I'm looking forward to\n> seeing it merged.\n>\n> Thanks.\n>\n> Kieran\n>\n>\n> >\n> > Thanks\n> >    j\n> >\n> > > --\n> > > 2.34.0.rc0.344.g81b53c2807-goog\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 98505BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Nov 2021 05:31:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A27676035D;\n\tTue,  9 Nov 2021 06:31:58 +0100 (CET)","from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com\n\t[IPv6:2a00:1450:4864:20::52a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4D5760121\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Nov 2021 06:31:56 +0100 (CET)","by mail-ed1-x52a.google.com with SMTP id m14so71330229edd.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 08 Nov 2021 21:31:56 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"JiwyBTOf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=Py+hxFgWno6OAsC+IeSv8ZGrdRDjko1wTkiBySgwWao=;\n\tb=JiwyBTOfiWQPrpO0v5lEw7I/414qw74wa3toZL2TUy2The1VVgtaUNO9Oxe4/XZsYN\n\tZxjtQQvh5fvJzM6F40KdFak+nqLhctdIMVrYJqbBJCsZke/H4NeTrdjjaURcD5MFFnhT\n\to7PIXVpT5vIsRGbRVBytAJ/Km//wkv9ecyv1g=","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;\n\tbh=Py+hxFgWno6OAsC+IeSv8ZGrdRDjko1wTkiBySgwWao=;\n\tb=Zo/GTKP2M6la1gXD/M5o/3z8R0a2AG1ZmrDEa65lpU36dJNCPPPzzpNqbvQYPhmjpr\n\t2/ds0vMceTFzOxpRPle/k02RWx9tW5wpoDKQU1PlZxaN8eKmq/NlXgZr3U6m3C7n9XzM\n\tgqs0NLnHn3j7Sw2d8AihdOBYKmF8napPQb4nHYhQU8re6xuO7KLji9PmmWEWTiNWzSAK\n\ttJjt29w4loLPTEv2L+6nFeHPhKoyHFQlRxByH7WydOBLsFoE2nDXjH3TkGSlsgKupDFm\n\t//o+W715Ne/hsxNTta4bJAlmGrOOLgPUVCxAL1YdjknQ+IPJ0l/+l9CYNsdiu/FHgalV\n\tsKJQ==","X-Gm-Message-State":"AOAM531oh77x2jduT3UbNzhs++73VNG04pL4trgAbp1oSbRWOtsCtoZA\n\t5VH4rSB0FMpN161fA3rAZC4sfrRTlWHVDZ1CoUsgAg==","X-Google-Smtp-Source":"ABdhPJxKkIdv2svAf+pgyS844OxcqZW0SrqXe3betrYDeixTWIs1eL/Z3uPe1cx+Kw8kPBseu8ilhz8c0AroGwbyY4U=","X-Received":"by 2002:a05:6402:4404:: with SMTP id\n\ty4mr6434884eda.354.1636435916262; \n\tMon, 08 Nov 2021 21:31:56 -0800 (PST)","MIME-Version":"1.0","References":"<20211108060135.370781-1-hiroh@chromium.org>\n\t<20211108084358.wktow32uhld2gg7g@uno.localdomain>\n\t<163636865519.287435.14376883702208068658@Monstersaurus>","In-Reply-To":"<163636865519.287435.14376883702208068658@Monstersaurus>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Tue, 9 Nov 2021 14:31:45 +0900","Message-ID":"<CAO5uPHNTWRmGN4gYHgeYNQv9f7AGSQ_Cq00vuFMZAV6KW-Pc=w@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] lc-compliance: Build with googltest\n\tin subproject","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>"}}]