PHP 6 compilation problem

Discussion in 'Install/Configuration' started by Marcus, Jul 29, 2008.

  1. Marcus

    Marcus New Member

    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.
  2. mistwang

    mistwang LiteSpeed Staff

    Should replace

    php_end_ob_buffers()

    with

    php_end_ob_buffers()

    for PHP 6.
  3. Marcus

    Marcus New Member

    Sorry, these are the same - did you mean to write something else?
  4. mistwang

    mistwang LiteSpeed Staff

    sorry, should be

    php_output_end_all()
  5. Marcus

    Marcus New Member

    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
  6. mistwang

    mistwang LiteSpeed Staff

    We will update LiteSpeed SAPI code to address this as well.

Share This Page