Git Product home page Git Product logo

Comments (17)

naushir avatar naushir commented on June 5, 2024 1

In which case, I expect it's a problem with your build environment. Specifically, you need to install the following packages:

sudo apt install -y libgnutls28-dev openssl

then redo the meson configure to ensure your IPA is not running in isolated mode.

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024 1

@kbingham our devops team had added customised post_package hooks which stripped the debug information from binaries. Without the customised hooks everything should work fine. Now we have modified the customised post_package hooks to check for presence of .pem and .sign files and if those exist, we re-sign the stripped binaries.
This was the fix we made:
https://gitlab.com/aivero/open-source/conan-config/-/commit/77043e1e900b32146607730515f74bdcec8a7209

from libcamera.

naushir avatar naushir commented on June 5, 2024

Just to confirm, you are using Ubuntu 22.04 OS environment? If so, you will have to get in touch with the Ubuntu support team to help with this. They package libcamera separately from what we do for Raspberry Pi OS.

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024

hi @naushir , thanks for your quick reply. I forgot to point out that I have built libcamera from source from this repo.

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024

Hi @naushir I have done some further tests

(1) The openssl was already installed, and meson was configured not to run IPA in isolated mode. But anyway I installed gnutls as well. It does not matter, as build system checks for openssl first.

(2) I am able to capture binary images with cam application. So as such libcamera installations seems ok.

(3) I have also built libcamera-apps and tested the image capture with libcamera-jpeg and video capture with libcamera-vid is ok. So, libcamera installation is ok, and libcamera-apps work ok.

(4) so problem relates to running gstreamer pipelines only. Is there any special configuration I may require to get libcamera working with gstreamer support on raspberry pi?

(5) Note that I have also built libcamera on x86 machine with gstreamer and gst-launch pipelines are working ok. Only difference I see is that on x86 machine IPA IPU3 is used.

If you can provide some suggestions I can try them out. I am running out of ideas as I am not well versed with libcamera IPA functionality. I would appreciate if you could give me some pointers to try.

If there is any other forum where this question may be more relevant. Note that the gstreamer support is working ok on x86 machine with ubuntu and it only fails on raspberry Pi ubuntu.

from libcamera.

naushir avatar naushir commented on June 5, 2024

Unfortunately my knowledge of gstreamer is mostly non-existent. I would suggest posting to the libcamera developers mailing list ([email protected]) to see if somebody there can help you.

from libcamera.

jmondi avatar jmondi commented on June 5, 2024

Hello

Hi @naushir I have done some further tests

(1) The openssl was already installed, and meson was configured not to run IPA in isolated mode. But anyway I installed gnutls as well. It does not matter, as build system checks for openssl first.

(2) I am able to capture binary images with cam application. So as such libcamera installations seems ok.

(3) I have also built libcamera-apps and tested the image capture with libcamera-jpeg and video capture with libcamera-vid is ok. So, libcamera installation is ok, and libcamera-apps work ok.

(4) so problem relates to running gstreamer pipelines only. Is there any special configuration I may require to get libcamera working with gstreamer support on raspberry pi?

Could you please re-run with LIBCAMERA_LOG_LEVELS=0 to increase the debug logs ? With additional debug could you please check if the IPA module signature verification succeeds or not ? You should be able to see:

IPA module ... signature is valid/not valid

(5) Note that I have also built libcamera on x86 machine with gstreamer and gst-launch pipelines are working ok. Only difference I see is that on x86 machine IPA IPU3 is used.

If you can provide some suggestions I can try them out. I am running out of ideas as I am not well versed with libcamera IPA functionality. I would appreciate if you could give me some pointers to try.

If there is any other forum where this question may be more relevant. Note that the gstreamer support is working ok on x86 machine with ubuntu and it only fails on raspberry Pi ubuntu.

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024

hi @jmondi
Thanks for your inputs. Signature check indeed fails.
When I run cam -l with `LIBCAMERA_LOG_LEVELS=*:DEBUG", first all signed binaries are reported

0:58:16.467801343] [7881] DEBUG IPAModule ipa_module.cpp:329 ipa_rkisp1.so: IPA module /home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_rkisp1.so is signed
[0:58:16.469146747] [7881] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_rkisp1.so'
[0:58:16.470087583] [7881] DEBUG IPAModule ipa_module.cpp:329 ipa_rpi.so: IPA module /home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_rpi.so is signed
[0:58:16.470749752] [7881] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_rpi.so'
[0:58:16.472083788] [7881] DEBUG IPAModule ipa_module.cpp:329 ipa_vimc.so: IPA module /home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_vimc.so is signed
[0:58:16.472793727] [7881] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_vimc.so'

but later the signature is reported to be not valid

[0:58:16.505046754] [7882] DEBUG IPAManager ipa_manager.cpp:303 IPA module /home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_rpi.so signature is not valid
[0:58:16.505308454] [7882] DEBUG IPAProxy raspberrypi_ipa_proxy.cpp:45 initializing raspberrypi proxy: loading IPA from /home/kunal/.conan/data/gst-libcamera/0.0.4/_/_/package/b4d2cb36ad454869cf57844e2325abef18b7dc73/lib/libcamera/ipa_rpi.so

I am using conan to build and package the libcamera. I am investigating the problem. If you have any further suggestions please let me know.

from libcamera.

jmondi avatar jmondi commented on June 5, 2024

I have no idea how conan interfaces to meson, but be aware that the install phase in meson strips the binaries, rendering the signatures unusable. There's a re-sign step visible at the end of src/ipa/meson.build which is run at ninja install time. You might want to check if anything like this is required/doable with conan

from libcamera.

kbingham avatar kbingham commented on June 5, 2024

If conan is creating a package for libcamera, then indeed it is likely to be stripping the built objects and causing this issue.
@KunalAivero Can you point to the build scripts that you are using for this package please?

https://salsa.debian.org/multimedia-team/libcamera/-/commit/7871e6737d82e76942aaa3b6f56a2f03f28b1d91 might be a useful reference for you.

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024

Hi @kbingham thanks for you suggestions. I am out of office this week. I will try this out next week and get back to you.

from libcamera.

kbingham avatar kbingham commented on June 5, 2024

@KunalAivero How did you get on here, did you resolve your issue ?

from libcamera.

dgsiegel avatar dgsiegel commented on June 5, 2024

I've just ran into a similar issue on a RPi Zero built with buildroot. From what I could figure out was that the GnuTLS signature path is broken and you need both GnuTLS and libcrypto/openssl. By adding both dependencies at build time, the signature will be found and valid.

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024

@kbingham I haven't yet managed to fix the conan build file, I am planning a few more tests tomorrow. will update you tomorrow.

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024

Hi @kbingham it indeed turned out to be an issue with stripping the signed binaries . Out build script were stripping out the debug information from binaries after install step. We have fixed it now. Thanks for you help.
Thanks @jmondi

from libcamera.

KunalAivero avatar KunalAivero commented on June 5, 2024

Closing this issue as it has been fixed. Problem was caused by stripping the signed binaries. Resolution is to re-sign the binaries after stripping.

from libcamera.

kbingham avatar kbingham commented on June 5, 2024

@KunalAivero Could you share any reference to your Conan package scripts/build please? Are they going to be merged 'into' Conan package manager at all?

from libcamera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.