# install php5-simplexml fail



## ckpeng (Oct 23, 2013)

When I was upgrading my PHP 5.2 to 5.4, and I installed php5-simplexml fail.

`freebsd# cd /usr/ports/textproc/php5-simplexml`
`freebsd# make deinstall`

```
===> Deinstalling for textproc/php5-simplexml
m===> php5-simplexml not installed, skipping
freebsd2# make install
===> Building for php5-simplexml-5.4.21
/bin/sh /usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/libtool --mode=compile cc -I. -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/include -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/main -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/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 -I/usr/local/include -fno-strict-aliasing -c /usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c -o sxe.lo
cc -I. -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/include -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/main -I/usr/ports/textproc/php5-simplexml/work/php-5.4.21/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 -I/usr/local/include -fno-strict-aliasing -c /usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c -fPIC -DPIC -o .libs/sxe.o
/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c:30:29: error: ext/spl/php_spl.h: No such file or directory
/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c:31:35: error: ext/spl/spl_iterators.h: No such file or directory
/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c: In function 'zm_startup_sxe':
/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c:205: error: 'spl_ce_RecursiveIterator' undeclared (first use in this function)
/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c:205: error: (Each undeclared identifier is reported only once
/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c:205: error: for each function it appears in.)
/usr/ports/textproc/php5-simplexml/work/php-5.4.21/ext/simplexml/sxe.c:206: error: 'spl_ce_Countable' undeclared (first use in this function)
*** Error code 1
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Stop in /usr/ports/textproc/php5-simplexml.
```
 
And I was run `make MAKE_JOBS_UNSAFE=yes install`, it was still fail.

Is any way to solve this issue?

Thanks.

Daisy


----------



## ckpeng (Oct 23, 2013)

I reinstall PHP 5.4 and reinstalled php5-extensions, it works fine.


----------

