[libcamera-devel] README: Add 'ldconfig' note
diff mbox series

Message ID 20230523112530.2837538-1-kieran.bingham@ideasonboard.com
State New
Headers show
Series
  • [libcamera-devel] README: Add 'ldconfig' note
Related show

Commit Message

Kieran Bingham May 23, 2023, 11:25 a.m. UTC
Provide an update in the README.rst to reflect that a first install may
require a manual call to 'ldconfig' as the root user.

Meson install does not do this.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 README.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Jacopo Mondi May 24, 2023, 12:50 p.m. UTC | #1
Hi Kieran

On Tue, May 23, 2023 at 12:25:30PM +0100, Kieran Bingham via libcamera-devel wrote:
> Provide an update in the README.rst to reflect that a first install may
> require a manual call to 'ldconfig' as the root user.
>
> Meson install does not do this.
>

Nothing specific about libcamera here, but I guess it doesn't hurt

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  README.rst | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/README.rst b/README.rst
> index 34b6b49f3575..48629280a936 100644
> --- a/README.rst
> +++ b/README.rst
> @@ -37,6 +37,24 @@ To fetch the sources, build and install:
>    meson setup build
>    ninja -C build install
>
> +
> +First run
> +~~~~~~~~~
> +
> +For a first install, or an install with a newer library version the linker
> +configuration may need to be updated. If you experience any error such as :
> +
> +::
> +
> +   cam: error while loading shared libraries: libcamera.so.0.0.4: cannot open shared object file: No such file or directory
> +
> +please run:
> +
> +::
> +
> +  sudo ldconfig
> +
> +
>  Dependencies
>  ~~~~~~~~~~~~
>
> --
> 2.34.1
>
Laurent Pinchart May 24, 2023, 1:03 p.m. UTC | #2
On Wed, May 24, 2023 at 02:50:53PM +0200, Jacopo Mondi via libcamera-devel wrote:
> Hi Kieran
> 
> On Tue, May 23, 2023 at 12:25:30PM +0100, Kieran Bingham via libcamera-devel wrote:
> > Provide an update in the README.rst to reflect that a first install may
> > require a manual call to 'ldconfig' as the root user.
> >
> > Meson install does not do this.
> 
> Nothing specific about libcamera here, but I guess it doesn't hurt
> 
> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> 
> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > ---
> >  README.rst | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/README.rst b/README.rst
> > index 34b6b49f3575..48629280a936 100644
> > --- a/README.rst
> > +++ b/README.rst
> > @@ -37,6 +37,24 @@ To fetch the sources, build and install:
> >    meson setup build
> >    ninja -C build install
> >
> > +
> > +First run
> > +~~~~~~~~~
> > +
> > +For a first install, or an install with a newer library version the linker
> > +configuration may need to be updated. If you experience any error such as :

Extra space before colon.

> > +
> > +::
> > +
> > +   cam: error while loading shared libraries: libcamera.so.0.0.4: cannot open shared object file: No such file or directory
> > +
> > +please run:
> > +
> > +::
> > +
> > +  sudo ldconfig

As Jacopo said, this isn't specific to libcamera, but I suppose it
doesn't hurt. I hope the next step won't be to document how to add a
custom directory to /etc/ld.so.conf, as your README.rst shouldn't become
a Linux 101 tutorial :-)

