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

Run patchelf on libgdal #74

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

jasongi
Copy link

@jasongi jasongi commented Jan 14, 2024

Fixes #71

I'm a bit out of my depth on this issue, but this seems to work. Unsure if we should also do this for other libs - I don't seem to have a problem with other libs though.

I've pushed the image at ghcr.io/jasongi/lambda-gdal:3.8-python3.11 if you want to try it.

@vincentsarago
Copy link
Contributor

I don't seem to have a problem with other libs though.

Well it seems that it's happening for other libs 😬

bash-4.2# ldd libproj.so | grep "sql"
        libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00000040023b2000)

When checking your image I'm not 💯 sure this is correct 👀

docker run --platform=linux/amd64 --entrypoint bash --rm ghcr.io/jasongi/lambda-gdal:3.8-python3.11 ldd /opt/lib/libgdal.so | grep "sql"
Status: Downloaded newer image for ghcr.io/jasongi/lambda-gdal:3.8-python3.11
        libsqlite3.so.0 => /var/lang/lib/libsqlite3.so.0 (0x0000004006e28000)

@jasongi
Copy link
Author

jasongi commented Jan 15, 2024

@vincentsarago my bad, gave the wrong image link

it should be ghcr.io/jasongi/lambda-gdal:3.8

the python version is hardcoded to ghcr.io/lambgeo/lambda-gdal so doesn't have my fix. But I just changed that on my fork so the images will build - should be pushed in a little bit.

docker-lambda % docker run --platform=linux/amd64 --entrypoint bash --rm ghcr.io/jasongi/lambda-gdal:3.8 ldd /opt/lib/libgdal.so | grep "sql"
	libsqlite3.so.0 => /opt/lib/libsqlite3.so.0 (0x00007f124f63c000)

RE PROJ: we could probably do the same thing there. But for say, django, it's GDAL that gets loaded first not PROJ so I think there is still value in just doing this?

edit: Raised a PR for running patchelf on all .so files in /opt/lib - #75 - the docker image at ghcr.io/jasongi/lambda-gdal:3.8 now is built on that code instead.

@jasongi jasongi mentioned this pull request Jan 15, 2024
@vincentsarago vincentsarago merged commit 1e5c650 into lambgeo:master Feb 2, 2024
3 checks passed
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.

libsqlite3 linking broken on 3.8 images
3 participants