You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# We build sqlite from official sources. It requires tcl8.6-dev and build-essential
49
52
# because the compile process build and executes some commands on the host as part of the build process.
50
53
# We hard-code avoid_version=yes into libtool so that libsqlite3.so is the SONAME.
51
54
FROM toolchain as build_sqlite
52
55
RUN apt-get update -qq && apt-get -qq install make autoconf autotools-dev tcl8.6-dev build-essential
53
56
ADD downloads/sqlite3/* .
54
57
RUN unzip -q version-*.zip && mv sqlite-* sqlite3-src
55
58
RUN cd sqlite3-src && autoreconf
56
-
RUN cd sqlite3-src && ./configure --host "$TOOLCHAIN_TRIPLE" --build "$COMPILER_TRIPLE" --prefix="$BUILD_HOME/built/sqlite"
59
+
RUN cd sqlite3-src && ./configure --host "$TOOLCHAIN_TRIPLE" --build "$COMPILER_TRIPLE" --prefix="$BUILD_HOME/built/sqlite" | tee -a $LOGS_DIR/sqlite3.configure.log
57
60
RUN cd sqlite3-src && sed -i -E 's,avoid_version=no,avoid_version=yes,' ltmain.sh libtool
58
-
RUN cd sqlite3-src && make install
61
+
RUN cd sqlite3-src && make install | tee -a $LOGS_DIR/sqlite3.install.log
59
62
60
63
# Install bzip2 & lzma libraries, for stdlib's _bzip2 and _lzma modules.
61
64
FROM toolchain as build_xz
@@ -64,8 +67,8 @@ ADD downloads/xz/* .
64
67
RUN mv xz-* xz-src
65
68
ENV LIBXZ_INSTALL_DIR="$BUILD_HOME/built/xz"
66
69
RUN mkdir -p "$LIBXZ_INSTALL_DIR"
67
-
RUN cd xz-src && ./configure --host "$TOOLCHAIN_TRIPLE" --build "$COMPILER_TRIPLE" --prefix="$LIBXZ_INSTALL_DIR"
68
-
RUN cd xz-src && make install
70
+
RUN cd xz-src && ./configure --host "$TOOLCHAIN_TRIPLE" --build "$COMPILER_TRIPLE" --prefix="$LIBXZ_INSTALL_DIR" | tee -a $LOGS_DIR/xz.configure.log
71
+
RUN cd xz-src && make install | tee -a $LOGS_DIR/xz.install.log
69
72
70
73
FROM toolchain as build_bz2
71
74
RUN apt-get update -qq && apt-get -qq install make
RUN cd bzip2-src && make -f Makefile-libbz2_so | tee -a $LOGS_DIR/bz2.log
79
82
RUN mkdir -p "${LIBBZ2_INSTALL_DIR}/lib"
80
83
RUN cp bzip2-src/libbz2.so "${LIBBZ2_INSTALL_DIR}/lib"
81
84
RUN mkdir -p "${LIBBZ2_INSTALL_DIR}/include"
@@ -88,18 +91,18 @@ ADD downloads/libffi/* .
88
91
RUN mv libffi-* libffi-src
89
92
ENV LIBFFI_INSTALL_DIR="$BUILD_HOME/built/libffi"
90
93
RUN mkdir -p "$LIBFFI_INSTALL_DIR"
91
-
RUN cd libffi-src && ./configure --host "$TOOLCHAIN_TRIPLE" --build "$COMPILER_TRIPLE" --prefix="$LIBFFI_INSTALL_DIR"
92
-
RUN cd libffi-src && make install
94
+
RUN cd libffi-src && ./configure --host "$TOOLCHAIN_TRIPLE" --build "$COMPILER_TRIPLE" --prefix="$LIBFFI_INSTALL_DIR" | tee -a $LOGS_DIR/libffi.configure.log
95
+
RUN cd libffi-src && make install | tee -a $LOGS_DIR/libffi.install.log
93
96
94
97
FROM toolchain as build_openssl
95
98
# OpenSSL requires libfindlibs-libs-perl. make is nice, too.
96
99
RUN apt-get update -qq && apt-get -qq install libfindbin-libs-perl make
97
100
ADD downloads/openssl/* .
98
101
RUN mv openssl-* openssl-src
99
102
ARG OPENSSL_BUILD_TARGET
100
-
RUN cd openssl-src && ANDROID_NDK_HOME="$NDK" ./Configure ${OPENSSL_BUILD_TARGET} -D__ANDROID_API__="$ANDROID_API_LEVEL" --prefix="$BUILD_HOME/built/openssl" --openssldir="$BUILD_HOME/built/openssl"
101
-
RUN cd openssl-src && make SHLIB_EXT='${SHLIB_VERSION_NUMBER}.so'
102
-
RUN cd openssl-src && make install SHLIB_EXT='${SHLIB_VERSION_NUMBER}.so'
103
+
RUN cd openssl-src && ANDROID_NDK_HOME="$NDK" ./Configure ${OPENSSL_BUILD_TARGET} -D__ANDROID_API__="$ANDROID_API_LEVEL" --prefix="$BUILD_HOME/built/openssl" --openssldir="$BUILD_HOME/built/openssl" | tee -a $LOGS_DIR/openssl.configure.log
104
+
RUN cd openssl-src && make SHLIB_EXT='${SHLIB_VERSION_NUMBER}.so' | tee -a $LOGS_DIR/openssl.build.log
105
+
RUN cd openssl-src && make install SHLIB_EXT='${SHLIB_VERSION_NUMBER}.so' | tee -a $LOGS_DIR/openssl.install.log
103
106
104
107
# This build container builds Python, rubicon-java, and any dependencies. Each Python version
105
108
# requires itself to be installed globally during a cross-compile.
# Download & patch Python. We assume that there is only one Python-${VERSION}.*.tar.xz file.
125
135
ARG PYTHON_VERSION
@@ -136,9 +146,9 @@ RUN sed -i -e s,'test $(INSTSONAME) != $(LDLIBRARY)',true, -e s,'$(LN) -f $(INST
136
146
ARG PYTHON_SOVERSION
137
147
# Apply a C extensions linker hack; already fixed in Python 3.8+; see https://github.com/python/cpython/commit/254b309c801f82509597e3d7d4be56885ef94c11
138
148
RUN sed -i -e s,'libraries or \[\],\["pythonPYTHON_SOVERSION"] + libraries if libraries else \["pythonPYTHON_SOVERSION"\],' -e "s,pythonPYTHON_SOVERSION,python${PYTHON_SOVERSION},g" python-src/Lib/distutils/extension.py
139
-
# Apply a hack to get the NDK library paths into the Python build. Python 3.6 (but not 3.7+) needs OpenSSL here as well.
149
+
# Apply a hack to get the NDK library paths into the Python build.
140
150
# TODO(someday): Discuss with e.g. Kivy and see how to remove this.
141
-
RUN sed -i -e "s# dirs = \[\]# dirs = \[os.environ.get('SYSROOT_INCLUDE'), os.environ.get('SYSROOT_LIB'), os.environ.get('OPENSSL_INSTALL_DIR') + '/include', os.environ.get('OPENSSL_INSTALL_DIR') + '/lib'\]#" python-src/setup.py
151
+
RUN sed -i -e "s# dirs = \[\]# dirs = \[os.environ.get('SYSROOT_INCLUDE'), os.environ.get('SYSROOT_LIB') \]#" python-src/setup.py
142
152
# Apply a hack to get the sqlite include path into setup.py. TODO(someday): Discuss with upstream Python if we can use pkg-config for sqlite.
143
153
RUN sed -i -E 's,sqlite_inc_paths = [[][]],sqlite_inc_paths = ["/opt/python-build/built/sqlite/include"],' python-src/setup.py
144
154
# Apply a hack to make platform.py stop looking for a libc version.
@@ -148,27 +158,50 @@ RUN sed -i -e "s#Linux#DisabledLinuxCheck#" python-src/Lib/platform.py
148
158
ADD patches/${PYTHON_VERSION} python-src/patches
149
159
RUN cd python-src && if [ "$(wc -l < patches/series)" != "0" ] ; then quilt push -a; else echo "No patches." ; fi
150
160
161
+
# Add a Setup.local configuration
162
+
RUN cp python-src/patches/Setup.local python-src/Modules
163
+
151
164
# Build Python, pre-configuring some values so it doesn't check if those exist.
0 commit comments