Skip to content

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!

@nulano nulano deleted the dlerror branch March 31, 2022 13:41
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.

3 participants