php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25209 pear build fails unexpectedly
Submitted: 2003-08-22 09:25 UTC Modified: 2003-10-02 07:08 UTC
From: eru@php.net Assigned: cellog (profile)
Status: Not a bug Package: PEAR related
PHP Version: 4CVS-2003-09-19 OS: Linux RH 8 & 9
Private report: No CVE-ID: None
 [2003-08-22 09:25 UTC] eru@php.net
Description:
------------
pear build/install will fail with almost every PECL out there, because of two misplaced !s.

Diff:
--- Builder.php.orig    Fri Aug 22 10:57:54 2003
+++ Builder.php Fri Aug 22 16:21:47 2003
@@ -201,8 +201,7 @@
         $err = $this->_runCommand("phpize", array(&$this, 'phpizeCallback'));
         if (PEAR::isError($err)) {
             return $err;
-        }
-        if (!$err) {
+        } elseif ($err) {
             return $this->raiseError("`phpize' failed");
         }
 
@@ -255,8 +254,7 @@
             if (PEAR::isError($err)) {
                 chdir($old_cwd);
                 return $err;
-            }
-            if (!$err) {
+            } elseif ($err) {
                 chdir($old_cwd);
                 return $this->raiseError("`$cmd' failed");
             }

So either we have a PHP_Error, or some error-code is in $err, or everything is fine and the show can go on...

With this patch it works again...



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-25 13:13 UTC] cellog@php.net
This patch actually broke pear install cybercash and pear install xdebug, I'm running Redhat Linux 9 with PHP 4.3.2 and PEAR 1.2.1.  I had to keep the !$err

Could you provide sample output for a failed install, and what OS you're running?

Greg
 [2003-08-27 05:00 UTC] eru@php.net
I just ran pear install xdebug, no problems there...

_runCommand returns ($exitcode == 0) as default

A failed install ends in

running: phpize
autoheader: `config.h.in' is created
Configuring for:
  PHP Api Version:   20020918
  Zend Module Api No:   20020429
  Zend Extension Api No:   20021010
`phpize' failed
 [2003-08-27 13:34 UTC] cellog@php.net
$ pear install ????

Could you please replace ???? with the name of a package that gives the failed install :)

Thanks,
Greg
 [2003-08-27 15:31 UTC] eru@php.net
jeez, sorry, that you have to pull all the information from me... it was sqlite
 [2003-09-07 17:31 UTC] cellog@php.net
Hi there,

I just tested pear install sqlite, with complete success - I wonder if the problem is in your phpize?  Perhaps you could try the build with phpize straight from CVS?  I saw a few commits in recent weeks that fixed a broken phpize.

Sorry I can't be more helpful - the bug just doesn't appear to exist on my setup.  If there are any devs running RH 8.0,  it would be good to step in and test out this problem.

Regards,
Greg
 [2003-09-18 06:04 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-09-21 08:14 UTC] eru@php.net
I made a new install from PHP CVS, still experiencing the problem:

root@calamity-14:07 [~]:pear install sqlite
downloading SQLite-1.0.tgz ...
...done: 354,024 bytes
48 source files, building
running: phpize
Configuring for:
  PHP Api Version:   20020918
  Zend Module Api No:   20020429
  Zend Extension Api No:   20021010
'phpize' failed

Same for xdebug and cybercash. A php.ini is available, only changed thing is the include_path to ".:/usr/local/lib/php".
 [2003-10-01 18:03 UTC] eru@php.net
Just to keep it alive and give some more information, my php-configure line is as follows:

./configure     \
        --enable-bcmath         \
        --enable-calendar       \
        --enable-debug          \
        --enable-exif           \
        --enable-ftp            \
        --enable-mbstring       \
        --enable-memory-limit   \
        --enable-pcntl          \
        --enable-shmop          \
        --enable-sigchild       \
        --enable-ucd-snmp-hack  \
        --enable-sockets        \
        --enable-sysvmsg        \
        --enable-sysvsem        \
        --enable-sysvshm        \
        --with-apxs=/usr/local/apache/bin/apxs  \
        --with-bz2              \
        --with-gd               \
        --with-freetype-dir     \
        --with-gettext          \
        --with-ldap             \
        --with-mysql=/usr                       \
        --with-mysql-sock=/var/lib/mysql/       \
        --with-ncurses          \
        --with-snmp             \
        --with-xml              \
        --with-zlib

It still fails with pear 1.3b1.
 [2003-10-02 07:07 UTC] cox@php.net
Please try the following:

$ pear download xdebug
$ tar xvfz xdebug-XXx.tgz
$ cd xdebug-XXx
$ phpize
$ ./configure
$ make
$ make install

Be sure you have the correct build tool versions (at the bottom of: http://www.php.net/anoncvs.php)

Tomas V.V.Cox
 [2003-10-02 07:08 UTC] eru@php.net
Apparently this has something to do with strange results from pclose in _runCommand. I will open a new bugreport with that one and bogusify this here, as it really is no bug in PEAR. :-P
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC