ports/113045: php 5.2.2 simplexml fails to compile

James Risner risner at stdio.com
Sun May 27 03:50:04 UTC 2007

>Number:         113045
>Category:       ports
>Synopsis:       php 5.2.2 simplexml fails to compile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 27 03:50:03 GMT 2007
>Originator:     James Risner
>Release:        FreeBSD 6.2-STABLE i386
System: FreeBSD akira.stdio.com 6.2-STABLE FreeBSD 6.2-STABLE #15: Wed Apr 11 15:06:43 EDT 2007 root at akira.stdio.com:/usr/obj/usr/src/sys/AKIRA i386

P4 2.8ghz 2 gb ram 1 tb disk


Have PHP 5.2.1 installed with simplexml, attempt to upgrade to 5.2.2.
When making simplexml you get this error:

/usr/ports/textproc/php5-simplexml/work/php-5.2.2/ext/simplexml/simplexml.c:38:29: ext/spl/spl_sxe.h: No such file or directory
*** Error code 1

Stop in /usr/ports/textproc/php5-simplexml/work/php-5.2.2/ext/simplexml.
*** Error code 1

Stop in /usr/ports/textproc/php5-simplexml.

	cd /usr/ports/texproc/php5-simplexml; make

I googled around and didn't find anything on this error, so I quickly fixed it for now.
It would appear that spl is referenced by simplexml and that referencing one extension
from another breaks some sort of model for the way the PHP5 port worked.  It only extracted
the extension it was compiling.  A proper fix may be to extract all extensions or to
just extract this one (spl) along with all others?

If I am confused and did something wrong, please excuse me.  Thanks.

I added a symbolic link and modified /usr/ports/lang/php5/Makefile.ext as follows:

mail# pwd
mail# ls -l work/php-5.2.2/ext/simplexml/include/
total 0
lrwxr-xr-x  1 root  wheel  13 May 26 23:04 ext -> ../../../ext/
mail# grep /ext/spl /usr/ports/lang/php5/Makefile.ext

ln -s ../../../ext /usr/ports/textproc/php5-simplexml/work/php-5.2.2/ext/simplexml/include/
cp /usr/ports/lang/php5/Makefile.ext /usr/ports/lang/php5/Makefile.ext.old
sed -e 's#\(${TAR} -xf - ${EXTSUBDIR}\)#\1 ${DISTNAME}/ext/spl#' \
	< /usr/ports/lang/php5/Makefile.ext.old \
	> /usr/ports/lang/php5/Makefile.ext

More information about the freebsd-ports-bugs mailing list