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 all libs #75

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

jasongi
Copy link

@jasongi jasongi commented Jan 15, 2024

Alternative solution to #74 that fixes #71 and I think fixes #56 too.

@jasongi jasongi mentioned this pull request Jan 15, 2024
@jasongi
Copy link
Author

jasongi commented Jan 15, 2024

docker run --pull always --platform=linux/amd64 --entrypoint "" --rm ghcr.io/jasongi/lambda-gdal:3.8 bash -c 'ldd /opt/lib/*.so | grep "sql\|:" | grep -B 1 "sql" '

output

/opt/lib/libgdal.so:
	libsqlite3.so.0 => /opt/lib/libsqlite3.so.0 (0x00007f84c27b4000)
--
/opt/lib/libgeotiff.so:
	libsqlite3.so.0 => /opt/lib/libsqlite3.so.0 (0x00007f6830946000)
--
/opt/lib/libproj.so:
	libsqlite3.so.0 => /opt/lib/libsqlite3.so.0 (0x00007f5ff3e2d000)
/opt/lib/libsqlite3.so:

@@ -399,6 +399,7 @@ RUN rm -f $PREFIX/lib/libturbojpeg.so* \

# FIX
RUN for i in $PREFIX/bin/*; do patchelf --force-rpath --set-rpath '$ORIGIN/../lib' $i; done
RUN for i in $PREFIX/lib/*.so; do patchelf --force-rpath --set-rpath '$ORIGIN' $i; done
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure to remember everything here but can you tell why there is a difference between $ORIGIN/../lib and $ORIGIN ?

@jasongi
Copy link
Author

jasongi commented Feb 2, 2024 via email

@vincentsarago vincentsarago merged commit 520e0d7 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
3 participants