|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74723 Cannot install --with-pear
Submitted: 2017-06-09 05:17 UTC Modified: 2017-07-06 15:10 UTC
Avg. Score:4.5 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:7 (100.0%)
Same OS:3 (42.9%)
From: smorozov at sugarcrm dot com Assigned: pollita (profile)
Status: Closed Package: *Compile Issues
PHP Version: 7.2.0alpha1 OS: Ubuntu 16.04, Ubuntu 17.10
Private report: No CVE-ID: None
 [2017-06-09 05:17 UTC] smorozov at sugarcrm dot com
When building PHP with PEAR, the following is displayed during `make install':

> Makefile:495: recipe for target 'install-pear-installer' failed
> make[1]: *** [install-pear-installer] Error 255
> Makefile:498: recipe for target 'install-pear' failed
> make: *** [install-pear] Error 2

As a result, the pear and pecl binaries are unavailable.

The same error is not reproducible with PHP 7.1.6 and was not reproducible on master a couple of weeks ago.

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-09 09:01 UTC] dev at jdoubleu dot de
Experiencing the same problem under debian jessie.

Adding the build flag '--without-pear' (temporary) solves the problem.
 [2017-06-09 11:29 UTC] dragonbe+php at gmail dot com
Same issue when compiling with default "./configure" settings

My setup:

Building a vagrant box for PHP testing

vagrant init debian/jessie64
vagrant box update
vagrant up --provider virtualbox

Enter the vagrant box

vagrant ssh

Some tools to be installed on the vagrant box using "apt"

sudo apt-get install \
  automake \
  autoconf \
  libtool \
  re2c \
  flex \
  bison \
  libxml2-dev \
  make \

Grap the public keys for PHP 7.2 from

gpg --search-keys
gpg --search-keys

Download the PHP alpha sources + signatures

curl -L -O
curl -L -O

Verify the package

gpg --verify php-7.2.0alpha1.tar.bz2.asc php-7.2.0alpha1.tar.bz2

You should see something like the following

gpg: Signature made Tue 06 Jun 2017 01:54:01 PM GMT using RSA key ID 70D12172
gpg: Good signature from "Sara Golemon <>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 1729 F839 38DA 44E2 7BA0  F4D3 DBDB 3974 70D1 2172

Don't forget to verify the fingerprint on!

Time to unpack the package

tar -xjf php-7.2.0alpha1.tar.bz2
cd php-7.2.0alpha1/

Configure PHP with the defaults

./configure && make

Time to test PHP on your system!

make test

Now install PHP system wide

sudo make install

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20160303/
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing phpdbg binary:         /usr/local/bin/
Installing phpdbg man page:       /usr/local/php/man/man1/
Installing PHP CGI binary:        /usr/local/bin/
Installing PHP CGI man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
Makefile:445: recipe for target 'install-pear-installer' failed
make[1]: *** [install-pear-installer] Error 255
Makefile:448: recipe for target 'install-pear' failed
make: *** [install-pear] Error 2

Linux jessie 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
 [2017-06-11 16:53 UTC] rainer dot jung at kippdata dot de
By increasing the log level, one can see, that executing the file pear/install-pear-nozlib.phar gives an error.

There is a new check in zend_compile.c for PHP 7.2 which results in the message "Cannot use result of built-in function in write context". That checked is triggered by line 662 in file Archive/tar.php contained in pear/install-pear-nozlib.phar:

    661         // ----- Get the arguments
    662         $v_att_list = & func_get_args();

This can be fixed by removing the "&" character

    661         // ----- Get the arguments
    662         $v_att_list = func_get_args();

See also the pull request for Archive/Tar. Please try to contact the Archive/Tar maintainer to update Archive/Tar and roll a new version to make it compatible with this new check in PHP 7.2.
 [2017-06-11 20:39 UTC] rainer dot jung at kippdata dot de
Upstream has released Archive_Tar version 1.4.3 that includes the fix today, see

It would be nice if you could update the dependency in PHP 7.2/master.

One additional hange is needed: in the top level Makefile I had to add "-dextension_dir=$(top_builddir)/modules" to PEAR_INSTALL_FLAGS. I build as a shared extension. Without this I get the error "[PEAR] xml extension is required".

Thanks and regards!
 [2017-06-22 23:54 UTC] kevin at kstich dot com
This issue persists in to 7.2a2 as noted here:
 [2017-06-24 19:04 UTC] rainer dot jung at kippdata dot de
I asked for an update of install-pear-nozlib.phar on the pear website:

I guess/hope that's the upstream for the copy in the PHP 7.2 sources.
 [2017-06-27 14:04 UTC] mail at pmmaga dot net
Seems to be fixed by
 [2017-06-29 01:44 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 [2017-06-29 01:44 UTC]
Looks to be fixed by

Please check out alpha3 when it's released on Jul 6!
 [2017-07-06 15:10 UTC] smorozov at sugarcrm dot com
Just installed php-7.2.0alpha3, the issue is fixed. Thank you.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 04:01:25 2019 UTC