As far as we can see, the ltmain.sh from /usr/lib64/php7.X/lib/build/ is used as source to build the libtool script in a source directory when running # configure --with-php-config=/usr/bin/php-config Since the ltmain.sh in /usr/lib64/php7.{0,1,2}/lib/build/ is version 1.5 based, 'make' later fail since options used by make expects another libtool than 1.5, presumingly a version 2 which is system default. This is evident for e.g. pecl. It seems that most (all?) pecl installs fails when using a php7 version. The typical error is, using pecl protobuf as example: # pecl install protobuf [...] running: make /bin/sh /tmp/pear-build-rootdWrzgt/protobuf-3.6.1/libtool --mode=compile cc -I. -I/tmp/protobuf -DPHP_ATOM_INC -I/tmp/pear-build-rootdWrzgt/protobuf-3.6.1/include -I/tmp/pear-build-rootdWrzgt/protobuf-3.6.1/main -I/tmp/protobuf -I/usr/lib64/php7.2/include/php -I/usr/lib64/php7.2/include/php/main -I/usr/lib64/php7.2/include/php/TSRM -I/usr/lib64/php7.2/include/php/Zend -I/usr/lib64/php7.2/include/php/ext -I/usr/lib64/php7.2/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/protobuf/array.c -o array.lo /tmp/pear-build-rootdWrzgt/protobuf-3.6.1/libtool: line 934: X--mode=compile: command not found /tmp/pear-build-rootdWrzgt/protobuf-3.6.1/libtool: line 1101: *** Warning: inferring the mode of operation is deprecated.: command not found /tmp/pear-build-rootdWrzgt/protobuf-3.6.1/libtool: line 1102: *** Future versions of Libtool will require --mode=MODE be specified.: command not found [...] It seems that this problem only affects php7 packages: # ls -l /usr/share/libtool/build-aux/ltmain.sh /usr/lib64/php*/lib/build/ltmain.sh -rw-r--r-- 1 root root 325923 sep. 17 14:37 /usr/lib64/php5.6/lib/build/ltmain.sh -rw-r--r-- 1 root root 199728 sep. 17 14:29 /usr/lib64/php7.0/lib/build/ltmain.sh -rw-r--r-- 1 root root 199728 sep. 17 14:44 /usr/lib64/php7.1/lib/build/ltmain.sh -rw-r--r-- 1 root root 199728 okt. 25 11:32 /usr/lib64/php7.2/lib/build/ltmain.sh -rw-r--r-- 1 root root 325440 okt. 24 18:16 /usr/share/libtool/build-aux/ltmain.sh When overwriting the php-supplied ltmain.sh file in /usr/lib64/php7.{0,1,2}/lib/build/ with the default from sys-devel/libtool the problem goes away: # mv /usr/lib64/php7.2/lib/build/ltmain.sh /usr/lib64/php7.2/lib/build/ltmain.sh.prev # cp /usr/share/libtool/build-aux/ltmain.sh /usr/lib64/php7.2/lib/build/ltmain.sh "pecl install protoful" now runs successfully. Presumingly, the ltmain.sh files in the 7.x php needs to be updated. (Or linked to the /usr/share/libtool/build-aux/ltmain.sh file?)
This likely needs elibtoolize run. Need to test things.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d700bd2e4b7ab2dd6874044ce2e60495dc1f1075 commit d700bd2e4b7ab2dd6874044ce2e60495dc1f1075 Author: Brian Evans <grknight@gentoo.org> AuthorDate: 2018-10-25 15:03:27 +0000 Commit: Brian Evans <grknight@gentoo.org> CommitDate: 2018-10-25 15:03:27 +0000 dev-lang/php: Always call elibtoolize Certain functions of external commands, like pecl, may use an older libtool which is included with PHP. Now we always have an updated ltmain.sh by calling elibtoolize Bug: https://bugs.gentoo.org/669566 Signed-off-by: Brian Evans <grknight@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 dev-lang/php/php-7.1.23.ebuild | 7 ++++++- dev-lang/php/php-7.2.11.ebuild | 7 ++++++- dev-lang/php/php-7.3.0_rc3.ebuild | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-)
Unstable builds set to always call elibtoolize so this is no longer an issue. 7.0 is going away in a few months. Will close this bug when all are stable and no issues reported