[libcamera-devel,v7] Add alternative meson install command
diff mbox series

Message ID 20210330143923.9664-1-vedantparanjape160201@gmail.com
State Superseded
Headers show
Series
  • [libcamera-devel,v7] Add alternative meson install command
Related show

Commit Message

Vedant Paranjape March 30, 2021, 2:39 p.m. UTC
While installing meson using pip3 install --user meson, due to python
path issues, build.ninja can't be located by ninja. meson generates
ninja files fine, but then when you run ninja, it is unable to find
meson's build.ninja python module due to path issues.
It gives the following error on ninja -C build install:

ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory

After uninstalling meson using pip3 and installing it again using pip
without --user argument solved the issue.

Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
---
Changes in v7:
* Updated README.rst to describe meson install issue
* Removed "changelog" heading from commit message
* Fixed few grammatical mistakes
* Reworded few sentences
* Added a new troubleshooting section in readme, and shifted meson issue 
to that section
* Fixed line width issues and some grammatical mistakes

 README.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Paul Elder March 31, 2021, 2:13 a.m. UTC | #1
Hi Vedant,

On Tue, Mar 30, 2021 at 08:09:23PM +0530, Vedant Paranjape wrote:
> While installing meson using pip3 install --user meson, due to python
> path issues, build.ninja can't be located by ninja. meson generates
> ninja files fine, but then when you run ninja, it is unable to find
> meson's build.ninja python module due to path issues.
> It gives the following error on ninja -C build install:
> 
> ninja: Entering directory `build'
> ninja: error: loading 'build.ninja': No such file or directory
> 
> After uninstalling meson using pip3 and installing it again using pip
> without --user argument solved the issue.
> 
> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
> ---
> Changes in v7:
> * Updated README.rst to describe meson install issue
> * Removed "changelog" heading from commit message
> * Fixed few grammatical mistakes
> * Reworded few sentences
> * Added a new troubleshooting section in readme, and shifted meson issue 
> to that section
> * Fixed line width issues and some grammatical mistakes
> 
>  README.rst | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/README.rst b/README.rst
> index 1427c714..d46109c8 100644
> --- a/README.rst
> +++ b/README.rst
> @@ -104,3 +104,31 @@ onto the default video display element on your system.
>    gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! videoconvert ! autovideosink
>  
>  .. section-end-getting-started
> +
> +Troubleshooting
> +~~~~~~~~~~~~~~~
> +
> +Several users have reported issues with meson installation, crux of the issue
> +is a potential version mismatch between the version that root uses, and the
> +version that the normal user uses. On calling `ninja -C build`, it can't find
> +the build.ninja module. This the snippet of error message,

s/This the snippet of error message,/This is a snippet of the error message:/

> +
> +:: 
> +
> +  ninja: Entering directory `build'     
> +  ninja: error: loading 'build.ninja': No such file or directory
> +
> +This can be solved in two ways: 
> +
> +1) Don't install meson again if it is already installed system-wide. 2) If a

2) should be on a new line.

> +version of meson which is different from the system-wide version is already
> +installed, uninstall that meson using pip3, and install again without the
> +--user argument.
> +
> +Solution to this was installing meson as root, this is not ideal, and should be
> +done as a last resort

You already provide a solution above, so what is this a solution to?

I'm not sure this (and the below) section is necessary.

> +
> +::
> +
> +  sudo pip3 install meson
> +
> -- 
> 2.25.1

Almost there!


Paul

Patch
diff mbox series

diff --git a/README.rst b/README.rst
index 1427c714..d46109c8 100644
--- a/README.rst
+++ b/README.rst
@@ -104,3 +104,31 @@  onto the default video display element on your system.
   gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! videoconvert ! autovideosink
 
 .. section-end-getting-started
+
+Troubleshooting
+~~~~~~~~~~~~~~~
+
+Several users have reported issues with meson installation, crux of the issue
+is a potential version mismatch between the version that root uses, and the
+version that the normal user uses. On calling `ninja -C build`, it can't find
+the build.ninja module. This the snippet of error message,
+
+:: 
+
+  ninja: Entering directory `build'     
+  ninja: error: loading 'build.ninja': No such file or directory
+
+This can be solved in two ways: 
+
+1) Don't install meson again if it is already installed system-wide. 2) If a
+version of meson which is different from the system-wide version is already
+installed, uninstall that meson using pip3, and install again without the
+--user argument.
+
+Solution to this was installing meson as root, this is not ideal, and should be
+done as a last resort
+
+::
+
+  sudo pip3 install meson
+