-
Notifications
You must be signed in to change notification settings - Fork 11
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
Error from Python bindings: undefined symbol: g_variant_dict_ref #1
Comments
From what I understand it shouldn't matter that libvips was built without the Python dependencies stuff because the newer pyvips bindings don't use it: https://jcupitt.github.io/libvips/2017/09/01/libvips-for-Python.html Also this error isn't lambda specific. I built everything with docker on EC2 and the same error happens there too. One strange thing I noticed is that if I try to load the .so a second time it appears to work. But then later on I hit this error:
Notice that it's looking for the system libz. Multiple people are reporting the exact same bug with sharp: lovell/sharp#843 This kind of suggests it's not a Python problem but rather an issue with how libvips is built. The problem actually shows up by merely using ldd on libpng from an EC2 instance.
This is probably because libvips-lamda builds zlib 1.2.11 but libpng seems to be pinned to 1.2.9? Some references to libpng/zlib version hackery here: pnggroup/libpng#155 But I tried both updating libpng to 1.6.32 and downgrading zlib to 1.2.9 and neither worked. It's still picking the system version of libz and then complaining that it's not 1.2.9. And I still don't even know if this is the cause of my initial pyvips problem. |
I managed to fix the zlib problem by doing a simple build with only jpeg and png support and using the mostly preinstalled libraries instead of building every dependency from scratch. However in the end it doesn't fix my
|
Oh I see what the problem is. There's already a libgobject-2.0 installed on lambda but it's very old and The problem is that |
Some progress.
|
Success I think! I edited my previous comment. The libvips I built times out when I set the lambda timeout to 3s but if I set the timeout to 10s it runs successfully in <100ms. I'm confused. But anyway there's definitely a problem with zlib that needs to be fixed both in this project and sharp. |
The fix seems to be to simply downgrade to zlib 1.2.8 by setting The reason it has to be 1.2.8 is because Lamda pre-imports a bunch of Python modules which you can see by doing |
Huh. I had not run into that. Thanks for the rundown! |
I get the same error on ubuntu 16. Do I must built from source in order to solve this issue? |
I'm trying to use the libs you have available with pyvips but I always get this error:
This errors means that the .so was found but failed to load.
Here's a copy of the packaged project (literally all it does is import pyvips): https://drive.google.com/file/d/0BzTQ-TolcOhSTkZrUk9KQ01qS3M/view?usp=sharing
My guess would be it's something to do with how the cffi Python module has been built. Amazon requires Python 3.6 on lambda but only has 3.5 on their AMIs. So Python 3.6 has to be built from source and then cffi has to be built from source.
The text was updated successfully, but these errors were encountered: