PDA

View Full Version : PHP 6 compilation problem


Marcus
07-29-2008, 04:45 PM
Hi,

I'm trying to compile the latest development version of PHP (as of writing it is 200807292030). I've tried to compile PHP with the options

--with-litespeed --with-icu-dir=XXX

When compiling, the last few lines give the following errors:

...
sapi/litespeed/lsapi_main.o: In function `cli_usage':
lsapi_main.c:(.text+0x6a5): undefined reference to `php_end_ob_buffers'
sapi/litespeed/lsapi_main.o: In function `cli_main':
lsapi_main.c:(.text+0x82c): undefined reference to `php_end_ob_buffers'
collect2: ld returned 1 exit status
make: *** [sapi/litespeed/php] Error 1

I'm using SuSE 10.3.

Is this a problem that has been caused by the updating process of PHP functions (to use the ICU package) perhaps, and I should just ignore it for now?

Thanks.

mistwang
07-29-2008, 05:13 PM
Should replace

php_end_ob_buffers()

with

php_end_ob_buffers()

for PHP 6.

Marcus
07-29-2008, 05:23 PM
Sorry, these are the same - did you mean to write something else?

mistwang
07-29-2008, 05:50 PM
sorry, should be

php_output_end_all()

Marcus
07-29-2008, 11:43 PM
Thanks - this worked.

For anyone with the same issue, these shell commands might save you thinking about how to do the above quickly:

(download & extract PHP 6.0.0 devel src to $php_src_dir)
cd $php_src_dir

doc=sapi/litespeed/lsapi_main.c
sed -e 's/php_end_ob_buffers([^)]*)/php_output_end_all()/' $doc > ${doc}2
mv -fT ${doc}2 $doc

./configure --with-litespeed ...
make
make install

mistwang
07-30-2008, 11:44 AM
We will update LiteSpeed SAPI code to address this as well.