mlocati / docker-php-extension-installer

Easily install PHP extensions in Docker containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ddtrace installation fails when adding a version to the module name.

takamichi opened this issue · comments

Version of install-php-extensions

2.1.8.2

Error description

When attempting to install 'datadog_trace' with a specified version, an error occurs.

checking for cargo... no
configure: error: Please install cargo before configuring, or specify it with --with-ddtrace-cargo=
ERROR: `/tmp/pear/temp/datadog_trace/configure --with-php-config=/usr/local/bin/php-config' failed

full log
[internal] load build definition from Dockerfile
	transferring 210/0 0.004
[internal] load metadata for docker.io/mlocati/php-extension-installer:latest
[internal] load metadata for docker.io/library/php:8.2.15-fpm-bookworm
[internal] load .dockerignore
	transferring 2/0 0.002
FROM docker.io/mlocati/php-extension-installer:latest@sha256:9017aa1db5dc66f39966610787b8b54452779e86cf8fe468655611d77bcf6e2b
	resolve docker.io/mlocati/php-extension-installer:latest@sha256:9017aa1db5dc66f39966610787b8b54452779e86cf8fe468655611d77bcf6e2b 0/0 0.007
	done 525/525 -0.518
	done 891/891 -0.046
	done 30720/30720 0.401
	extract 0/0 0.001
[stage-0 1/3] FROM docker.io/library/php:8.2.15-fpm-bookworm
[stage-0 2/3] COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
[stage-0 3/3] RUN install-php-extensions datadog_trace-0.97.0
	install-php-extensions v.2.1.82
	#StandWithUkraine
	Updating channel "pecl.php.net"
	Channel "pecl.php.net" is up to date
	Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
	Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
	Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
	Get:4 http://deb.debian.org/debian bookworm/main arm64 Packages [8685 kB]
	Get:5 http://deb.debian.org/debian bookworm-updates/main arm64 Packages [12.5 kB]
	Get:6 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [134 kB]
	Fetched 9083 kB in 1s (8324 kB/s)
	Reading package lists...
	### INSTALLING REQUIRED PACKAGES ###
	# Packages to be kept after installation:
	# Packages to be used only for installation: libcurl4-openssl-dev
	debconf: delaying package configuration, since apt-utils is not installed
	Selecting previously unselected package libcurl4-openssl-dev:arm64.
	(Reading database ...(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%
(Reading database ... 13280 files and directories currently installed.)
	Preparing to unpack .../libcurl4-openssl-dev_7.88.1-10+deb12u5_arm64.deb ...
	Unpacking libcurl4-openssl-dev:arm64 (7.88.1-10+deb12u5) ...
	Setting up libcurl4-openssl-dev:arm64 (7.88.1-10+deb12u5) ...
	### INSTALLING REMOTE MODULE ddtrace ###
	(installing version 0.97.0)
	downloading datadog_trace-0.97.0.tgz ...
	Starting to download datadog_trace-0.97.0.tgz (776,894 bytes)
	..........................................................................................................................................................done: 776,894 bytes
	330 source files, building
	running: phpize
	Configuring for:
	PHP Api Version:         20220829
	Zend Module Api No:      20220829
	Zend Extension Api No:   420220829
	building in /tmp/pear/temp/pear-build-defaultuser8TnU5H/datadog_trace-0.97.0
	running: /tmp/pear/temp/datadog_trace/configure --with-php-config=/usr/local/bin/php-config
	checking for grep that handles long lines and -e... /usr/bin/grep
	checking for egrep... /usr/bin/grep -E
	checking for a sed that does not truncate output... /usr/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 the compiler supports GNU C... yes
	checking whether cc accepts -g... yes
	checking for cc option to enable C11 features... 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 -Wl,-rpath,... yes
	checking build system type... aarch64-unknown-linux-gnu
	checking host system type... aarch64-unknown-linux-gnu
	checking target system type... aarch64-unknown-linux-gnu
	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-20220829
	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... nawk
	checking if nawk is broken... no
	checking whether to enable Datadog tracing support... yes, shared
	checking whether to enable AddressSanitizer for ddtrace... no
	checking where cargo is located for rust code compilation... cargo
	checking whether to compile rust in debug mode... no
	checking whether to keep rust debug symbols... yes
	checking for stdio.h... yes
	checking for stdlib.h... yes
	checking for string.h... yes
	checking for inttypes.h... yes
	checking for stdint.h... yes
	checking for strings.h... yes
	checking for sys/stat.h... yes
	checking for sys/types.h... yes
	checking for unistd.h... yes
	checking size of long... 8
	checking for 64-bit platform... yes
	checking for execinfo.h... yes
	checking size parameter type for backtrace()... int
	checking for library containing backtrace... none required
	checking for backtrace in -lexecinfo... no
	checking for linux/securebits.h... yes
	checking for linux/capability.h... yes
	checking for objdir... .libs
	checking for cargo... no
	configure: error: Please install cargo before configuring, or specify it with --with-ddtrace-cargo=
	ERROR: `/tmp/pear/temp/datadog_trace/configure --with-php-config=/usr/local/bin/php-config' failed

Docker image

php:8.2.15-fpm-bookworm

Minimal Dockerfile

FROM php:8.2.15-fpm-bookworm

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

RUN install-php-extensions datadog_trace-0.97.0