> > +
> > +
> >  Dependencies
> >  ~~~~~~~~~~~~
> >
Kieran Bingham May 24, 2023, 2:16 p.m. UTC | #3
Quoting Laurent Pinchart (2023-05-24 14:03:24)
> On Wed, May 24, 2023 at 02:50:53PM +0200, Jacopo Mondi via libcamera-devel wrote:
> > Hi Kieran
> > 
> > On Tue, May 23, 2023 at 12:25:30PM +0100, Kieran Bingham via libcamera-devel wrote:
> > > Provide an update in the README.rst to reflect that a first install may
> > > require a manual call to 'ldconfig' as the root user.
> > >
> > > Meson install does not do this.
> > 
> > Nothing specific about libcamera here, but I guess it doesn't hurt
> > 
> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> > 
> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > > ---
> > >  README.rst | 18 ++++++++++++++++++
> > >  1 file changed, 18 insertions(+)
> > >
> > > diff --git a/README.rst b/README.rst
> > > index 34b6b49f3575..48629280a936 100644
> > > --- a/README.rst
> > > +++ b/README.rst
> > > @@ -37,6 +37,24 @@ To fetch the sources, build and install:
> > >    meson setup build
> > >    ninja -C build install
> > >
> > > +
> > > +First run
> > > +~~~~~~~~~
> > > +
> > > +For a first install, or an install with a newer library version the linker
> > > +configuration may need to be updated. If you experience any error such as :
> 
> Extra space before colon.
> 
> > > +
> > > +::
> > > +
> > > +   cam: error while loading shared libraries: libcamera.so.0.0.4: cannot open shared object file: No such file or directory
> > > +
> > > +please run:
> > > +
> > > +::
> > > +
> > > +  sudo ldconfig
> 
> As Jacopo said, this isn't specific to libcamera, but I suppose it
> doesn't hurt. I hope the next step won't be to document how to add a
> custom directory to /etc/ld.so.conf, as your README.rst shouldn't become
> a Linux 101 tutorial :-)

Sure but then you could say why do we bother documenting how to run
'meson' and 'ninja' ... It *is* specific to /running/ libcamera.

The reason for this is because users are confused [0]. For a while it
was required, then meson handled it ... now it doesn't anymore.

I'd put a:

Suggested-by: Brad Morgan <>

But I don't have a full address

[0] https://github.com/kbingham/libcamera/issues/70

> 
> > > +
> > > +
> > >  Dependencies
> > >  ~~~~~~~~~~~~
> > >
> 
> -- 
> Regards,
> 
> Laurent Pinchart
Laurent Pinchart May 24, 2023, 2:33 p.m. UTC | #4
On Wed, May 24, 2023 at 03:16:42PM +0100, Kieran Bingham wrote:
> Quoting Laurent Pinchart (2023-05-24 14:03:24)
> > On Wed, May 24, 2023 at 02:50:53PM +0200, Jacopo Mondi via libcamera-devel wrote:
> > > On Tue, May 23, 2023 at 12:25:30PM +0100, Kieran Bingham via libcamera-devel wrote:
> > > > Provide an update in the README.rst to reflect that a first install may
> > > > require a manual call to 'ldconfig' as the root user.
> > > >
> > > > Meson install does not do this.
> > > 
> > > Nothing specific about libcamera here, but I guess it doesn't hurt
> > > 
> > > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> > > 
> > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > > > ---
> > > >  README.rst | 18 ++++++++++++++++++
> > > >  1 file changed, 18 insertions(+)
> > > >
> > > > diff --git a/README.rst b/README.rst
> > > > index 34b6b49f3575..48629280a936 100644
> > > > --- a/README.rst
> > > > +++ b/README.rst
> > > > @@ -37,6 +37,24 @@ To fetch the sources, build and install:
> > > >    meson setup build
> > > >    ninja -C build install
> > > >
> > > > +
> > > > +First run
> > > > +~~~~~~~~~
> > > > +
> > > > +For a first install, or an install with a newer library version the linker
> > > > +configuration may need to be updated. If you experience any error such as :
> > 
> > Extra space before colon.
> > 
> > > > +
> > > > +::
> > > > +
> > > > +   cam: error while loading shared libraries: libcamera.so.0.0.4: cannot open shared object file: No such file or directory
> > > > +
> > > > +please run:
> > > > +
> > > > +::
> > > > +
> > > > +  sudo ldconfig
> > 
> > As Jacopo said, this isn't specific to libcamera, but I suppose it
> > doesn't hurt. I hope the next step won't be to document how to add a
> > custom directory to /etc/ld.so.conf, as your README.rst shouldn't become
> > a Linux 101 tutorial :-)
> 
> Sure but then you could say why do we bother documenting how to run
> 'meson' and 'ninja' ... It *is* specific to /running/ libcamera.
> 
> The reason for this is because users are confused [0]. For a while it
> was required, then meson handled it ... now it doesn't anymore.
> 
> I'd put a:
> 
> Suggested-by: Brad Morgan <>
> 
> But I don't have a full address
> 
> [0] https://github.com/kbingham/libcamera/issues/70

