Bug 145731

Summary: archivers/php5-zip fails to build
Product: Ports & Packages Reporter: Helmut Schneider <jumper99>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Helmut Schneider 2010-04-15 20:50:00 UTC
[...]
 cc -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_source_filep.c  -fPIC -DPIC -o lib/.libs/zip_source_filep.o
In file included from /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c:30:
/usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
/bin/sh /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/libtool --mode=compile cc  -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing   -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_strerror.c -o lib/zip_strerror.lo
/bin/sh /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/libtool --mode=compile cc  -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing   -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_close.c -o lib/zip_close.lo
/bin/sh /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/libtool --mode=compile cc  -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing   -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_error_get.c -o lib/zip_error_get.lo
In file included from /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c:30:
/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'
/bin/sh /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/libtool --mode=compile cc  -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing   -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_file_error_get.c -o lib/zip_file_error_get.lo
/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c: In function 'php_zip_pcre':
/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c:602: error: 'pcre' undeclared (first use in this function)
/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c:602: error: (Each undeclared identifier is reported only once
/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c:602: error: for each function it appears in.)
/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c:602: error: 're' undeclared (first use in this function)
/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/php_zip.c:603: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
 cc -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_close.c  -fPIC -DPIC -o lib/.libs/zip_close.o
 cc -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_strerror.c  -fPIC -DPIC -o lib/.libs/zip_strerror.o
 cc -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_file_error_get.c  -fPIC -DPIC -o lib/.libs/zip_file_error_get.o
 cc -I. -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -DPHP_ATOM_INC -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/include -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/main -I/usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip -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 -pipe -fno-strict-aliasing -c /usr/ports/archivers/php5-zip/work/php-5.3.2/ext/zip/lib/zip_error_get.c  -fPIC -DPIC -o lib/.libs/zip_error_get.o
1 error
*** Error code 1

Stop in /usr/ports/archivers/php5-zip.

How-To-Repeat: Try to build php5-zip from ports
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-04-15 20:50:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2010-04-16 09:24:19 UTC
State Changed
From-To: open->closed

Read UPDATING (hint: rebuild lang/php5).
Comment 3 Helmut Schneider 2010-04-16 12:27:41 UTC
> Read UPDATING (hint: rebuild lang/php5).

UPDATING is not very helpful at that point because it is incomplete. A 
separate PR has already been opened by others.

The point is that removing php5-pcre does not completely remove pcre (tested 
on ~10 machines):

[root@BSDHelmut ~]# pkg_delete -f php5*
[...]
pkg_delete: unable to completely remove directory 
'/usr/local/include/php/Zend'
pkg_delete: unable to completely remove directory 
'/usr/local/include/php/ext/pcre'
pkg_delete: unable to completely remove directory 
'/usr/local/include/php/ext/standard'
pkg_delete: unable to completely remove directory 
'/usr/local/include/php/main'
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)
[root@BSDHelmut ~]# ls /usr/local/include/php/
Zend/  ext/   main/  regex/
[root@BSDHelmut ~]#

As long as "/usr/local/include/php/ext/pcre" exists installation *must* 
fail. Please make instructions in UPDATING failsafe for standard users