[PHP-users 34186] filterのインストールでエラーが出てしまいます。

kondo nobuaki3.kondo @ toshiba.co.jp
2008年 12月 8日 (月) 10:13:27 JST


近藤です。

お世話になります。

Delphi for PHP V2.0というのを知って試しに使ってみようと思いました。
Windows上でボタンを押したらラベルが変わるだけという単純なものです。

実運用する際のLinux上に持っていって動くかどうか試そうとしたら、
エラーになりどうやらfilterというものが必要らしいので、調べてインストール
しようとしましたが、エラーになって先に行き詰ってしまいました。
対処方法が分かったら教えていただきたいのでよろしくお願いします。

Linux側の環境は、RedHatEL5でPHPは5.1.6です。
rpm -qa | grep phpを実行した結果、以下のようなパッケージが入ってます。
php-cli-5.1.6-20.el5_2.1
php-mysql-5.1.6-20.el5_2.1
php-devel-5.1.6-20.el5_2.1
php-pear-1.4.9-4.el5.1
php-common-5.1.6-20.el5_2.1
php-mbstring-5.1.6-20.el5_2.1
php-5.1.6-20.el5_2.1
php-ldap-5.1.6-20.el5_2.1
php-pdo-5.1.6-20.el5_2.1

<やったこと>
パッケージが足りないようだったので
yum install php-devel
yum install pcre-devel
を実行
そして、pear config-set http_proxy プロキシサーバ
を実行してプロキシを設定
pecl install filter
を実行するとエラーになります。
php_pcre.hが無いというエラーのようなので、何かインストール
する必要あるような気がしてますが、どれをインストールすればいいのか
分からずです。

# pecl install filter
downloading filter-0.11.0.tgz ...
Starting to download filter-0.11.0.tgz (25,946 bytes)
.........done: 25,946 bytes
8 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
building in /var/tmp/pear-build-root/filter-0.11.0
running: /tmp/tmpnlfzsd/filter-0.11.0/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP 
includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM 
 -I/usr/include/php/Zend -I/usr/include/php/ext
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to 
regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable input filter support... yes, shared
checking pcre install prefix... no
checking how to run the C preprocessor... gcc -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... 
yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... 
yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... 
yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 static flag -static works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/bin/ld) supports shared libraries... 
yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/filter-0.11.0/libtool --mode=compile 
cc  -I. -I/tmp/tmpnlfzsd/filter-0.11.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/filter-0.11.0/include 
 -I/var/tmp/pear-build-root/filter-0.11.0/main -I/tmp/tmpnlfzsd/filter-0.11.0 
 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend 
 -I/usr/include/php/ext  -DHAVE_CONFIG_H  -g -O2   -c 
/tmp/tmpnlfzsd/filter-0.11.0/filter.c -o filter.lo
mkdir .libs
 gcc -I. -I/tmp/tmpnlfzsd/filter-0.11.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/filter-0.11.0/include 
 -I/var/tmp/pear-build-root/filter-0.11.0/main -I/tmp/tmpnlfzsd/filter-0.11.0 
 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend 
 -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c 
/tmp/tmpnlfzsd/filter-0.11.0/filter.c  -fPIC -DPIC -o .libs/filter.o
/bin/sh /var/tmp/pear-build-root/filter-0.11.0/libtool --mode=compile 
cc  -I. -I/tmp/tmpnlfzsd/filter-0.11.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/filter-0.11.0/include 
 -I/var/tmp/pear-build-root/filter-0.11.0/main -I/tmp/tmpnlfzsd/filter-0.11.0 
 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend 
 -I/usr/include/php/ext  -DHAVE_CONFIG_H  -g -O2   -c 
/tmp/tmpnlfzsd/filter-0.11.0/sanitizing_filters.c -o sanitizing_filters.lo
 gcc -I. -I/tmp/tmpnlfzsd/filter-0.11.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/filter-0.11.0/include 
 -I/var/tmp/pear-build-root/filter-0.11.0/main -I/tmp/tmpnlfzsd/filter-0.11.0 
 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend 
 -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c 
/tmp/tmpnlfzsd/filter-0.11.0/sanitizing_filters.c  -fPIC -DPIC -o 
.libs/sanitizing_filters.o
/bin/sh /var/tmp/pear-build-root/filter-0.11.0/libtool --mode=compile 
cc  -I. -I/tmp/tmpnlfzsd/filter-0.11.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/filter-0.11.0/include 
 -I/var/tmp/pear-build-root/filter-0.11.0/main -I/tmp/tmpnlfzsd/filter-0.11.0 
 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend 
 -I/usr/include/php/ext  -DHAVE_CONFIG_H  -g -O2   -c 
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c -o logical_filters.lo
 gcc -I. -I/tmp/tmpnlfzsd/filter-0.11.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/filter-0.11.0/include 
 -I/var/tmp/pear-build-root/filter-0.11.0/main -I/tmp/tmpnlfzsd/filter-0.11.0 
 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend 
 -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c 
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c  -fPIC -DPIC -o 
.libs/logical_filters.o
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:25:31: error: 
ext/pcre/php_pcre.h: No such file or directory
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c: In function 
'php_filter_validate_regexp':
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:451: error: 'pcre' undeclared 
(first use in this function)
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:451: error: (Each undeclared 
identifier is reported only once
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:451: error: for each function 
it appears in.)
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:451: error: 're' undeclared 
(first use in this function)
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:452: error: 'pcre_extra' 
undeclared (first use in this function)
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c: In function 
'php_filter_validate_email':
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:509: error: 'pcre' undeclared 
(first use in this function)
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:509: error: 're' undeclared 
(first use in this function)
/tmp/tmpnlfzsd/filter-0.11.0/logical_filters.c:510: error: 'pcre_extra' 
undeclared (first use in this function)
make: *** [logical_filters.lo] エラー 1
ERROR: `make' failed

http://d.hatena.ne.jp/shimooka/20070523/1179916810
を見ると同様にRPMパッケージの5.1.6で、php_pcre.hでエラーになって
ソースからだとエラーがでなくなるようなことが書かれてますが、
できればRPMパッケージでやりたいです。



PHP-users メーリングリストの案内