Click to See Complete Forum and Search --> : compile PHP with Sablot && Expat


Anon
08-01-2002, 05:40 PM
I've managed to compile and install both expat and sablot without any problems, but when I try to recompile PHP, the make generates an error...

Slackware 8.0,
Apache 2.0.39,
Php 4.2.2,
Sablot 0.95,
Expat 1.95.4

Build options are (in short) :
./configure
--enable-xslt
--with-xslt-sablot=/opt/app/sablot-0.95
--with-expat-dir=/opt/app/expat-1.95.4


===---===---===---===---===---===---===---
The error (brief version) is : (higher up) :
===---===---===---===---===---===---===---
sablot.c:130: warning: initialization from incompatible pointer type
sablot.c: In function `zif_xslt_process':
sablot.c:512: warning: passing arg 5 of `SablotRunProcessor' from incompatible p
ointer type
===---===---===---===---===---===---===---
The error (brief version) is : (at bottom) :
===---===---===---===---===---===---===---
/opt/src/php-4.2.2/ext/xslt/sablot.c(.rodata+0x8): multiple definition of `SXPF_SUPPORTS_UNPARSED_ENTITIES'
main/.libs/libmain.al(internal_functions.lo)(.rodata+0x8):/opt/src/php-4.2.2/main/internal_functions.c: first defined here
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/opt/src/php-4.2.2'
make: *** [all-recursive] Error 1
===---===---===---===---===---===---===---
More complete (larger) error message @ http://web.ineptie.dyndns.org/make.htm

Anon
08-01-2002, 06:55 PM
Think I just found the error to my own problem.. I'm gonna install the patches from : http://www.gingerall.com/charlie/ga/xml/d_sab.xml
===---===---===---===---===---===---===---
one patch is for sablot (Sablot*)
{source}/src/engine/sxpath.h
one patch is for php (PHP*)
{source}/ext/xslt/sablot.c
===---===---===---===---===---===---===---
crap...
well good news is the make gets further than before...
the bad news is that there is still an error.. although it is a different one:

/bin/sh /opt/src/php-4.2.2/libtool --silent --mode=compile gcc -I. -I/opt/src/php-4.2.2/sapi/apache2filter -I/opt/src/php-4.2.2/main -I/opt/src/php-4.2.2 -I/opt/app/apache-2.0.39/include -I/opt/src/php-4.2.2/Zend -I/opt/app/pgsql-7.2.1/include -I/opt/app/expat-1.95.4/include -I/opt/app/sablot-0.95/include -D_REENTRANT -I/opt/src/php-4.2.2/TSRM -g -O2 -pthread -DZTS -prefer-pic -c php_functions.c
php_functions.c:93: parse error
make[3]: *** [php_functions.lo] Error 1
make[3]: Leaving directory `/opt/src/php-4.2.2/sapi/apache2filter'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/src/php-4.2.2/sapi/apache2filter'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/src/php-4.2.2/sapi'
make: *** [all-recursive] Error 1
===---===---===---===---===---===---===---

*sigh* Anyone have an idea for this one ? :)

Anon
08-01-2002, 07:20 PM
SUCCESS !!!
okay well that last problem was more easily resolved *shrug* oh well...

It would seem that all I had to change was
line 93 of sapi/apache2filter/php_functions.c

from :
#if !MODULE_MAGIC_AT_LEAST(20020506,0)
to:
#if !AP_MODULE_MAGIC_AT_LEAST(20020506,0)

===---===---===---===---===---===---===---
I hope this saves one of you poor souls who's presently foaming at the mouth, looking from side to side, wondering if the screen would look best flying through the air towards a wall or plumetting out of the window...
===---===---===---===---===---===---===---
Laters.