Building for php5-filter-5.3.2 *** Error code 1

Trying to install 'php5-filter-5.3.2' run into issue:
Code:
In file included from /usr/ports/security/php5-filter/work/php-5.3.2/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.2/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.2/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: (Each undeclared identifier is reported only once
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: for each function it appears in.)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:413: error: 'pcre_extra' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c: In function 'php_filter_validate_email':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:501: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/security/php5-filter.

Just Moved from PHP 5.2.12 --> PHP 5.3.2
The idea was to deinstall and reinstall phpMyAdmin because when migrated to PHP 5.3.2 the system run into ***Error Codes with 'php5-zip' & 'php5-filter'
So, ended up & left without phpMyAdmin at the moment.

Any ideas of where to digg to solve 'php5-filter' issue & get phpMyAdmin back on again?
 
francisloco said:
i have the same problem of pcre, there is not more php5-pcre ?

Not as a separate port anymore as pcre has been integrated in the base of PHP5.3. Have a look at the UPDATING file:
Code:
20100409:
  AFFECTS: users of lang/php5
  AUTHOR: ale@FreeBSD.org

  As of php 5.3, a few extensions were removed from or included into the core
  php5 package.  Follow the steps below to update your installation.

  1) Delete the following packages (if installed):
     - php5-dbase
     - php5-ncurses
     - php5-pcre
     - php5-spl
     - php5-ming
     - php5-mhash

  2) Rebuild php5 and all ports depending on it.
 
I had exactly the same issue. The solution is to:
Code:
cd /usr/ports/lang/php5/
make extract
cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/

George
 
gkontos said:
I had exactly the same issue. The solution is to:
Code:
cd /usr/ports/lang/php5/
make extract
cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/

George

Thank you gkontos, your solution worked for me just fine :)
 
Thank You gkontos!
Your solution made my day!
Code:
cd /usr/ports/lang/php5/
make extract
cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/
 
I doubt that that is the solution. It looks like a hack which is bound to break some time. Please use the correct procedure as outlined in /usr/ports/UPDATING (20100409).
 
DutchDaemon said:
I doubt that that is the solution. It looks like a hack which is bound to break some time. Please use the correct procedure as outlined in /usr/ports/UPDATING (20100409).

All PHP5 packages were deleted before trying to upgrade. Thus the "hack" that I found. I have also emailed the port maintainer.

Regards,

George
 
gkontos said:
I had exactly the same issue. The solution is to:
Code:
cd /usr/ports/lang/php5/
make extract
cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/

George

you are the man!!


ahahah finally i get working my php-extensions again.

thanks.
 
This issue is suppose to affect to already php5 installations, but I have a fresh system and have the same error:

Code:
 ===>  Building for php5-filter-5.3.2
/bin/sh /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/libtool --mode=compile cc  -I. -I/usr/ports/security/php5-filter/work/php-
5.3.2/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/include -I/usr/ports/security/php5-filter/work/php-
5.3.2/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.2/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 
-pipe -fno-strict-aliasing   -c /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c -o logical_filters.lo
 cc -I. -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter
/include -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.2/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 -pipe -fno-strict-aliasing -c /usr/ports/security/php5-filter/work/php-5.3.2/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.2/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.2/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.2/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: (Each undeclared identifier is reported only once
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: for each function it appears in.)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:413: error: 'pcre_extra' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c: In function 'php_filter_validate_email':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:501: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/security/php5-filter.

Doesn't suppose that this will not break new installations?

Thanks!!!
 
klabacita said:
This issue is suppose to affect to already php5 installations, but I have a fresh system and have the same error:

Doesn't suppose that this will not break new installations?

Thanks!!!

My thought also when I encountered the problem since I had completely removed php5 before upgrading. The problem appears to be in pcre.h not being copied at the correct directory.

Best Regards,

George
 
joint said:
In file included from /usr/ports/security/php5-filter/work/php-5.3.2/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

First, follow the instructions in /usr/ports/UPDATING. If you encounter problems, go ahead:

