aboutsummaryrefslogtreecommitdiff
path: root/infra/base-images/base-builder
diff options
context:
space:
mode:
authorAbhishek Arya <inferno@chromium.org>2021-01-14 15:11:59 -0800
committerGitHub <noreply@github.com>2021-01-14 15:11:59 -0800
commita252dc2d3a9944f335d07f7996b602a7180d858b (patch)
tree8a82e46b1b06d4874e7cfb83c1b593ddbed8ef81 /infra/base-images/base-builder
parent9eb1b873c5982add79fd06c2a7b4a83dc162ffc5 (diff)
downloadoss-fuzz-a252dc2d3a9944f335d07f7996b602a7180d858b.tar.gz
Use python3 in checkout_build_install_llvm.sh, revert python move patches. (#4974)
* Revert "Update Dockerfile" This reverts commit 5eae19fb57becfaf090f74ada887c040edbeca35. * Revert "Move python 3 install to base-clang, needed for clang build. (#4967)" This reverts commit 018314eefa3a247f48f0f063f351576b793e5d96. * Use python3 in checkout_build_install_llvm.sh
Diffstat (limited to 'infra/base-images/base-builder')
-rw-r--r--infra/base-images/base-builder/Dockerfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/infra/base-images/base-builder/Dockerfile b/infra/base-images/base-builder/Dockerfile
index 9ef8be6fe..72d127cf1 100644
--- a/infra/base-images/base-builder/Dockerfile
+++ b/infra/base-images/base-builder/Dockerfile
@@ -32,6 +32,32 @@ RUN dpkg --add-architecture i386 && \
subversion \
zip
+# Build and install latest Python 3 (3.8.3).
+ENV PYTHON_VERSION 3.8.3
+RUN export PYTHON_DEPS="\
+ zlib1g-dev \
+ libncurses5-dev \
+ libgdbm-dev \
+ libnss3-dev \
+ libssl-dev \
+ libsqlite3-dev \
+ libreadline-dev \
+ libffi-dev \
+ libbz2-dev \
+ liblzma-dev" && \
+ unset CFLAGS CXXFLAGS && \
+ apt-get install -y $PYTHON_DEPS && \
+ cd /tmp/ && \
+ curl -O https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz && \
+ tar -xvf Python-$PYTHON_VERSION.tar.xz && \
+ cd Python-$PYTHON_VERSION && \
+ ./configure --enable-optimizations --enable-shared && \
+ make -j install && \
+ ldconfig && \
+ cd .. && \
+ rm -r /tmp/Python-$PYTHON_VERSION.tar.xz /tmp/Python-$PYTHON_VERSION && \
+ apt-get remove -y $PYTHON_DEPS # https://github.com/google/oss-fuzz/issues/3888
+
# Install latest atheris for python fuzzing, pyinstaller for fuzzer packaging.
RUN unset CFLAGS CXXFLAGS && pip3 install -v atheris pyinstaller==4.1