Skip to content

Commit bf04c6a

Browse files
authored
Split libtool build in runtime_base image (#967)
1 parent f0b7aee commit bf04c6a

File tree

5 files changed

+33
-21
lines changed

5 files changed

+33
-21
lines changed

docker/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ COPY build_scripts/build_utils.sh /build_scripts/
3232
COPY build_scripts/build_env_runtime.sh /build_scripts/
3333
RUN manylinux-entrypoint /build_scripts/install-runtime-packages.sh
3434

35+
COPY build_scripts/install-libtool.sh /build_scripts/
36+
RUN export LIBTOOL_ROOT=libtool-2.4.6 && \
37+
export LIBTOOL_HASH=e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3 && \
38+
export LIBTOOL_DOWNLOAD_URL=http://ftp.gnu.org/gnu/libtool && \
39+
manylinux-entrypoint /build_scripts/install-libtool.sh
40+
3541
COPY build_scripts/install-patchelf.sh /build_scripts/
3642
RUN export PATCHELF_VERSION=0.12 && \
3743
export PATCHELF_HASH=3dca33fb862213b3541350e1da262249959595903f559eae0fbc68966e9c3f56 && \

docker/build_scripts/build_env_runtime.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ AUTOMAKE_ROOT=automake-1.16.2
44
AUTOMAKE_HASH=b2f361094b410b4acbf4efba7337bdb786335ca09eb2518635a09fb7319ca5c1
55
AUTOMAKE_DOWNLOAD_URL=http://ftp.gnu.org/gnu/automake
66

7-
LIBTOOL_ROOT=libtool-2.4.6
8-
LIBTOOL_HASH=e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3
9-
LIBTOOL_DOWNLOAD_URL=http://ftp.gnu.org/gnu/libtool

docker/build_scripts/build_utils.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,3 @@ function build_automake {
145145
(cd ${automake_fname} && do_standard_install)
146146
rm -rf ${automake_fname} ${automake_fname}.tar.gz
147147
}
148-
149-
150-
function build_libtool {
151-
local libtool_fname=$1
152-
check_var ${libtool_fname}
153-
local libtool_sha256=$2
154-
check_var ${libtool_sha256}
155-
check_var ${LIBTOOL_DOWNLOAD_URL}
156-
fetch_source ${libtool_fname}.tar.gz ${LIBTOOL_DOWNLOAD_URL}
157-
check_sha256sum ${libtool_fname}.tar.gz ${libtool_sha256}
158-
tar -zxf ${libtool_fname}.tar.gz
159-
(cd ${libtool_fname} && do_standard_install)
160-
rm -rf ${libtool_fname} ${libtool_fname}.tar.gz
161-
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# Top-level build script called from Dockerfile
3+
4+
# Stop at any error, show all commands
5+
set -exuo pipefail
6+
7+
# Get script directory
8+
MY_DIR=$(dirname "${BASH_SOURCE[0]}")
9+
10+
# Get build utilities
11+
source $MY_DIR/build_utils.sh
12+
13+
# Install newest libtool
14+
check_var ${LIBTOOL_ROOT}
15+
check_var ${LIBTOOL_HASH}
16+
check_var ${LIBTOOL_DOWNLOAD_URL}
17+
fetch_source ${LIBTOOL_ROOT}.tar.gz ${LIBTOOL_DOWNLOAD_URL}
18+
check_sha256sum ${LIBTOOL_ROOT}.tar.gz ${LIBTOOL_HASH}
19+
tar -zxf ${LIBTOOL_ROOT}.tar.gz
20+
pushd ${LIBTOOL_ROOT}
21+
do_standard_install
22+
popd
23+
rm -rf ${LIBTOOL_ROOT} ${LIBTOOL_ROOT}.tar.gz
24+
25+
26+
hash -r
27+
libtoolize --version

docker/build_scripts/install-runtime-packages.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ fi
126126
build_automake $AUTOMAKE_ROOT $AUTOMAKE_HASH
127127
automake --version
128128

129-
# Install newest libtool
130-
build_libtool $LIBTOOL_ROOT $LIBTOOL_HASH
131-
libtool --version
132-
133129
# Strip what we can -- and ignore errors, because this just attempts to strip
134130
# *everything*, including non-ELF files:
135131
find /usr/local -type f -print0 | xargs -0 -n1 strip --strip-unneeded 2>/dev/null || true

0 commit comments

Comments
 (0)