Hello everybody,
I create the PHP images in my company and wanted to update them to PHP 7.4. Unfortunately, all Alpine-based image builds fail during the installation of the XSL extension.
This problem can be reproduced with this Dockerfile template:
The %%PHP_VARIANT%% variable must be replaced with cli, fpm or zts.
FROM php:7.4.0-%%PHP_VARIANT%%-alpine
## Install PHP extensions
RUN set -xe; \
\
apk --update add --no-cache --virtual .php-ext-install-deps \
$PHPIZE_DEPS \
# xsl deps
libxslt-dev \
\
&& docker-php-ext-install -j$(nproc) \
xsl \
&& docker-php-source delete \
\
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --no-cache $runDeps \
\
&& apk del --no-network .php-ext-install-deps
The images are built by running docker build --compress --force-rm --no-cache --pull -t test/php:7.4.0-%%PHP_VARIANT%%-alpine 7.4/alpine/%%PHP_VARIANT%%.
These are the build logs of all 3 variants:
Output for php:7.4.0-cli-alpine
Sending build context to Docker daemon 533B
Step 1/2 : FROM php:7.4.0-cli-alpine
7.4.0-cli-alpine: Pulling from library/php
Digest: sha256:f9decffa7618542aa99de5ba6997214b9d9c178ba81c8cc2ea573473a3e51b6d
Status: Image is up to date for php:7.4.0-cli-alpine
---> 3d0ba8511fe4
Step 2/2 : RUN set -xe; apk --update add --no-cache --virtual .php-ext-install-deps $PHPIZE_DEPS libxslt-dev && docker-php-ext-install -j$(nproc) xsl && docker-php-source delete && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && apk add --no-cache $runDeps && apk del --no-network .php-ext-install-deps
---> Running in cdbae96cd67a
+ apk --update add --no-cache --virtual .php-ext-install-deps autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c libxslt-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/31) Installing m4 (1.4.18-r1)
(2/31) Installing libbz2 (1.0.6-r7)
(3/31) Installing perl (5.28.2-r1)
(4/31) Installing autoconf (2.69-r2)
(5/31) Installing pkgconf (1.6.1-r1)
(6/31) Installing dpkg-dev (1.19.7-r0)
(7/31) Installing dpkg (1.19.7-r0)
(8/31) Installing libmagic (5.37-r1)
(9/31) Installing file (5.37-r1)
(10/31) Installing libgcc (8.3.0-r0)
(11/31) Installing libstdc++ (8.3.0-r0)
(12/31) Installing binutils (2.32-r0)
(13/31) Installing gmp (6.1.2-r1)
(14/31) Installing isl (0.18-r0)
(15/31) Installing libgomp (8.3.0-r0)
(16/31) Installing libatomic (8.3.0-r0)
(17/31) Installing mpfr3 (3.1.5-r1)
(18/31) Installing mpc1 (1.1.0-r0)
(19/31) Installing gcc (8.3.0-r0)
(20/31) Installing musl-dev (1.1.22-r3)
(21/31) Installing libc-dev (0.7.1-r0)
(22/31) Installing g++ (8.3.0-r0)
(23/31) Installing make (4.2.1-r2)
(24/31) Installing re2c (1.1.1-r0)
(25/31) Installing libgpg-error (1.36-r2)
(26/31) Installing libgcrypt (1.8.5-r0)
(27/31) Installing libxslt (1.1.33-r2)
(28/31) Installing zlib-dev (1.2.11-r1)
(29/31) Installing libxml2-dev (2.9.9-r2)
(30/31) Installing libxslt-dev (1.1.33-r2)
(31/31) Installing .php-ext-install-deps (20191202.202334)
Executing busybox-1.30.1-r2.trigger
OK: 230 MiB in 62 packages
+ nproc
+ docker-php-ext-install -j4 xsl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/1) Installing .phpize-deps (20191202.202341)
OK: 230 MiB in 63 packages
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20190902
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to build with XSL support... yes, shared
checking for libxslt >= 1.1.0... yes
checking for libexslt... yes
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -o php_xsl.lo
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -o xsltprocessor.lo
mkdir .libs
mkdir .libs
mkdir: can't create directory '.libs': File exists
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -fPIC -DPIC -o .libs/xsltprocessor.o
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -fPIC -DPIC -o .libs/php_xsl.o
/bin/sh /usr/src/php/ext/xsl/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--hash-style=both -pie -o xsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php/ext/xsl/modules php_xsl.lo xsltprocessor.lo -lxslt -lxml2 -lexslt -lxslt -lgcrypt -lgpg-error -lxml2
cc -shared .libs/php_xsl.o .libs/xsltprocessor.o -lexslt -lxslt -lgcrypt -lgpg-error -lxml2 -Wl,-O1 -Wl,--hash-style=both -Wl,-soname -Wl,xsl.so -o .libs/xsl.so
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgcrypt
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgpg-error
collect2: error: ld returned 1 exit status
make: *** [Makefile:199: xsl.la] Error 1
Removing intermediate container cdbae96cd67a
The command '/bin/sh -c set -xe; apk --update add --no-cache --virtual .php-ext-install-deps $PHPIZE_DEPS libxslt-dev && docker-php-ext-install -j$(nproc) xsl && docker-php-source delete && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && apk add --no-cache $runDeps && apk del --no-network .php-ext-install-deps' returned a non-zero code: 2
Output for php:7.4.0-fpm-alpine
Sending build context to Docker daemon 533B
Step 1/2 : FROM php:7.4.0-fpm-alpine
7.4.0-fpm-alpine: Pulling from library/php
Digest: sha256:9fe54440e90b0bb6c7cc4671ef067464d1051988555be4d1a4b767868494179e
Status: Image is up to date for php:7.4.0-fpm-alpine
---> c6d45e0eb6ac
Step 2/2 : RUN set -xe; apk --update add --no-cache --virtual .php-ext-install-deps $PHPIZE_DEPS libxslt-dev && docker-php-ext-install -j$(nproc) xsl && docker-php-source delete && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && apk add --no-cache $runDeps && apk del --no-network .php-ext-install-deps
---> Running in af5f8a91a9b5
+ apk --update add --no-cache --virtual .php-ext-install-deps autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c libxslt-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/31) Installing m4 (1.4.18-r1)
(2/31) Installing libbz2 (1.0.6-r7)
(3/31) Installing perl (5.28.2-r1)
(4/31) Installing autoconf (2.69-r2)
(5/31) Installing pkgconf (1.6.1-r1)
(6/31) Installing dpkg-dev (1.19.7-r0)
(7/31) Installing dpkg (1.19.7-r0)
(8/31) Installing libmagic (5.37-r1)
(9/31) Installing file (5.37-r1)
(10/31) Installing libgcc (8.3.0-r0)
(11/31) Installing libstdc++ (8.3.0-r0)
(12/31) Installing binutils (2.32-r0)
(13/31) Installing gmp (6.1.2-r1)
(14/31) Installing isl (0.18-r0)
(15/31) Installing libgomp (8.3.0-r0)
(16/31) Installing libatomic (8.3.0-r0)
(17/31) Installing mpfr3 (3.1.5-r1)
(18/31) Installing mpc1 (1.1.0-r0)
(19/31) Installing gcc (8.3.0-r0)
(20/31) Installing musl-dev (1.1.22-r3)
(21/31) Installing libc-dev (0.7.1-r0)
(22/31) Installing g++ (8.3.0-r0)
(23/31) Installing make (4.2.1-r2)
(24/31) Installing re2c (1.1.1-r0)
(25/31) Installing libgpg-error (1.36-r2)
(26/31) Installing libgcrypt (1.8.5-r0)
(27/31) Installing libxslt (1.1.33-r2)
(28/31) Installing zlib-dev (1.2.11-r1)
(29/31) Installing libxml2-dev (2.9.9-r2)
(30/31) Installing libxslt-dev (1.1.33-r2)
(31/31) Installing .php-ext-install-deps (20191202.202353)
Executing busybox-1.30.1-r2.trigger
OK: 230 MiB in 62 packages
+ nproc
+ docker-php-ext-install -j4 xsl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/1) Installing .phpize-deps (20191202.202400)
OK: 230 MiB in 63 packages
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20190902
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to build with XSL support... yes, shared
checking for libxslt >= 1.1.0... yes
checking for libexslt... yes
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -o php_xsl.lo
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -o xsltprocessor.lo
mkdir .libs
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -fPIC -DPIC -o .libs/php_xsl.o
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -fPIC -DPIC -o .libs/xsltprocessor.o
/bin/sh /usr/src/php/ext/xsl/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--hash-style=both -pie -o xsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php/ext/xsl/modules php_xsl.lo xsltprocessor.lo -lxslt -lxml2 -lexslt -lxslt -lgcrypt -lgpg-error -lxml2
cc -shared .libs/php_xsl.o .libs/xsltprocessor.o -lexslt -lxslt -lgcrypt -lgpg-error -lxml2 -Wl,-O1 -Wl,--hash-style=both -Wl,-soname -Wl,xsl.so -o .libs/xsl.so
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgcrypt
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgpg-error
collect2: error: ld returned 1 exit status
make: *** [Makefile:199: xsl.la] Error 1
Removing intermediate container af5f8a91a9b5
The command '/bin/sh -c set -xe; apk --update add --no-cache --virtual .php-ext-install-deps $PHPIZE_DEPS libxslt-dev && docker-php-ext-install -j$(nproc) xsl && docker-php-source delete && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && apk add --no-cache $runDeps && apk del --no-network .php-ext-install-deps' returned a non-zero code: 2
Output for php:7.4.0-fpm-alpine
Sending build context to Docker daemon 532B
Step 1/2 : FROM php:7.4.0-zts-alpine
7.4.0-zts-alpine: Pulling from library/php
Digest: sha256:9d67ae7b8005879a3ae36e9d749819a2d19169759b3f8ee6c92f4fe3eda56549
Status: Image is up to date for php:7.4.0-zts-alpine
---> 9fed91274b50
Step 2/2 : RUN set -xe; apk --update add --no-cache --virtual .php-ext-install-deps $PHPIZE_DEPS libxslt-dev && docker-php-ext-install -j$(nproc) xsl && docker-php-source delete && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && apk add --no-cache $runDeps && apk del --no-network .php-ext-install-deps
---> Running in 8f411d5958f0
+ apk --update add --no-cache --virtual .php-ext-install-deps autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c libxslt-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/31) Installing m4 (1.4.18-r1)
(2/31) Installing libbz2 (1.0.6-r7)
(3/31) Installing perl (5.28.2-r1)
(4/31) Installing autoconf (2.69-r2)
(5/31) Installing pkgconf (1.6.1-r1)
(6/31) Installing dpkg-dev (1.19.7-r0)
(7/31) Installing dpkg (1.19.7-r0)
(8/31) Installing libmagic (5.37-r1)
(9/31) Installing file (5.37-r1)
(10/31) Installing libgcc (8.3.0-r0)
(11/31) Installing libstdc++ (8.3.0-r0)
(12/31) Installing binutils (2.32-r0)
(13/31) Installing gmp (6.1.2-r1)
(14/31) Installing isl (0.18-r0)
(15/31) Installing libgomp (8.3.0-r0)
(16/31) Installing libatomic (8.3.0-r0)
(17/31) Installing mpfr3 (3.1.5-r1)
(18/31) Installing mpc1 (1.1.0-r0)
(19/31) Installing gcc (8.3.0-r0)
(20/31) Installing musl-dev (1.1.22-r3)
(21/31) Installing libc-dev (0.7.1-r0)
(22/31) Installing g++ (8.3.0-r0)
(23/31) Installing make (4.2.1-r2)
(24/31) Installing re2c (1.1.1-r0)
(25/31) Installing libgpg-error (1.36-r2)
(26/31) Installing libgcrypt (1.8.5-r0)
(27/31) Installing libxslt (1.1.33-r2)
(28/31) Installing zlib-dev (1.2.11-r1)
(29/31) Installing libxml2-dev (2.9.9-r2)
(30/31) Installing libxslt-dev (1.1.33-r2)
(31/31) Installing .php-ext-install-deps (20191202.202411)
Executing busybox-1.30.1-r2.trigger
OK: 230 MiB in 62 packages
+ nproc
+ docker-php-ext-install -j4 xsl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/1) Installing .phpize-deps (20191202.202419)
OK: 230 MiB in 63 packages
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-zts-20190902
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... yes
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to build with XSL support... yes, shared
checking for libxslt >= 1.1.0... yes
checking for libexslt... yes
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -o php_xsl.lo
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -o xsltprocessor.lo
mkdir .libs
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -fPIC -DPIC -o .libs/php_xsl.o
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -fPIC -DPIC -o .libs/xsltprocessor.o
/bin/sh /usr/src/php/ext/xsl/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--hash-style=both -pie -o xsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php/ext/xsl/modules php_xsl.lo xsltprocessor.lo -lxslt -lxml2 -lexslt -lxslt -lgcrypt -lgpg-error -lxml2
cc -shared .libs/php_xsl.o .libs/xsltprocessor.o -lexslt -lxslt -lgcrypt -lgpg-error -lxml2 -Wl,-O1 -Wl,--hash-style=both -Wl,-soname -Wl,xsl.so -o .libs/xsl.so
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgcrypt
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgpg-error
collect2: error: ld returned 1 exit status
make: *** [Makefile:199: xsl.la] Error 1
Removing intermediate container 8f411d5958f0
The command '/bin/sh -c set -xe; apk --update add --no-cache --virtual .php-ext-install-deps $PHPIZE_DEPS libxslt-dev && docker-php-ext-install -j$(nproc) xsl && docker-php-source delete && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && apk add --no-cache $runDeps && apk del --no-network .php-ext-install-deps' returned a non-zero code: 2
Do you have any idea how to fix this?
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgcrypt
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgpg-error
collect2: error: ld returned 1 exit status
Adding libgcrypt-dev fixes it
FROM php:7.4.0-fpm-alpine
## Install PHP extensions
RUN set -xe; \
\
apk --update add --no-cache --virtual .php-ext-install-deps \
$PHPIZE_DEPS \
# xsl deps
libxslt-dev \
libgcrypt-dev \
\
&& docker-php-ext-install -j$(nproc) \
xsl \
&& docker-php-source delete \
\
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --no-cache $runDeps \
\
&& apk del --no-network .php-ext-install-deps
$ docker build . -t php:test
Sending build context to Docker daemon 2.56kB
Step 1/2 : FROM php:7.4.0-fpm-alpine
---> c6d45e0eb6ac
Step 2/2 : RUN set -xe; apk --update add --no-cache --virtual .php-ext-install-deps $PHPIZE_DEPS libxslt-dev libgcrypt-dev && docker-php-ext-install -j$(nproc) xsl && docker-php-source delete && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && apk add --no-cache $runDeps && apk del --no-network .php-ext-install-deps
---> Running in 5f415bae59cf
+ apk --update add --no-cache --virtual .php-ext-install-deps autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c libxslt-dev libgcrypt-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/33) Installing m4 (1.4.18-r1)
(2/33) Installing libbz2 (1.0.6-r7)
(3/33) Installing perl (5.28.2-r1)
(4/33) Installing autoconf (2.69-r2)
(5/33) Installing pkgconf (1.6.1-r1)
(6/33) Installing dpkg-dev (1.19.7-r0)
(7/33) Installing dpkg (1.19.7-r0)
(8/33) Installing libmagic (5.37-r1)
(9/33) Installing file (5.37-r1)
(10/33) Installing libgcc (8.3.0-r0)
(11/33) Installing libstdc++ (8.3.0-r0)
(12/33) Installing binutils (2.32-r0)
(13/33) Installing gmp (6.1.2-r1)
(14/33) Installing isl (0.18-r0)
(15/33) Installing libgomp (8.3.0-r0)
(16/33) Installing libatomic (8.3.0-r0)
(17/33) Installing mpfr3 (3.1.5-r1)
(18/33) Installing mpc1 (1.1.0-r0)
(19/33) Installing gcc (8.3.0-r0)
(20/33) Installing musl-dev (1.1.22-r3)
(21/33) Installing libc-dev (0.7.1-r0)
(22/33) Installing g++ (8.3.0-r0)
(23/33) Installing make (4.2.1-r2)
(24/33) Installing re2c (1.1.1-r0)
(25/33) Installing libgpg-error (1.36-r2)
(26/33) Installing libgcrypt (1.8.5-r0)
(27/33) Installing libxslt (1.1.33-r2)
(28/33) Installing zlib-dev (1.2.11-r1)
(29/33) Installing libxml2-dev (2.9.9-r2)
(30/33) Installing libxslt-dev (1.1.33-r2)
(31/33) Installing libgpg-error-dev (1.36-r2)
(32/33) Installing libgcrypt-dev (1.8.5-r0)
(33/33) Installing .php-ext-install-deps (20191202.225917)
Executing busybox-1.30.1-r2.trigger
OK: 230 MiB in 64 packages
+ nproc
+ docker-php-ext-install -j8 xsl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/1) Installing .phpize-deps (20191202.225930)
OK: 230 MiB in 65 packages
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20190902
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to build with XSL support... yes, shared
checking for libxslt >= 1.1.0... yes
checking for libexslt... yes
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -o php_xsl.lo
/bin/sh /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -o xsltprocessor.lo
mkdir .libs
mkdir .libs
mkdir: can't create directory '.libs': File exists
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -fPIC -DPIC -o .libs/xsltprocessor.o
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -fPIC -DPIC -o .libs/php_xsl.o
/bin/sh /usr/src/php/ext/xsl/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--hash-style=both -pie -o xsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php/ext/xsl/modules php_xsl.lo xsltprocessor.lo -lxslt -lxml2 -lexslt -lxslt -lgcrypt -lgpg-error -lxml2
cc -shared .libs/php_xsl.o .libs/xsltprocessor.o -lexslt -lxslt -lgcrypt -lgpg-error -lxml2 -Wl,-O1 -Wl,--hash-style=both -Wl,-soname -Wl,xsl.so -o .libs/xsl.so
creating xsl.la
(cd .libs && rm -f xsl.la && ln -s ../xsl.la xsl.la)
/bin/sh /usr/src/php/ext/xsl/libtool --mode=install cp ./xsl.la /usr/src/php/ext/xsl/modules
cp ./.libs/xsl.so /usr/src/php/ext/xsl/modules/xsl.so
cp ./.libs/xsl.lai /usr/src/php/ext/xsl/modules/xsl.la
PATH="$PATH:/sbin" ldconfig -n /usr/src/php/ext/xsl/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/src/php/ext/xsl/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la modules/* libs/*
WARNING: Ignoring APKINDEX.00740ba1.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.d8b2a6f4.tar.gz: No such file or directory
(1/1) Purging .phpize-deps (20191202.225930)
OK: 230 MiB in 64 packages
+ docker-php-source delete
+ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local
+ tr , '\n'
+ sort -u
+ awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }'
+ runDeps='so:libargon2.so.1
so:libc.musl-x86_64.so.1
so:libcrypto.so.1.1
so:libcurl.so.4
so:libedit.so.0
so:libexslt.so.0
so:libonig.so.5
so:libsodium.so.23
so:libsqlite3.so.0
so:libssl.so.1.1
so:libxml2.so.2
so:libxslt.so.1
so:libz.so.1'
+ apk add --no-cache so:libargon2.so.1 so:libc.musl-x86_64.so.1 so:libcrypto.so.1.1 so:libcurl.so.4 so:libedit.so.0 so:libexslt.so.0 so:libonig.so.5 so:libsodium.so.23 so:libsqlite3.so.0 so:libssl.so.1.1 so:libxml2.so.2 so:libxslt.so.1 so:libz.so.1
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
OK: 230 MiB in 64 packages
+ apk del --no-network .php-ext-install-deps
WARNING: Ignoring APKINDEX.00740ba1.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.d8b2a6f4.tar.gz: No such file or directory
(1/30) Purging .php-ext-install-deps (20191202.225917)
(2/30) Purging autoconf (2.69-r2)
(3/30) Purging m4 (1.4.18-r1)
(4/30) Purging dpkg-dev (1.19.7-r0)
(5/30) Purging perl (5.28.2-r1)
(6/30) Purging dpkg (1.19.7-r0)
(7/30) Purging file (5.37-r1)
(8/30) Purging g++ (8.3.0-r0)
(9/30) Purging gcc (8.3.0-r0)
(10/30) Purging binutils (2.32-r0)
(11/30) Purging libatomic (8.3.0-r0)
(12/30) Purging libgomp (8.3.0-r0)
(13/30) Purging libc-dev (0.7.1-r0)
(14/30) Purging musl-dev (1.1.22-r3)
(15/30) Purging make (4.2.1-r2)
(16/30) Purging re2c (1.1.1-r0)
(17/30) Purging libxslt-dev (1.1.33-r2)
(18/30) Purging libgcrypt-dev (1.8.5-r0)
(19/30) Purging libbz2 (1.0.6-r7)
(20/30) Purging libgpg-error-dev (1.36-r2)
(21/30) Purging libxml2-dev (2.9.9-r2)
(22/30) Purging zlib-dev (1.2.11-r1)
(23/30) Purging pkgconf (1.6.1-r1)
(24/30) Purging libmagic (5.37-r1)
(25/30) Purging libstdc++ (8.3.0-r0)
(26/30) Purging libgcc (8.3.0-r0)
(27/30) Purging mpc1 (1.1.0-r0)
(28/30) Purging mpfr3 (3.1.5-r1)
(29/30) Purging isl (0.18-r0)
(30/30) Purging gmp (6.1.2-r1)
Executing busybox-1.30.1-r2.trigger
OK: 21 MiB in 34 packages
Removing intermediate container 5f415bae59cf
---> ca71f0e318cc
Successfully built ca71f0e318cc
Successfully tagged php:test
@wglambert Thanks for your quick help. :)
Most helpful comment
Adding libgcrypt-dev fixes it