[libcamera-devel] ninja build breaks out of venv

Brian Olson icic at bolson.org
Mon Dec 6 18:58:58 CET 2021


Kieran,
Looks good, thanks for shepherding that in.
/Brian

On Mon, Dec 6, 2021 at 10:22 AM Kieran Bingham <
kieran.bingham at ideasonboard.com> wrote:

> Hi Brian,
>
> Quoting Brian Olson (2021-12-06 14:52:28)
> > Found it, in short:
> > chmod +x ./utils/tracepoints/gen-tp-header.py
>
> Oh, that not what I was expecting, but good find.
>
> > It looks like other python build steps already have +x and the right
> things
> > happen, but this one was missed and the build system cleverly runs it
> under
> > python (but the wrong one).
> >
> > Patch attached, or it's probably easier for someone with committer to
> just
> > run that chmod line.
>
> Can I add the following to the commit that does that?
>
> utils: tracepoints: gen-tp-header: Add execute permission
>
> The gen-tp-header script does not have execute permissions set on the
> file.
>
> Add the execute permission to ensure that meson runs this script
> consistently in the same configuration as other scripts, without
> invoking python itself separately.
>
> Signed-off-by: Brian Olson <icic at bolson.org>
>
>
> to that?
>
>
> > On Sun, Dec 5, 2021 at 8:05 AM Brian Olson <icic at bolson.org> wrote:
> >
> > > $ ninja -C build install
> > > ...
> > > /usr/bin/python3
> > > /blah/blah/blah/libcamera/utils/tracepoints/./gen-tp-header.py ...
> > > Traceback (most recent call last):
> > >   File
> "/blah/blah/blah/libcamera/utils/tracepoints/./gen-tp-header.py",
> > > line 10, in <module>
> > >     import jinja2
> > > ModuleNotFoundError: No module named 'jinja2'
> > >
> > > Yeah, I don't have it installed at the root level, but I have jinja2
> > > installed in the venv I was running ninja from. I don't know how to say
> > > "use this python3" other than putting it in the PATH, which it was, but
> > > ninja ignored that and went with /usr/bin/python3, and that failed.
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20211206/db2b4d26/attachment.htm>


More information about the libcamera-devel mailing list