2011-01-10

FreeBSD - portupgrade php5 got hiccups with security/php5-filter

During the routing upgrading of ports, caught a hiccups while upgrading php5 related packages.

One of the port failed to upgrade after issuing "portupgrade -vr php5*".







The errors :
===>  Building for php5-filter-5.3.4
/bin/sh /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/libtool --mode=compile cc  -I. -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/include -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -O2 -fno-strict-aliasing -pipe   -c /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c -o logical_filters.lo
 cc -I. -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/include -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-strict-aliasing -pipe -c /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c  -fPIC -DPIC -o .libs/logical_filters.o
In file included from /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:25:
/usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:25:
/usr/local/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre'
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp':
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: (Each undeclared identifier is reported only once
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: for each function it appears in.)
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:412: error: 'pcre_extra' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c: In function 'php_filter_validate_email':
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:527: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:527: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:528: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/security/php5-filter.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20101224-47314-9ktu04-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php5-filter-5.2.11_1 UPGRADE_PORT_VER=5.2.11_1 make
** Fix the problem and try again.
--->  Build of security/php5-filter ended at: Fri, 24 Dec 2010 09:36:27 +0800 (consumed 00:00:43)
--->  Upgrade of security/php5-filter ended at: Fri, 24 Dec 2010 09:36:27 +0800 (consumed 00:00:43)
--->  ** Upgrade tasks 1: 0 done, 0 ignored, 0

Checking out /usr/ports/UPDATING and /usr/ports/MOVED doesn't seems to give a hint. Next try on Forum.FreeBSD.org shed light on this :
cd /usr/ports/lang/php5/
make extract
cp /usr/ports/lang/php5/work/php-5.3.4/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/

After applying the above, continue to upgrade the ports with "portupgrade -vr php5*". Ends with success.

Reference : http://forums.freebsd.org/showpost.php?p=77325&postcount=6

Ciao !!!

No comments: