Dockerfile
Dockerfile copied to clipboard
gmp in webdevops
I'm trying to install the gmp module for PHP by doing as suggested in #413 Works like a charm locally, but when I'm building the project in Jenkins it fails with an "operation not permitted" error.
Docker version used by Jenkins:
Client:
Version: 18.09.9
API version: 1.39
Go version: go1.11.13
Git commit: 039a7df9ba
Built: Wed Sep 4 16:51:21 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.9
API version: 1.39 (minimum version 1.12)
Go version: go1.11.13
Git commit: 039a7df
Built: Wed Sep 4 16:22:32 2019
OS/Arch: linux/amd64
Experimental: false
Operation not permitted trace:
[INFO] Step 6/16 : RUN docker-php-ext-install gmp
[INFO]
[INFO] ---> Running in bbdbf162f223
[INFO] fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
[INFO] fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
[INFO] fetch https://dl-4.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
[INFO] (1/22) Installing m4 (1.4.19-r1)
[INFO] (2/22) Installing perl (5.34.1-r0)
[INFO] (3/22) Installing autoconf (2.71-r0)
[INFO] (4/22) Installing dpkg-dev (1.21.8-r0)
[INFO] (5/22) Installing dpkg (1.21.8-r0)
[INFO] (6/22) Installing libmagic (5.41-r0)
[INFO] (7/22) Installing file (5.41-r0)
[INFO] (8/22) Installing binutils (2.38-r3)
[INFO] (9/22) Installing libatomic (11.2.1_git20220219-r2)
[INFO] (10/22) Installing isl22 (0.22-r0)
[INFO] (11/22) Installing mpfr4 (4.1.0-r0)
[INFO] (12/22) Installing mpc1 (1.2.1-r0)
[INFO] (13/22) Installing gcc (11.2.1_git20220219-r2)
[INFO] (14/22) Installing musl-dev (1.2.3-r0)
[INFO] (15/22) Installing libc-dev (0.7.2-r3)
[INFO] (16/22) Installing g++ (11.2.1_git20220219-r2)
[INFO] (17/22) Installing make (4.3-r0)
[INFO] (18/22) Installing re2c (2.1.1-r0)
[INFO] (19/22) Installing .phpize-deps (20220726.064746)
[INFO] (20/22) Installing perl-error (0.17029-r1)
[INFO] (21/22) Installing perl-git (2.36.2-r0)
[INFO] (22/22) Installing git-perl (2.36.2-r0)
[INFO] Executing busybox-1.35.0-r16.trigger
[INFO] OK: 544 MiB in 195 packages
[INFO] Configuring for:
[INFO] PHP Api Version: 20200930
[INFO] Zend Module Api No: 20200930
[INFO] Zend Extension Api No: 420200930
[INFO] [91mconfigure.ac:18: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
[INFO] build/php.m4:2072: PHP_CONFIG_NICE is expanded from...
[INFO] configure.ac:18: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: The macro `AC_LANG_C' is obsolete.
[INFO] configure.ac:161: You should run autoupdate.
[INFO] ./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
[INFO] build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: The macro `AC_LANG_C' is obsolete.
[INFO] configure.ac:161: You should run autoupdate.
[INFO] ./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
[INFO] lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
[INFO] lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
[INFO] ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
[INFO] ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
[INFO] build/libtool.m4:561: _LT_AC_LOCK is expanded from...
[INFO] build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
[INFO] build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: The macro `AC_TRY_LINK' is obsolete.
[INFO] configure.ac:161: You should run autoupdate.
[INFO] ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
[INFO] lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
[INFO] lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
[INFO] ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
[INFO] ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
[INFO] build/libtool.m4:561: _LT_AC_LOCK is expanded from...
[INFO] build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
[INFO] build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
[INFO] build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
[INFO] build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
[INFO] build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
[INFO] build/libtool.m4:2728: _LT_AC_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:2727: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not exist
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not look like a libtool script
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: back quotes and double quotes must not be escaped in: tag name \"$tagname\" already exists
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
[INFO] configure.ac:161: You should run autoupdate.
[INFO] ./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
[INFO] build/libtool.m4:2810: _LT_AC_LANG_CXX_CONFIG is expanded from...
[INFO] build/libtool.m4:2809: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] [91mconfigure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
[INFO] build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
[INFO] build/libtool.m4:2810: _LT_AC_LANG_CXX_CONFIG is expanded from...
[INFO] build/libtool.m4:2809: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
[INFO] build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
[INFO] build/libtool.m4:2810: _LT_AC_LANG_CXX_CONFIG is expanded from...
[INFO] build/libtool.m4:2809: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
[INFO] build/libtool.m4:1918: _LT_AC_TAGCONFIG is expanded from...
[INFO] build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
[INFO] build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
[INFO] build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
[INFO] configure.ac:161: the top level
[INFO] [0m
[INFO] checking for grep that handles long lines and -e...
[INFO] /bin/grep
[INFO] checking for egrep...
[INFO] /bin/grep -E
[INFO] checking for a sed that does not truncate output...
[INFO] /bin/sed
[INFO] checking for pkg-config...
[INFO] /usr/bin/pkg-config
[INFO] checking pkg-config is at least version 0.9.0...
[INFO] yes
[INFO] checking for cc... cc
[INFO] checking whether the C compiler works...
[INFO] yes
[INFO] checking for C compiler default output file name... a.out
[INFO] checking for suffix of executables...
[INFO]
[INFO] checking whether we are cross compiling...
[INFO] no
[INFO] checking for suffix of object files...
[INFO] o
[INFO] checking whether the compiler supports GNU C...
[INFO] yes
[INFO] checking whether cc accepts -g...
[INFO] yes
[INFO] checking for cc option to enable C11 features...
[INFO] none needed
[INFO] checking how to run the C preprocessor...
[INFO] cc -E
[INFO] checking for icc...
[INFO] no
[INFO] checking for suncc...
[INFO] no
[INFO] checking for system library directory...
[INFO] lib
[INFO] checking if compiler supports -Wl,-rpath,...
[INFO] yes
[INFO] checking build system type...
[INFO] x86_64-pc-linux-musl
[INFO] checking host system type... x86_64-pc-linux-musl
[INFO] checking target system type...
[INFO] x86_64-pc-linux-musl
[INFO] checking for PHP prefix...
[INFO] /usr/local
[INFO] checking for PHP includes...
[INFO] -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
[INFO] checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20200930
[INFO] checking for PHP installed headers prefix...
[INFO] /usr/local/include/php
[INFO] checking if debug is enabled...
[INFO] no
[INFO] checking if zts is enabled...
[INFO] no
[INFO] checking for gawk...
[INFO] no
[INFO] checking for nawk...
[INFO] no
[INFO] checking for awk... awk
[INFO] checking if awk is broken...
[INFO] no
[INFO] checking for GNU MP support...
[INFO] yes, shared
[INFO] checking for __gmpz_rootrem in -lgmp...
[INFO] yes
[INFO] checking for a sed that does not truncate output...
[INFO] /bin/sed
[INFO] checking for ld used by cc...
[INFO] /usr/x86_64-alpine-linux-musl/bin/ld
[INFO] checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld...
[INFO] yes
[INFO] checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
[INFO] checking for BSD-compatible nm...
[INFO] /usr/bin/nm -B
[INFO] checking whether ln -s works... yes
[INFO] checking how to recognize dependent libraries...
[INFO] pass_all
[INFO] checking for stdio.h...
[INFO] yes
[INFO] checking for stdlib.h...
[INFO] yes
[INFO] checking for string.h...
[INFO] yes
[INFO] checking for inttypes.h...
[INFO] yes
[INFO] checking for stdint.h...
[INFO] yes
[INFO] checking for strings.h...
[INFO] yes
[INFO] checking for sys/stat.h...
[INFO] yes
[INFO] checking for sys/types.h...
[INFO] yes
[INFO] checking for unistd.h...
[INFO] yes
[INFO] checking for dlfcn.h...
[INFO] yes
[INFO] checking the maximum length of command line arguments...
[INFO] 98304
[INFO] checking command to parse /usr/bin/nm -B output from cc object...
[INFO] ok
[INFO] checking for objdir...
[INFO] .libs
[INFO] checking for ar...
[INFO] ar
[INFO] checking for ranlib... ranlib
[INFO] checking for strip...
[INFO] strip
[INFO] checking if cc supports -fno-rtti -fno-exceptions...
[INFO] no
[INFO] checking for cc option to produce PIC...
[INFO] -fPIC
[INFO] checking if cc PIC flag -fPIC works...
[INFO] yes
[INFO] checking if cc static flag -static works...
[INFO] yes
[INFO] checking if cc supports -c -o file.o...
[INFO] yes
[INFO] checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries...
[INFO] yes
[INFO] checking whether -lc should be explicitly linked in...
[INFO] no
[INFO] checking dynamic linker characteristics...
[INFO] GNU/Linux ld.so
[INFO] checking how to hardcode library paths into programs... immediate
[INFO] checking whether stripping libraries is possible...
[INFO] yes
[INFO] checking if libtool supports shared libraries... yes
[INFO] checking whether to build shared libraries... yes
[INFO] checking whether to build static libraries... no
[INFO]
[INFO] creating libtool
[INFO] appending configuration tag "CXX" to libtool
[INFO] configure: patching config.h.in
[INFO] configure: creating ./config.status
[INFO] config.status: creating config.h
[INFO] [91mmake: /bin/sh: Operation not permitted
[INFO] make: *** [Makefile:209: gmp.lo] Error 127
[INFO] [0m
[INFO] /bin/sh /usr/src/php/ext/gmp/libtool --mode=compile cc -I. -I/usr/src/php/ext/gmp -I/usr/src/php/ext/gmp/include -I/usr/src/php/ext/gmp/main -I/usr/src/php/ext/gmp -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 -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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/src/php/ext/gmp/gmp.c -o gmp.lo
Do you have any plans on including some of these more common modules such as gmp by default?
I won't say that there was the same problem, but something very similar with php8.3-fpm. There I solved it with the apt-get install libgmp-dev command.