The file "php_pcre.h" is missing because you need to compile lang/php5 with WITH_BUNDLED_PCRE="YES". For portupgrade I put this option in my pkgtools.conf. After rebuilding lang/php5 with this option the problem was solved.

fraenki
 
fraenki said:
First, follow the instructions in /usr/ports/UPDATING.

That is what I did 1st of all - did follow the instructions in /usr/ports/UPDATING
and I run into "php_pcre.h" issue in anyway.

fraenki said:
If you encounter problems, go ahead:

The file "php_pcre.h" is missing because you need to compile lang/php5 with WITH_BUNDLED_PCRE="YES". For portupgrade I put this option in my pkgtools.conf. After rebuilding lang/php5 with this option the problem was solved.
I'll try your advice on my other box that is still runs under PHP_5.2.12
and see how it goes.
Thanx!
 
fraenki said:
The file "php_pcre.h" is missing because you need to compile lang/php5 with WITH_BUNDLED_PCRE="YES". For portupgrade I put this option in my pkgtools.conf. After rebuilding lang/php5 with this option the problem was solved.
fraenki
Finally the mystery is solved. I think the port maintainer should be informed also...

George
 
Hi, like others, I didn't read the UPDATING file before updating and now I'm screwed. I have removed al PHP5 packages, recompiled PHP5 (with pcre builtin option). I'm unable to install php5-extensions, it endsup with following error:

Code:
===>   php5-extensions-1.4 depends on file: /usr/local/include/php/main/php.h - found
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626/bz2.so - found
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626/ctype.so - found
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626/dom.so - found
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626/exif.so - found
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626/filter.so - not found
===>    Verifying install for /usr/local/lib/php/20090626/filter.so in /usr/ports/security/php5-filter
===>  Building for php5-filter-5.3.2
/bin/sh /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/libtool --mode=compile cc  -I. -I/usr/ports/security/php5-filter/work/php-
5.3.2/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/include -I/usr/ports/security/php5-filter
/work/php-5.3.2/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.2/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 -pipe -fno-strict-aliasing   -c /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c -o 
logical_filters.lo
 cc -I. -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.2/ext
/filter/include -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.2/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 -pipe -fno-strict-aliasing -c /usr/ports/security/php5-filter
/work/php-5.3.2/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.2/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.2/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.2/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: (Each undeclared identifier is reported only once
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: for each function it appears in.)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:413: error: 'pcre_extra' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c: In function 'php_filter_validate_email':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:501: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/security/php5-filter.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Are you able to help me, please?
P.S. I remember running pkg_db -F and typing yes to some problems... :(
 
myso said:
[...] recompiled PHP5 (with pcre builtin option) [...]
/usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory

Apparently your lang/php5 is NOT compiled with WITH_BUNDLED_PCRE set to "YES". Note that you can't configure this with `make config`. Set this variable in /etc/make.conf (or pkgtools.conf for portupgrade) and recompile lang/php5.

Afterwards check if the file /usr/local/include/php/ext/pcre/php_pcre.h exists. If it doesn't exist stop here and investigate further...


fraenki
 
Thanks for your answer.

The file exists, this are my php options according to phpinfo:

Code:
'./configure' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-
dir=/usr/local' '--program-prefix=' '--with-apxs2=/usr/local/sbin/apxs' '--with-pcre-regex=/usr/local' '--with-regex=php' '--with-
zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.0'

Anyway I'm going to try and let you know.
 
myso said:
The file exists, this are my php options according to phpinfo:

You're right, I missed that it complains about pcre.h and NOT php_pcre.h. So you need to check if devel/pcre is installed (and thus if /usr/local/include/pcre.h exists).

Sorry for the confusion.

fraenki
 
Thank you so much! This one helped:

&quot said:
Set this variable in /etc/make.conf

BUT! I don't know why, just restarting httpd didn't help, I had to restart the whole system to get php fully working.

Now everything seems to be OK, thanks again!
 
Back
Top