Skip to content

Commit 214c900

Browse files
committed
Set rpath via patchelf instead of build tools #32
Upgrade dependencies to latest: glib, svg
1 parent ec9a5f7 commit 214c900

File tree

7 files changed

+19
-14
lines changed

7 files changed

+19
-14
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if ! type docker >/dev/null; then
3030
fi
3131

3232
# Update base images
33-
for baseimage in centos:7 debian:stretch debian:bullseye alpine:3.10; do
33+
for baseimage in centos:7 debian:stretch debian:bullseye alpine:3.11; do
3434
docker pull $baseimage
3535
done
3636

build/lin.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ mkdir ${TARGET}
1111
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${TARGET}/lib/pkgconfig"
1212
export PATH="${PATH}:${TARGET}/bin"
1313
export CPPFLAGS="-I${TARGET}/include"
14-
export LDFLAGS="-L${TARGET}/lib -Wl,-rpath='\$\$ORIGIN'"
14+
export LDFLAGS="-L${TARGET}/lib"
1515
export LD_LIBRARY_PATH="${TARGET}/lib"
1616
export CFLAGS="${FLAGS}"
1717
export CXXFLAGS="${FLAGS}"
1818

1919
# Dependency version numbers
2020
VERSION_ZLIB=1.2.11
2121
VERSION_FFI=3.3
22-
VERSION_GLIB=2.63.2
22+
VERSION_GLIB=2.63.3
2323
VERSION_XML2=2.9.10
2424
VERSION_GSF=1.14.46
2525
VERSION_EXIF=0.6.21
@@ -40,7 +40,7 @@ VERSION_CAIRO=1.16.0
4040
VERSION_FRIBIDI=1.0.8
4141
VERSION_PANGO=1.44.7
4242
VERSION_CROCO=0.6.13
43-
VERSION_SVG=2.46.4
43+
VERSION_SVG=2.47.1
4444
VERSION_GIF=5.1.4
4545

4646
# Remove patch version component
@@ -80,7 +80,7 @@ version_latest "pixman" "$VERSION_PIXMAN" "3648"
8080
version_latest "fribidi" "$VERSION_FRIBIDI" "857"
8181
version_latest "pango" "$VERSION_PANGO" "11783"
8282
version_latest "croco" "$VERSION_CROCO" "11787"
83-
#version_latest "svg" "$VERSION_SVG" "5420" # v2.47.0+ requires rust>=1.36 but rustup does not support musl
83+
version_latest "svg" "$VERSION_SVG" "5420"
8484
#version_latest "gif" "$VERSION_GIF" "1158" # v5.1.5+ provides a Makefile only so will require custom cross-compilation setup
8585
if [ "$ALL_AT_VERSION_LATEST" = "false" ]; then exit 1; fi
8686