Maybe we'll need a FAQ at some point to answer miscellaneous questions,
to ensure the README.rst won't grow out of control.

> > > > +
> > > > +
> > > >  Dependencies
> > > >  ~~~~~~~~~~~~
> > > >
Kieran Bingham Sept. 17, 2023, 1:50 p.m. UTC | #5
Quoting Laurent Pinchart (2023-05-24 15:33:43)
> On Wed, May 24, 2023 at 03:16:42PM +0100, Kieran Bingham wrote:
> > Quoting Laurent Pinchart (2023-05-24 14:03:24)
> > > On Wed, May 24, 2023 at 02:50:53PM +0200, Jacopo Mondi via libcamera-devel wrote:
> > > > On Tue, May 23, 2023 at 12:25:30PM +0100, Kieran Bingham via libcamera-devel wrote:
> > > > > Provide an update in the README.rst to reflect that a first install may
> > > > > require a manual call to 'ldconfig' as the root user.
> > > > >
> > > > > Meson install does not do this.
> > > > 
> > > > Nothing specific about libcamera here, but I guess it doesn't hurt
> > > > 
> > > > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> > > > 
> > > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > > > > ---
> > > > >  README.rst | 18 ++++++++++++++++++
> > > > >  1 file changed, 18 insertions(+)
> > > > >
> > > > > diff --git a/README.rst b/README.rst
> > > > > index 34b6b49f3575..48629280a936 100644
> > > > > --- a/README.rst
> > > > > +++ b/README.rst
> > > > > @@ -37,6 +37,24 @@ To fetch the sources, build and install:
> > > > >    meson setup build
> > > > >    ninja -C build install
> > > > >
> > > > > +
> > > > > +First run
> > > > > +~~~~~~~~~
> > > > > +
> > > > > +For a first install, or an install with a newer library version the linker
> > > > > +configuration may need to be updated. If you experience any error such as :
> > > 
> > > Extra space before colon.
> > > 
> > > > > +
> > > > > +::
> > > > > +
> > > > > +   cam: error while loading shared libraries: libcamera.so.0.0.4: cannot open shared object file: No such file or directory
> > > > > +
> > > > > +please run:
> > > > > +
> > > > > +::
> > > > > +
> > > > > +  sudo ldconfig
> > > 
> > > As Jacopo said, this isn't specific to libcamera, but I suppose it
> > > doesn't hurt. I hope the next step won't be to document how to add a
> > > custom directory to /etc/ld.so.conf, as your README.rst shouldn't become
> > > a Linux 101 tutorial :-)
> > 
> > Sure but then you could say why do we bother documenting how to run
> > 'meson' and 'ninja' ... It *is* specific to /running/ libcamera.
> > 
> > The reason for this is because users are confused [0]. For a while it
> > was required, then meson handled it ... now it doesn't anymore.
> > 
> > I'd put a:
> > 
> > Suggested-by: Brad Morgan <>
> > 
> > But I don't have a full address
> > 
> > [0] https://github.com/kbingham/libcamera/issues/70
> 
> Maybe we'll need a FAQ at some point to answer miscellaneous questions,
> to ensure the README.rst won't grow out of control.

I interpret your lack of positivity in this review as a nack.

But as you've seen - this is turning into a frequently asked question.

We have an FAQ on libcamera.org - but I don't think this is an
appropriate place for that. The issue occurs when following the
instructions we provide for installation from source.

I believe it would be better to fully document all the steps required to
be able to install /and use/ from source. (i.e. merge this patch)

--
Kieran

> 
> > > > > +
> > > > > +
> > > > >  Dependencies
> > > > >  ~~~~~~~~~~~~
> > > > >
> 
> -- 
> Regards,
> 
> Laurent Pinchart
Laurent Pinchart Sept. 17, 2023, 3:41 p.m. UTC | #6
Hi Kieran,

