agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
505 stars 396 forks source link

picamera-libs: removed unused libraries from python3-picamera #1292

Open carlonluca opened 4 months ago

carlonluca commented 4 months ago

Apparently the recipe for python3 picamera is installing some libraries from /opt/vc/lib that are not necessary to the picamera module. The gles2 library, in particular, overwrites a symlink to another version of the gles2 library. The result is that two different gles2 libs are placed in /usr/lib.

This commit removes a few unneeded libraries, leaving libmmal and its dependencies, that are instead required.

kraj commented 3 months ago

Apparently the recipe for python3 picamera is installing some libraries from /opt/vc/lib that are not necessary to the picamera module. The gles2 library, in particular, overwrites a symlink to another version of the gles2 library. The result is that two different gles2 libs are placed in /usr/lib.

This commit removes a few unneeded libraries, leaving libmmal and its dependencies, that are instead required.

Does py3-camera work with mesa provided GL libraries ?

carlonluca commented 3 months ago

The concept behind this is that the module does not use GL libs at all. I looked into the code and could only find libmmal.so and libbcm_host.so. GL does not seem to be a dependency.

kraj commented 3 months ago

The concept behind this is that the module does not use GL libs at all. I looked into the code and could only find libmmal.so and libbcm_host.so. GL does not seem to be a dependency.

OK, in that case, we should not install those either. If python pieces are abstacted enough that it does not demand MMAL interface then it is good.

carlonluca commented 3 months ago

Not sure if I'm understanding correctly what you are saying @kraj. libmmal and libbcm_host appear to be needed, so those, and their deps, should not be removed:

https://github.com/waveform80/picamera/blob/master/picamera/mmal.py#L49 https://github.com/waveform80/picamera/blob/master/picamera/bcm_host.py#L47

I'm not a picamera dev though.

agherzan commented 3 months ago

@kraj I think this specific removal makes sense. @carlonluca, have you managed to ask upstream why they include the GL libraries?

carlonluca commented 3 months ago

I'm sorry, the situation is not completely clear to me. Can you provide more details? By "upstream" here, do you mean the authors of that python library (I guess this is the official repo: https://github.com/waveform80/picamera)? Where did they include the GL libraries?

agherzan commented 3 months ago

Scratch that last comment of mine. This is from the rpi firmware repo.