kbingham / libcamera

libcamera - Making complex cameras easy. This is a personal fork, please use the upstream repository at https://git.libcamera.org/libcamera/libcamera.git/
https://libcamera.org
Other
173 stars 69 forks source link

A fresh install needs to run ldconfig manually #17

Closed kbingham closed 2 years ago

kbingham commented 4 years ago

It would seem that installing libcamera from clean requires a manual invocation of ldconfig to update the ld paths. I'd expect this to be handled by the install phase, so perhaps something is missing.

benbaker76 commented 3 years ago

I was getting the following error when running cam --list: cam: error while loading shared libraries: libcamera-base.so.0: cannot open shared object file: No such file or directory

I then ran ldconfig which gave me an error: /sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied

So I ran sudo ldconfig then re-compiled and installed libcamera and this time cam --list ran as expected.

kbingham commented 3 years ago

You don't need to recompile after running sudo ldconfig.

The issue is that on first install the libraries get put in to your system and the linker needs to be update. When you install a package using something like apt or such the package manager does this for you, but meson doesn't.

Unless perhaps we can add a post install hook maybe...

kbingham commented 2 years ago

This should all be resolved by:

https://github.com/mesonbuild/meson/issues/4737

mfreeborn commented 1 year ago

Just to say, I stumbled across this issue today on my desktop computer, but also on github CI: https://github.com/lit-robotics/libcamera-rs/pull/12

kbingham commented 1 year ago

So https://github.com/mesonbuild/meson/issues/9721 brought this back in. The answer is simply to manually run sudo ldconfig when required as I understand it.