meta-raspberrypi icon indicating copy to clipboard operation
meta-raspberrypi copied to clipboard

picamera-libs: removed unused libraries from python3-picamera

Open carlonluca opened this issue 1 year ago • 8 comments

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.

carlonluca avatar Mar 02 '24 18:03 carlonluca

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 ?

kraj avatar Mar 18 '24 17:03 kraj

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.

carlonluca avatar Mar 18 '24 18:03 carlonluca

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.

kraj avatar Mar 18 '24 18:03 kraj

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.

carlonluca avatar Mar 18 '24 21:03 carlonluca

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

agherzan avatar Mar 27 '24 10:03 agherzan

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?

carlonluca avatar Mar 27 '24 13:03 carlonluca

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

agherzan avatar Mar 28 '24 19:03 agherzan

@kraj, I see you had a comment on this. Thumbs up on the current patch?

agherzan avatar Jul 08 '24 12:07 agherzan