@@ -94,7 +94,7 @@ case ${PLATFORM} in *musl*)
9494
make install-strip
9595
rm ${TARGET}/include/gettext-po.h
9696
rm -rf ${TARGET}/lib/*gettext*
97-
export LDFLAGS="-L${TARGET}/lib -lintl -Wl,-rpath='\$ORIGIN'"
97+
export LDFLAGS="$LDFLAGS -lintl"
9898
esac
9999

100100
mkdir ${DEPS}/zlib
@@ -189,6 +189,7 @@ CFLAGS= CXXFLAGS= meson setup _build --buildtype=release --strip --libdir=lib --
189189
-Dtiff=false -Dx11=false -Dgir=false -Dinstalled_tests=false -Dgio_sniffing=false -Dman=false -Dbuiltin_loaders=png,jpeg
190190
ninja -C _build
191191
ninja -C _build install
192+
rm -rf ${TARGET}/lib/gdk-pixbuf-2.0
192193

193194
mkdir ${DEPS}/freetype
194195
curl -Ls https://download.savannah.gnu.org/releases/freetype/freetype-${VERSION_FREETYPE}.tar.xz | tar xJC ${DEPS}/freetype --strip-components=1
@@ -286,7 +287,10 @@ make install-strip
286287
cd ${TARGET}/include
287288
rm -rf vips/vipsc++.h vips/vipscpp.h
288289
cd ${TARGET}/lib
289-
rm -rf pkgconfig .libs *.la libvipsCC*
290+
rm -rf pkgconfig .libs *.la libvipsCC* cmake
291+
292+
# Set RPATH to $ORIGIN
293+
find ${TARGET}/lib -type f -name "*.so*" -exec sh -c "patchelf --set-rpath '\$ORIGIN' --force-rpath {}" \;
290294

291295
# Create JSON file of version numbers
292296
cd ${TARGET}

linux-arm64v8/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99
apt-get install -y curl && \
1010
dpkg --add-architecture arm64 && \
1111
apt-get update && \
12-
apt-get install -y crossbuild-essential-arm64 autoconf libtool nasm gtk-doc-tools texinfo gperf advancecomp libglib2.0-dev jq gettext intltool autopoint cmake python3-pip ninja-build && \
12+
apt-get install -y crossbuild-essential-arm64 autoconf libtool nasm gtk-doc-tools texinfo gperf advancecomp libglib2.0-dev jq gettext intltool autopoint cmake python3-pip ninja-build patchelf && \
1313
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
1414
~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu && \
1515
pip3 install meson

linux-armv6/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99
apt-get install -y curl && \
1010
dpkg --add-architecture armhf && \
1111
apt-get update && \
12-
apt-get install -y autoconf libtool nasm gtk-doc-tools texinfo gperf advancecomp libglib2.0-dev jq gettext intltool autopoint cmake python3-pip ninja-build && \
12+
apt-get install -y autoconf libtool nasm gtk-doc-tools texinfo gperf advancecomp libglib2.0-dev jq gettext intltool autopoint cmake python3-pip ninja-build patchelf && \
1313
mkdir /root/tools && \
1414
curl -Ls https://github.com/rvagg/rpi-newer-crosstools/archive/master.tar.gz | tar xzC /root/tools --strip-components=1 && \
1515
curl https://sh.rustup.rs -sSf | sh -s -- -y && \

linux-armv7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99
apt-get install -y curl && \
1010
dpkg --add-architecture armhf && \
1111
apt-get update && \
12-
apt-get install -y crossbuild-essential-armhf autoconf libtool nasm gtk-doc-tools texinfo gperf advancecomp libglib2.0-dev jq gettext intltool autopoint cmake python3-pip ninja-build && \
12+
apt-get install -y crossbuild-essential-armhf autoconf libtool nasm gtk-doc-tools texinfo gperf advancecomp libglib2.0-dev jq gettext intltool autopoint cmake python3-pip ninja-build patchelf && \
1313
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
1414
~/.cargo/bin/rustup target add arm-unknown-linux-gnueabihf && \
1515
pip3 install meson

linux-x64/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ RUN \
2020
jq \
2121
nasm \
2222
prelink \
23+
patchelf \
2324
ninja-build && \
2425
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
2526
ln -s /usr/bin/cmake3 /usr/bin/cmake && \

linuxmusl-x64/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM alpine:3.10
1+
FROM alpine:3.11
22
MAINTAINER Lovell Fuller <[email protected]>
33

4-
# Create Alpine 3.10 (musl 1.1.22) container suitable for building Linux x64 binaries
4+
# Create Alpine 3.11 (musl 1.1.24) container suitable for building Linux x64 binaries
55

66
# Build dependencies
77
RUN \
88
apk update && apk upgrade && \
99
apk --update --no-cache add \
1010
build-base curl git autoconf automake libtool intltool shared-mime-info nasm gtk-doc \
11-
texinfo gperf glib-dev gobject-introspection-dev findutils jq linux-headers cmake binutils python3 ninja && \
12-
apk --update --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.10/community/ add cargo && \
11+
texinfo gperf glib-dev gobject-introspection-dev findutils jq linux-headers cmake binutils python3 ninja patchelf && \
12+
apk --update --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.11/community/ add cargo && \
1313
apk --update --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/testing/ add advancecomp && \
1414
pip3 install meson
1515

0 commit comments

Comments
 (0)