[Buildroot] [PATCH 1/1] package/libcamera: disable compliance tool

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Oct 21 16:30:31 UTC 2021


Quoting Fabrice Fontaine (2021-10-21 17:05:51)
> Hi Kieran,
> 
> Le jeu. 21 oct. 2021 à 11:22, Kieran Bingham
> <kieran.bingham at ideasonboard.com> a écrit :
> >
> > Hi Fabrice,
> >
> > Quoting Fabrice Fontaine (2021-10-20 20:04:23)
> > > Disable compliance tool to fix the following build failure
> > > raised since commit e1d37ab0a7b2b8735e69c070519978d2898d2e79 and
> > > https://git.linuxtv.org/libcamera.git/commit/?id=02bc1108578e8b8eb68fa7d9ae3eeea558723931:
> > >
> > > /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lgtest
> > >
> > > Fixes:
> > >  - http://autobuild.buildroot.org/results/e1bb8aa1de310f3d27b74ec7d8748d170ad444e2
> > >
> >
> > Any idea why we're failing to find gtest?
> Nope, I didn't take time to find out why this is failing as I think
> that lc-compliance is just not needed in the context of buildroot (as
> gtest is not installed on target).
> >
> > Our meson.build for src/lc-compliance contains the following:
> >
> > """
> > # SPDX-License-Identifier: CC0-1.0
> >
> > libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))
> > libgtest = dependency('gtest', required : get_option('lc-compliance'))
> >
> > if not (libevent.found() and libgtest.found())
> >     lc_compliance_enabled = false
> >     subdir_done()
> > endif
> >
> > lc_compliance_enabled = true
> > """
> >
> > Which implies that libgtest was found during the configuration phase,
> > but not during the linking phase....
> >
> > Is libgtest built as part of this build configuration? If it is - I'd
> > expect lc-compliance to get built against it. If not - then it would
> > automatically be disabled by our build...
> Yes, it is built and found by meson otherwise lc-compliance won't be
> built but for an unknown reason, the link step fails.

You've mentioned above that gtest won't be installed on the target... So
.. I would expect that means it isn't in the target sysroot, and can't
be linked against.

So it seems that for some reason meson finds a host package instead of a
target package?

Do we have a way to differentiate these in buildroot?

I'm not sure if there's some buildroot wizardry that would make
libcamera's configure phase see only the packages that are installed on
the target when being built, but if buildroot doesn't support installing
gtest at all - then indeed there isn't any point supporting
lc-compliance which requires it.


> >
> >
> > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> > > ---
> > >  package/libcamera/libcamera.mk | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/package/libcamera/libcamera.mk b/package/libcamera/libcamera.mk
> > > index 8ab95fb42a..638c9ac553 100644
> > > --- a/package/libcamera/libcamera.mk
> > > +++ b/package/libcamera/libcamera.mk
> > > @@ -17,6 +17,7 @@ LIBCAMERA_DEPENDENCIES = \
> > >  LIBCAMERA_CONF_OPTS = \
> > >         -Dandroid=disabled \
> > >         -Ddocumentation=disabled \
> > > +       -Dlc-compliance=disabled \
> > >         -Dtest=false \
> > >         -Dwerror=false
> > >  LIBCAMERA_INSTALL_STAGING = YES
> > > --
> > > 2.33.0
> > >
> Best Regards,
> 
> Fabrice


More information about the buildroot mailing list