oci8/pdo_oci (and imap) have been moved to PECL
mvorisek opened this issue · 6 comments
Version of install-php-extensions
latest
Error description
related with php/php-src#13327
please see the minimal repro Dockerfile below
it currently fails with:
#10 93.28 ### INSTALLING REMOTE MODULE oci8 ###
#10 95.32 downloading oci8-3.3.0.tgz ...
#10 95.32 Starting to download oci8-3.3.0.tgz (191,561 bytes)
#10 95.32 .........................................done: 191,561 bytes
#10 95.68 13 source files, building
#10 95.68 running: phpize
#10 95.69 Configuring for:
#10 95.69 PHP Version: 8.4
#10 95.69 PHP Api Version: 20230901
#10 95.69 Zend Module Api No: 20230901
#10 95.69 Zend Extension Api No: 420230901
#10 96.19 Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : building in /tmp/pear/temp/pear-build-defaultuserR6sXnr/oci8-3.3.0
#10 96.19 running: /tmp/pear/temp/oci8/configure --with-php-config=/usr/local/bin/php-config --with-oci8
#10 96.28 checking for grep that handles long lines and -e... /usr/bin/grep
#10 96.28 checking for egrep... /usr/bin/grep -E
#10 96.28 checking for a sed that does not truncate output... /usr/bin/sed
#10 96.29 checking for pkg-config... /usr/bin/pkg-config
#10 96.29 checking pkg-config is at least version 0.9.0... yes
#10 96.30 checking for cc... cc
#10 96.35 checking whether the C compiler works... yes
#10 96.35 checking for C compiler default output file name... a.out
#10 96.38 checking for suffix of executables...
#10 96.42 checking whether we are cross compiling... no
#10 96.44 checking for suffix of object files... o
#10 96.45 checking whether the compiler supports GNU C... yes
#10 96.47 checking whether cc accepts -g... yes
#10 96.51 checking for cc option to enable C11 features... none needed
#10 96.54 checking how to run the C preprocessor... cc -E
#10 96.57 checking for icc... no
#10 96.58 checking for suncc... no
#10 96.58 checking for system library directory... lib
#10 96.61 checking if compiler supports -Wl,-rpath,... yes
#10 96.66 checking build system type... x86_64-pc-linux-gnu
#10 96.66 checking host system type... x86_64-pc-linux-gnu
#10 96.66 checking target system type... x86_64-pc-linux-gnu
#10 96.68 checking for PHP prefix... /usr/local
#10 96.68 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
#10 96.68 checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20230901
#10 96.68 checking for PHP installed headers prefix... /usr/local/include/php
#10 96.69 checking if debug is enabled... no
#10 96.71 checking if zts is enabled... no
#10 96.71 checking for gawk... no
#10 96.71 checking for nawk... nawk
#10 96.71 checking if nawk is broken... no
#10 96.71 checking for Oracle Database OCI8 support... yes, shared
#10 96.71 checking PHP version... expr: non-integer argument
#10 96.71 /tmp/pear/temp/oci8/configure: line 4783: test: : integer expression expected
#10 96.71 /tmp/pear/temp/oci8/configure: line 4785: test: : integer expression expected
#10 96.71 /tmp/pear/temp/oci8/configure: line 4787: test: : integer expression expected
#10 96.71 /tmp/pear/temp/oci8/configure: line 4789: test: : integer expression expected
#10 96.71 CUSTOM--master--10957e498c5eb8600c7289e3ee1101066e49dd1b, ok
#10 96.72 checking OCI8 DTrace support... no
#10 96.76 checking size of long... 8
#10 96.76 checking if we're at 64-bit platform... yes
#10 96.76 configure: WARNING: OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead
#10 96.77 checking Oracle Instant Client directory... configure: error: Oracle Instant Client directory /usr/lib/oracle/.../client64/lib libraries not found. Try --with-oci8=instantclient,DIR
#10 96.79 ERROR: `/tmp/pear/temp/oci8/configure --with-php-config=/usr/local/bin/php-config --with-oci8' failed
something needs to be probably adjusted in the installed to account for from php-src to separate repo move
also notice /.../
(triple dots???) in the path
Docker image
php:8.4
Minimal Dockerfile
FROM ghcr.io/mvorisek/image-php:8.4-debian-base
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions bcmath
RUN install-php-extensions oci8
# based on https://github.com/php/pecl-database-pdo_oci/pull/1
RUN install-php-extensions php/pecl-database-pdo_oci@33b922ace3
If
#10 96.19 running: /tmp/pear/temp/oci8/configure --with-php-config=/usr/local/bin/php-config --with-oci8
from the log above is correct, I would guess:
- https://github.com/mlocati/docker-php-extension-installer/blob/2.2.2/install-php-extensions#L2551
- and https://github.com/mlocati/docker-php-extension-installer/blob/2.2.2/install-php-extensions#L2553
lines needs to be changed* to./configure --with...
at least as the, am I right?,docker-php-ext-configure
is for bundled exts only.
update: * copied from https://github.com/mlocati/docker-php-extension-installer/blob/2.2.2/install-php-extensions#L4581 to https://github.com/mlocati/docker-php-extension-installer/blob/2.2.2/install-php-extensions#L4583
also please fix imap
ext, it was moved to separate repo as well
Is there a docker image on https://hub.docker.com/_/php that I can use to do some tests?
There is ghcr.io/mvorisek/image-php:8.4-debian-base
built based on https://github.com/docker-library/php sources from php-src master.
There is
ghcr.io/mvorisek/image-php:8.4-debian-base
built based on https://github.com/docker-library/php sources from php-src master.
Here's a sample session:
$ docker pull ghcr.io/mvorisek/image-php:8.4-debian-base
$ docker run --rm -it ghcr.io/mvorisek/image-php:8.4-debian-base bash
# docker-php-source extract
# ls -l /usr/src/php/ext | grep oci
drwxr-xr-x 3 root root 4096 Dec 15 02:36 oci8
drwxr-xr-x 3 root root 4096 Dec 15 02:36 pdo_oci
so it seems that your image still contains these two extensions as bundled with PHP...
Thank you - I probably did some other experiment in meanwhile - now the PHP 8.4 base image is updated in mvorisek/image-php@a704861 to the latest php-src master.
ext/oci8
/ ext/pdo_oci
/ ext/imap
directories are not present in the php-src source as expected.