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

Fix loading FriBiDi on Alpine #6165

Merged
merged 1 commit into from Mar 31, 2022
Merged

Fix loading FriBiDi on Alpine #6165

merged 1 commit into from Mar 31, 2022

Conversation

nulano
Copy link
Contributor

@nulano nulano commented Mar 31, 2022

Testing python-pillow/pillow-wheels#271, I find the tests pass, but Raqm is not enabled even when I install FriBiDi.

On Alpine, fribidi is at /usr/lib/libfribidi.so.0, and I can see the second dlopen call succeeds when using strace. However, the shim is still rejecting the SO. This is because the dlerror call returns the error for the first dlopen call.

This could be fixed by calling dlerror before retrying to clear the error, but since all dlsym return values are checked to be non-null, there is actually no need to check dlerror at all.

See PR adding tests in python-pillow/pillow-wheels#274

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Should this be reported/contributed upstream?

@nulano
Copy link
Contributor Author

nulano commented Mar 31, 2022

Should this be reported/contributed upstream?

No, this my code written for Pillow (in #5062). I added dlerror because that was used in the previous implementation (dynamically loading Raqm in _imagingft.c) which this was based on.

@hugovk hugovk merged commit 785faa8 into python-pillow:main Mar 31, 2022
@hugovk
Copy link
Member

hugovk commented Mar 31, 2022

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants