From 6844e717a56a5dd8ad87a236a96bea069cc635fd Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 10 May 2017 11:14:13 -0700 Subject: [PATCH] Add explicit "--build" to our "./configure" invocations --- 5.6/Dockerfile | 9 +++++++++ 5.6/alpine/Dockerfile | 11 ++++++++++- 5.6/alpine/docker-php-ext-configure | 5 +++++ 5.6/apache/Dockerfile | 9 +++++++++ 5.6/apache/docker-php-ext-configure | 5 +++++ 5.6/docker-php-ext-configure | 5 +++++ 5.6/fpm/Dockerfile | 9 +++++++++ 5.6/fpm/alpine/Dockerfile | 11 ++++++++++- 5.6/fpm/alpine/docker-php-ext-configure | 5 +++++ 5.6/fpm/docker-php-ext-configure | 5 +++++ 5.6/zts/Dockerfile | 9 +++++++++ 5.6/zts/alpine/Dockerfile | 11 ++++++++++- 5.6/zts/alpine/docker-php-ext-configure | 5 +++++ 5.6/zts/docker-php-ext-configure | 5 +++++ 7.0/Dockerfile | 9 +++++++++ 7.0/alpine/Dockerfile | 11 ++++++++++- 7.0/alpine/docker-php-ext-configure | 5 +++++ 7.0/apache/Dockerfile | 9 +++++++++ 7.0/apache/docker-php-ext-configure | 5 +++++ 7.0/docker-php-ext-configure | 5 +++++ 7.0/fpm/Dockerfile | 9 +++++++++ 7.0/fpm/alpine/Dockerfile | 11 ++++++++++- 7.0/fpm/alpine/docker-php-ext-configure | 5 +++++ 7.0/fpm/docker-php-ext-configure | 5 +++++ 7.0/zts/Dockerfile | 9 +++++++++ 7.0/zts/alpine/Dockerfile | 11 ++++++++++- 7.0/zts/alpine/docker-php-ext-configure | 5 +++++ 7.0/zts/docker-php-ext-configure | 5 +++++ 7.1/Dockerfile | 9 +++++++++ 7.1/alpine/Dockerfile | 11 ++++++++++- 7.1/alpine/docker-php-ext-configure | 5 +++++ 7.1/apache/Dockerfile | 9 +++++++++ 7.1/apache/docker-php-ext-configure | 5 +++++ 7.1/docker-php-ext-configure | 5 +++++ 7.1/fpm/Dockerfile | 9 +++++++++ 7.1/fpm/alpine/Dockerfile | 11 ++++++++++- 7.1/fpm/alpine/docker-php-ext-configure | 5 +++++ 7.1/fpm/docker-php-ext-configure | 5 +++++ 7.1/zts/Dockerfile | 9 +++++++++ 7.1/zts/alpine/Dockerfile | 11 ++++++++++- 7.1/zts/alpine/docker-php-ext-configure | 5 +++++ 7.1/zts/docker-php-ext-configure | 5 +++++ Dockerfile-alpine.template | 11 ++++++++++- Dockerfile-debian.template | 9 +++++++++ docker-php-ext-configure | 5 +++++ 45 files changed, 327 insertions(+), 10 deletions(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index a318901e..03130351 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -88,6 +89,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -99,7 +101,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -117,6 +121,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/5.6/alpine/Dockerfile b/5.6/alpine/Dockerfile index e2898a5a..a6289b11 100644 --- a/5.6/alpine/Dockerfile +++ b/5.6/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -89,10 +90,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -100,7 +103,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,8 +123,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/5.6/alpine/docker-php-ext-configure b/5.6/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/5.6/alpine/docker-php-ext-configure +++ b/5.6/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 0dafab6b..7b132fae 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -147,6 +148,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -158,7 +160,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -176,6 +180,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/5.6/apache/docker-php-ext-configure b/5.6/apache/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/5.6/apache/docker-php-ext-configure +++ b/5.6/apache/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/5.6/docker-php-ext-configure b/5.6/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/5.6/docker-php-ext-configure +++ b/5.6/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index 865a5b26..c77a7d49 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -89,6 +90,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -100,7 +102,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,6 +122,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/5.6/fpm/alpine/Dockerfile b/5.6/fpm/alpine/Dockerfile index db2fb62f..a8992698 100644 --- a/5.6/fpm/alpine/Dockerfile +++ b/5.6/fpm/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -90,10 +91,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -101,7 +104,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -119,8 +124,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/5.6/fpm/alpine/docker-php-ext-configure b/5.6/fpm/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/5.6/fpm/alpine/docker-php-ext-configure +++ b/5.6/fpm/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/5.6/fpm/docker-php-ext-configure b/5.6/fpm/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/5.6/fpm/docker-php-ext-configure +++ b/5.6/fpm/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/5.6/zts/Dockerfile b/5.6/zts/Dockerfile index 596630f2..4cccd155 100644 --- a/5.6/zts/Dockerfile +++ b/5.6/zts/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -89,6 +90,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -100,7 +102,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,6 +122,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/5.6/zts/alpine/Dockerfile b/5.6/zts/alpine/Dockerfile index 312ea4ac..d7d726a4 100644 --- a/5.6/zts/alpine/Dockerfile +++ b/5.6/zts/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -90,10 +91,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -101,7 +104,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -119,8 +124,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/5.6/zts/alpine/docker-php-ext-configure b/5.6/zts/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/5.6/zts/alpine/docker-php-ext-configure +++ b/5.6/zts/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/5.6/zts/docker-php-ext-configure b/5.6/zts/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/5.6/zts/docker-php-ext-configure +++ b/5.6/zts/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.0/Dockerfile b/7.0/Dockerfile index d728906b..e11b23a2 100644 --- a/7.0/Dockerfile +++ b/7.0/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -88,6 +89,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -99,7 +101,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -117,6 +121,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.0/alpine/Dockerfile b/7.0/alpine/Dockerfile index 9003fc28..4e3d8047 100644 --- a/7.0/alpine/Dockerfile +++ b/7.0/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -89,10 +90,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -100,7 +103,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,8 +123,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/7.0/alpine/docker-php-ext-configure b/7.0/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.0/alpine/docker-php-ext-configure +++ b/7.0/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.0/apache/Dockerfile b/7.0/apache/Dockerfile index 08d58b73..ff4ac10d 100644 --- a/7.0/apache/Dockerfile +++ b/7.0/apache/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -147,6 +148,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -158,7 +160,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -176,6 +180,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.0/apache/docker-php-ext-configure b/7.0/apache/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.0/apache/docker-php-ext-configure +++ b/7.0/apache/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.0/docker-php-ext-configure b/7.0/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.0/docker-php-ext-configure +++ b/7.0/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.0/fpm/Dockerfile b/7.0/fpm/Dockerfile index f8330f4b..af38bfc8 100644 --- a/7.0/fpm/Dockerfile +++ b/7.0/fpm/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -89,6 +90,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -100,7 +102,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,6 +122,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.0/fpm/alpine/Dockerfile b/7.0/fpm/alpine/Dockerfile index 1c06e9c7..37ab6bfd 100644 --- a/7.0/fpm/alpine/Dockerfile +++ b/7.0/fpm/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -90,10 +91,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -101,7 +104,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -119,8 +124,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/7.0/fpm/alpine/docker-php-ext-configure b/7.0/fpm/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.0/fpm/alpine/docker-php-ext-configure +++ b/7.0/fpm/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.0/fpm/docker-php-ext-configure b/7.0/fpm/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.0/fpm/docker-php-ext-configure +++ b/7.0/fpm/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.0/zts/Dockerfile b/7.0/zts/Dockerfile index b683147f..8bd7d624 100644 --- a/7.0/zts/Dockerfile +++ b/7.0/zts/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -89,6 +90,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -100,7 +102,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,6 +122,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.0/zts/alpine/Dockerfile b/7.0/zts/alpine/Dockerfile index 517c8717..0edfae99 100644 --- a/7.0/zts/alpine/Dockerfile +++ b/7.0/zts/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -90,10 +91,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -101,7 +104,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -119,8 +124,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/7.0/zts/alpine/docker-php-ext-configure b/7.0/zts/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.0/zts/alpine/docker-php-ext-configure +++ b/7.0/zts/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.0/zts/docker-php-ext-configure b/7.0/zts/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.0/zts/docker-php-ext-configure +++ b/7.0/zts/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 81f740d9..c3504201 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -88,6 +89,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -99,7 +101,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -117,6 +121,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.1/alpine/Dockerfile b/7.1/alpine/Dockerfile index 4e586864..451c1dc6 100644 --- a/7.1/alpine/Dockerfile +++ b/7.1/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -89,10 +90,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -100,7 +103,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,8 +123,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/7.1/alpine/docker-php-ext-configure b/7.1/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.1/alpine/docker-php-ext-configure +++ b/7.1/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.1/apache/Dockerfile b/7.1/apache/Dockerfile index 85c08767..ddda0075 100644 --- a/7.1/apache/Dockerfile +++ b/7.1/apache/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -147,6 +148,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -158,7 +160,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -176,6 +180,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.1/apache/docker-php-ext-configure b/7.1/apache/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.1/apache/docker-php-ext-configure +++ b/7.1/apache/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.1/docker-php-ext-configure b/7.1/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.1/docker-php-ext-configure +++ b/7.1/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.1/fpm/Dockerfile b/7.1/fpm/Dockerfile index a24e4dcf..11366ebb 100644 --- a/7.1/fpm/Dockerfile +++ b/7.1/fpm/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -89,6 +90,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -100,7 +102,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,6 +122,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.1/fpm/alpine/Dockerfile b/7.1/fpm/alpine/Dockerfile index bd40a4f3..c16df7a3 100644 --- a/7.1/fpm/alpine/Dockerfile +++ b/7.1/fpm/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -90,10 +91,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -101,7 +104,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -119,8 +124,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/7.1/fpm/alpine/docker-php-ext-configure b/7.1/fpm/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.1/fpm/alpine/docker-php-ext-configure +++ b/7.1/fpm/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.1/fpm/docker-php-ext-configure b/7.1/fpm/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.1/fpm/docker-php-ext-configure +++ b/7.1/fpm/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.1/zts/Dockerfile b/7.1/zts/Dockerfile index 7e7bee11..b7fcacdb 100644 --- a/7.1/zts/Dockerfile +++ b/7.1/zts/Dockerfile @@ -9,6 +9,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -89,6 +90,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -100,7 +102,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -118,6 +122,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/7.1/zts/alpine/Dockerfile b/7.1/zts/alpine/Dockerfile index e9cd5e71..bbc68433 100644 --- a/7.1/zts/alpine/Dockerfile +++ b/7.1/zts/alpine/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -90,10 +91,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -101,7 +104,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -119,8 +124,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/7.1/zts/alpine/docker-php-ext-configure b/7.1/zts/alpine/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.1/zts/alpine/docker-php-ext-configure +++ b/7.1/zts/alpine/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/7.1/zts/docker-php-ext-configure b/7.1/zts/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/7.1/zts/docker-php-ext-configure +++ b/7.1/zts/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 835de3cc..a358a34f 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -3,6 +3,7 @@ FROM alpine:3.4 # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev dpkg \ file \ g++ \ gcc \ @@ -83,10 +84,12 @@ COPY docker-php-source /usr/local/bin/ RUN set -xe \ && apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ + coreutils \ curl-dev \ libedit-dev \ libxml2-dev \ openssl-dev \ + pcre-dev \ sqlite-dev \ \ && export CFLAGS="$PHP_CFLAGS" \ @@ -94,7 +97,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -112,8 +117,12 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ - && make -j "$(getconf _NPROCESSORS_ONLN)" \ + && make -j "$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip --strip-all '{}' + || true; } \ && make clean \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index adcb2841..4fac69e4 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -3,6 +3,7 @@ FROM debian:jessie # persistent / runtime deps ENV PHPIZE_DEPS \ autoconf \ + dpkg-dev \ file \ g++ \ gcc \ @@ -82,6 +83,7 @@ RUN set -xe \ $PHP_EXTRA_BUILD_DEPS \ libcurl4-openssl-dev \ libedit-dev \ + libpcre3-dev \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ @@ -93,7 +95,9 @@ RUN set -xe \ LDFLAGS="$PHP_LDFLAGS" \ && docker-php-source extract \ && cd /usr/src/php \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ && ./configure \ + --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ \ @@ -111,6 +115,11 @@ RUN set -xe \ --with-openssl \ --with-zlib \ \ +# bundled pcre is too old for s390x (which isn't exactly a good sign) +# /usr/src/php/ext/pcre/pcrelib/pcre_jit_compile.c:65:2: error: #error Unsupported architecture + --with-pcre-regex=/usr \ + --with-libdir="lib/$gnuArch" \ + \ $PHP_EXTRA_CONFIGURE_ARGS \ && make -j "$(nproc)" \ && make install \ diff --git a/docker-php-ext-configure b/docker-php-ext-configure index 93d31601..375afd40 100755 --- a/docker-php-ext-configure +++ b/docker-php-ext-configure @@ -52,6 +52,11 @@ if [ "$pm" = 'apk' ]; then fi fi +if command -v dpkg-architecture > /dev/null; then + gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" + set -- --build="$gnuArch" "$@" +fi + set -x cd "$ext" phpize