On Sun, Sep 17, 2023 at 02:50:19PM +0100, Kieran Bingham wrote:
> Quoting Laurent Pinchart (2023-05-24 15:33:43)
> > On Wed, May 24, 2023 at 03:16:42PM +0100, Kieran Bingham wrote:
> > > Quoting Laurent Pinchart (2023-05-24 14:03:24)
> > > > On Wed, May 24, 2023 at 02:50:53PM +0200, Jacopo Mondi via libcamera-devel wrote:
> > > > > On Tue, May 23, 2023 at 12:25:30PM +0100, Kieran Bingham via libcamera-devel wrote:
> > > > > > Provide an update in the README.rst to reflect that a first install may
> > > > > > require a manual call to 'ldconfig' as the root user.
> > > > > >
> > > > > > Meson install does not do this.
> > > > > 
> > > > > Nothing specific about libcamera here, but I guess it doesn't hurt
> > > > > 
> > > > > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> > > > > 
> > > > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > > > > > ---
> > > > > >  README.rst | 18 ++++++++++++++++++
> > > > > >  1 file changed, 18 insertions(+)
> > > > > >
> > > > > > diff --git a/README.rst b/README.rst
> > > > > > index 34b6b49f3575..48629280a936 100644
> > > > > > --- a/README.rst
> > > > > > +++ b/README.rst
> > > > > > @@ -37,6 +37,24 @@ To fetch the sources, build and install:
> > > > > >    meson setup build
> > > > > >    ninja -C build install
> > > > > >
> > > > > > +
> > > > > > +First run
> > > > > > +~~~~~~~~~
> > > > > > +
> > > > > > +For a first install, or an install with a newer library version the linker
> > > > > > +configuration may need to be updated. If you experience any error such as :
> > > > 
> > > > Extra space before colon.
> > > > 
> > > > > > +
> > > > > > +::
> > > > > > +
> > > > > > +   cam: error while loading shared libraries: libcamera.so.0.0.4: cannot open shared object file: No such file or directory
> > > > > > +
> > > > > > +please run:
> > > > > > +
> > > > > > +::
> > > > > > +
> > > > > > +  sudo ldconfig
> > > > 
> > > > As Jacopo said, this isn't specific to libcamera, but I suppose it
> > > > doesn't hurt. I hope the next step won't be to document how to add a
> > > > custom directory to /etc/ld.so.conf, as your README.rst shouldn't become
> > > > a Linux 101 tutorial :-)
> > > 
> > > Sure but then you could say why do we bother documenting how to run
> > > 'meson' and 'ninja' ... It *is* specific to /running/ libcamera.
> > > 
> > > The reason for this is because users are confused [0]. For a while it
> > > was required, then meson handled it ... now it doesn't anymore.
> > > 
> > > I'd put a:
> > > 
> > > Suggested-by: Brad Morgan <>
> > > 
> > > But I don't have a full address
> > > 
> > > [0] https://github.com/kbingham/libcamera/issues/70
> > 
> > Maybe we'll need a FAQ at some point to answer miscellaneous questions,
> > to ensure the README.rst won't grow out of control.
> 
> I interpret your lack of positivity in this review as a nack.
> 
> But as you've seen - this is turning into a frequently asked question.

I assume you're referring to
https://bugs.libcamera.org/show_bug.cgi?id=200. The latest comment in
that bug report indicates that ldconfig didn't help.

> We have an FAQ on libcamera.org - but I don't think this is an
> appropriate place for that. The issue occurs when following the
> instructions we provide for installation from source.
> 
> I believe it would be better to fully document all the steps required to
> be able to install /and use/ from source. (i.e. merge this patch)

I'm not opposed to merging this, but you're right that I'm not thrilled
to turn README.rst into a Linux 101 tutorial.

Let's first figure out what the issue in bug #200 is.

> > > > > > +
> > > > > > +
> > > > > >  Dependencies
> > > > > >  ~~~~~~~~~~~~
> > > > > >

Patch
diff mbox series

diff --git a/README.rst b/README.rst
index 34b6b49f3575..48629280a936 100644
--- a/README.rst
+++ b/README.rst
@@ -37,6 +37,24 @@  To fetch the sources, build and install:
   meson setup build
   ninja -C build install
 
+
+First run
+~~~~~~~~~
+
+For a first install, or an install with a newer library version the linker
+configuration may need to be updated. If you experience any error such as :
+
+::
+
+   cam: error while loading shared libraries: libcamera.so.0.0.4: cannot open shared object file: No such file or directory
+
+please run:
+
+::
+
+  sudo ldconfig
+
+
 Dependencies
 ~~~~~~~~~~~~