[libcamera-devel] [PATCH] Add alternative meson install command

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Mar 24 03:04:17 CET 2021


Hello,

On Tue, Mar 23, 2021 at 06:13:29AM +0100, Sebastian Fricke wrote:
> Hey Verdant & Nicolas,
> 
> On 22.03.2021 15:22, Nicolas Dufresne wrote:
> > Le lundi 22 mars 2021 à 15:35 +0530, Vedant Paranjape a écrit :
> >>  Changelog:
> >> 
> >>  * Updated README.rst to describ meson install issue
> >> 
> >>  While installing meson using pip3 install --user meson, due to python path
> >>  issues, build.ninja can't be located by ninja.
> >>  It gives the following error on ninja -C build install:
> > 
> > This is very vague. I was told on IRC that the error you have hit is when you
> > used "meson install" in order to install libcamera system wide. This this
> > context it can fail in two ways:
> > 
> > 1) policy kit removes some of your environment which cause the local python
> > module to be lost, and then system meson endup being used
> > 2) sudo does not respect your user path, which is likely set in .bashrc, hence
> > the environment is lost, and you endup using your system meson
> > 
> > Perhaps what you want to do is to add a "Trouble Shooting" section, and have
> 
> I like this idea, I believe that the installation section should be as
> small as possible and centered around the general use-case (where
> everything works as described). If we add to many special cases into
> that section, then it will become unreadable. A "Trouble Shooting"
> section would work like a little FAQ, which would probably reduce the
> amount of newbie questions focused around the installation.

Note that we have https://libcamera.org/faq.html, but it may not be the
best place for such detailed information.

One option could also be to create an issue on bugs.libcamera.org, add
all the relevant information there, and link to it (I'm not sure if it's
the best option though).

> > more precise explanation on which feature may wait and what workaround may be
> > used. This is in my opinion a very niche use case. It's also not something I
> > would recommend to use as development work-flow. libcamera source code is
> > designed to be run in-place for development purpose, and installing should be
> > used to make packages or your distribution instead.
> > 
> >> 
> >>  ninja: Entering directory `build'
> >>  ninja: error: loading 'build.ninja': No such file or directory
> >> 
> >>  After uninstalling meson and installing it without --user argument solved the
> >>  issue.
> >> 
> >>  Signed-off-by: Vedant Paranjape <vedantparanjape160201 at gmail.com>
> >>  ---
> >>   README.rst | 7 +++++++
> >>   1 file changed, 7 insertions(+)
> >> 
> >>  diff --git a/README.rst b/README.rst
> >>  index 1427c714..b86bcc1d 100644
> >>  --- a/README.rst
> >>  +++ b/README.rst
> >>  @@ -37,6 +37,13 @@ To fetch the sources, build and install:
> >>     meson build
> >>     ninja -C build install
> >>   
> >>  +Several users have reported issues with meson installation, crux of the issue
> >>  is a potential version
> >>  +mismatch between the version that is installed in root, and version that the
> >>  normal user
> >>  +uses. On calling meson, it can't find the build.ninja module. This can be
> >>  solved by two ways:
> >>  +
> >>  +1) Don't install meson again if it is already installed system-wide
> >>  +2) If you still went ahead and installed, uninstall meson using pip, and
> >>  install again without --user argument
> >>  +
> >>   Dependencies
> >>   ~~~~~~~~~~~~
> >>   

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list