# Problem to install php52-extension



## rabeloo (Jan 28, 2011)

Hi people!

Sorry about my english, I'm brazilian =)

I have a problem to install the php52-extensions on FreeBSD 8.1, when I try:

`make install clean` or make  `make FORCE_PKG_REGISTER=1 install`

I received the next message:


```
===>  Building for php52-simplexml-5.2.17
/bin/sh /usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/libtool --mode=compile cc  -I. -I/usr/ports/textproc/php52-
simplexml/work/php-5.2.17/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/include -
I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/main -I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml -
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 -I/usr/local/include/libxml2 -I/usr/local/include  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c 
/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/simplexml.c -o simplexml.lo
mkdir .libs
 cc -I. -I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php52-simplexml/work/php-
5.2.17/ext/simplexml/include -I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/main -I/usr/ports/textproc/php52-
simplexml/work/php-5.2.17/ext/simplexml -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 -I/usr/local/include/libxml2 -
I/usr/local/include -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -c /usr/ports/textproc/php52-simplexml/work/php-
5.2.17/ext/simplexml/simplexml.c  -fPIC -DPIC -o .libs/simplexml.o
In file included from /usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/simplexml.c:38:
/usr/local/include/php/ext/spl/spl_sxe.h:25:21: error: php_spl.h: No such file or directory
In file included from /usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/simplexml.c:38:
/usr/local/include/php/ext/spl/spl_sxe.h:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/textproc/php52-simplexml.
*** Error code 1

Stop in /usr/ports/devel/php52-spl.
*** Error code 1

Stop in /usr/ports/textproc/php52-dom.
*** Error code 1

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

Stop in /usr/ports/lang/php52-extensions.
```

I tried deinstall and reinstall... but nothing...

anyone can help me ?

thanks!!!


----------



## DutchDaemon (Jan 29, 2011)

Related? http://forums.freebsd.org/showthread.php?t=21384


----------



## Alt (Jan 29, 2011)

```
/usr/local/include/php/ext/spl/spl_sxe.h:25:21: error: php_spl.h: No such file or directory
```
Probably he wants php builded with SPL


----------



## rabeloo (Jan 31, 2011)

So i think it is not a bug... because i've installed in another machine, this will work like a webcluster.

I deleted all programs and installed again, but it's doesn't work.




> Probably he wants php builded with SPL



The SPL is select to install, but if i remove the SPL module, the message that i receive is:


```
===>  Building for php52-simplexml-5.2.17
/bin/sh /usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/libtool --
mode=compile cc  -I. -I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php52-
simplexml/work/php-5.2.17/ext/simplexml/include -
I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/main -
I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml -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 -
I/usr/local/include/libxml2 -I/usr/local/include  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-
aliasing   -c /usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/simplexml.c
 -o simplexml.lo
mkdir .libs
 cc -I. -I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml -DPHP_ATOM_INC
 -I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/include -
I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/main -
I/usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml -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 -
I/usr/local/include/libxml2 -I/usr/local/include -DHAVE_CONFIG_H -O2 -pipe -fno-strict-
aliasing -c /usr/ports/textproc/php52-simplexml/work/php-5.2.17/ext/simplexml/simplexml.c 
 -fPIC -DPIC -o .libs/simplexml.o
In file included from /usr/ports/textproc/php52-simplexml/work/php-
5.2.17/ext/simplexml/simplexml.c:38:
/usr/local/include/php/ext/spl/spl_sxe.h:25:21: error: php_spl.h: No such file or directory
In file included from /usr/ports/textproc/php52-simplexml/work/php-
5.2.17/ext/simplexml/simplexml.c:38:
/usr/local/include/php/ext/spl/spl_sxe.h:29: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'int'
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/textproc/php52-simplexml.
*** Error code 1

Stop in /usr/ports/devel/php52-spl.
*** Error code 1

Stop in /usr/ports/textproc/php52-dom.
*** Error code 1

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

Stop in /usr/ports/lang/php52-extensions.
```

Any sugests?

thanks!


----------



## djdb (Feb 8, 2011)

For me this problem was resolved in next way:

```
cd /usr/ports/devel/php52-spl/
make extract
cp /usr/ports/devel/php52-spl/work/php-5.2.17/ext/spl/php_spl.h /usr/local/include/php/ext/spl/
make install
```

After this, if you have error message:

```
/usr/local/include/php/ext/spl/spl_sxe.h:29:36: error: macro "ZEND_MODULE_STARTUP_D" passed 2 arguments, but takes just 1
```

just remove comma from line 29 in /usr/local/include/php/ext/spl/spl_sxe.h and try again


----------

