Problems with "pear install" (phpize failed)
| From: | Rainer Schaaf | Date: | Tue, 25 May 2004 21:24:04 +0000 |
| Subject: | Problems with "pear install" (phpize failed) | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-689@lists.php.net to get a copy of this message | ||
Hello,
I try to add the pdf extension to pecl and therefore I try to use pear
to dot the necessary things. However I have some problems using this.
My environment:
(1)$ pear -V
PEAR Version: 1.3.1
PHP Version: 4.3.3
Zend Engine Version: 1.3.0
Running on: Linux malik 2.4.21-99-smp4G #1 SMP Wed Sep 24 14:13:20 UTC 2003 i686
The problems:
1) must run "pear install" as root :(
-------------------------------------
(1)$ cd .../pecl/ps
(1)$ pear package
Package /build/rjs/src/php/php5-dev/pecl/ps/ps-1.2.0.tgz done
Tag the released code with `pear cvstag package.xml'
(or set the CVS tag RELEASE_1_2_0 by hand)
(1)$ pear install ps-1.2.0.tgz
failed to write /usr/share/php/doc/ps/.tmpCREDITS
OK not a real problem:
2) pear seem not to work proper in my environment, what might be the
problem (I tested with the "ps" extension to be sure not to run into
my own bugs) ?
---------------------------------------------------------------------
(1) su
...
# pear -V
PEAR Version: 1.3.1
PHP Version: 4.3.3
Zend Engine Version: 1.3.0
Running on: Linux malik 2.4.21-99-smp4G #1 SMP Wed Sep 24 14:13:20 UTC 2003 i686
# pear install ps-1.2.0.tgz
2 source files, building
running: phpize
Configuring for:
PHP Api Version: 20031224
Zend Module Api No: 20040412
Zend Extension Api No: 220040412
`phpize' failed
---
The problem is, that the following code in
/usr/share/php/PEAR/"Builder.php" fails:
if (!$err) {
return $this->raiseError("`phpize' failed");
}
If I change the code to continue here (and the other locations where
"if (!err)" is used, it looks much better as long as no error occurs.
3) using this locally patched PEAR version does not build my pdf
extension, maybe because I changed Builder.php to not bail out on
errors, or due to some bugs in my code ? The symptoms are:
----------------------------------------------
# pear install pdf-1.0.tgz
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20031224
Zend Module Api No: 20040412
Zend Extension Api No: 220040412
Errro: ''
path to pdflib installation? [autodetect] :
/home/rjs/src/pdflib-x/dist/PDFlib-6.0.0beta1-Linux/bind/c
building in /var/tmp/pear-build-rjs/pdf-1.0
running: /tmp/tmpXIdxAm/pdf-1.0/configure
--with-pdflib=/home/rjs/src/pdflib-x/dist/PDFlib-6.0.0beta1-Linux/bind/c
checking build system type... i686-suse-linux
checking host system type... i686-suse-linux
...
configure: creating ./config.status
config.status: creating config.h
Errro: ''
running: make
/bin/sh /var/tmp/pear-build-rjs/pdf-1.0/libtool --mode=compile gcc -I. -I/tmp/tmpXIdxAm/pdf-1.0
-DPHP_ATOM_INC -I/var/tmp/pear-build-rjs/pdf-1.0/include -I/var/tmp/pear-build-rjs/pdf-1.0/main
-I/tmp/tmpXIdxAm/pdf-1.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend
-I/usr/include/php/TSRM -I/home/rjs/src/pdflib-x/dist/PDFlib-6.0.0beta1-Linux/bind/c/include
-DHAVE_CONFIG_H -g -O2 -prefer-pic -c /tmp/tmpXIdxAm/pdf-1.0/pdf.c -o pdf.lo
mkdir .libs
gcc -I. -I/tmp/tmpXIdxAm/pdf-1.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-rjs/pdf-1.0/include
-I/var/tmp/pear-build-rjs/pdf-1.0/main -I/tmp/tmpXIdxAm/pdf-1.0 -I/usr/include/php
-I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM
-I/home/rjs/src/pdflib-x/dist/PDFlib-6.0.0beta1-Linux/bind/c/include -DHAVE_CONFIG_H -g -O2 -c
/tmp/tmpXIdxAm/pdf-1.0/pdf.c -fPIC -DPIC -o .libs/pdf.o
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:32:17: php.h: No such file or directory
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:33:21: php_ini.h: No such file or directory
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:34:25: php_globals.h: No such file or directory
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:35:23: zend_list.h: No such file or directory
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:36:31: ext/standard/head.h: No such file or directory
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:37:31: ext/standard/info.h: No such file or directory
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:38:31: ext/standard/file.h: No such file or directory
/tmp/tmpXIdxAm/pdf-1.0/pdf.c:39:25: php_streams.h: No such file or directory
In file included from /tmp/tmpXIdxAm/pdf-1.0/pdf.c:62:
/tmp/tmpXIdxAm/pdf-1.0/php_pdf.h:28: error: parse error before "pdf_module_entry"
....
--------------
"Errro: ''" is my printf where I changed Builder.php
So for me it looks like pear install works quite fine. It unpacks the
thing, runs configure (successful as far as I can see) and then tries
to build the thing. But then the build fails because the paths to
headerfiles are missing. Is this a problem because I have to do this
as root?.
Without pear it works. If I unpack the pdf extension manually, do a phpize and then
call configure and make by hand all works.
...
Hopefully somebody can help me a bit here.
--
Best regards,
Rainer mailto:rjs@pdflib.com