Skip to content

Commit

Permalink
Merge pull request #75 from jasongi/libproj-libgdal-rpath
Browse files Browse the repository at this point in the history
Run patchelf on all libs
  • Loading branch information
vincentsarago committed Feb 2, 2024
2 parents 062a7f5 + fe3211f commit 520e0d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

# Build final image
FROM public.ecr.aws/lambda/provided:al2 as runner
Expand Down
5 changes: 4 additions & 1 deletion tests/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ if [[ ! "$(ogrinfo --formats | grep 'DXF')" ]]; then echo "DXF NOK" && exit 1; f
echo "OK"

echo "Checking sqlite build"
if [[ ! "$(ldd $PREFIX/bin/gdalwarp | grep '/opt/bin/../lib/libsqlite3')" ]]; then echo "libsql NOK" && exit 1; fi
if [[ ! "$(ldd $PREFIX/bin/gdalwarp | grep '/opt/bin/../lib/libsqlite3')" ]]; then echo "gdalwarp libsql NOK" && exit 1; fi
if [[ ! "$(ldd $PREFIX/lib/libgdal.so | grep '/opt/lib/libsqlite3')" ]]; then echo "libgdal libsql NOK" && exit 1; fi
if [[ ! "$(ldd $PREFIX/lib/libproj.so | grep '/opt/lib/libsqlite3')" ]]; then echo "libproj libsql NOK" && exit 1; fi
if [[ ! "$(ldd $PREFIX/lib/libgeotiff.so | grep '/opt/lib/libsqlite3')" ]]; then echo "libgeotiff libsql NOK" && exit 1; fi
echo "OK"

echo "Checking OGR"
Expand Down

0 comments on commit 520e0d7

Please sign in to comment.