Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlonluca
Copy link

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.

Copy link
Owner

@agherzan agherzan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Could you tweak your commit subject to state the recipe name? Checkout https://meta-raspberrypi.readthedocs.io/en/latest/contributing.html for more info.

@kraj
Copy link
Collaborator

kraj commented Mar 18, 2024

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
Copy link
Author

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 carlonluca changed the title Removed unused libraries from python3-picamera picamera-libs: removed unused libraries from python3-picamera Mar 18, 2024
@kraj
Copy link
Collaborator

kraj commented Mar 18, 2024

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
Copy link
Author

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
Copy link
Owner

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

@carlonluca
Copy link
Author

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
Copy link
Owner

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

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.

Signed-off-by: Luca Carlon <[email protected]>
@agherzan
Copy link
Owner

agherzan commented Jul 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants