Unable to compile PHP from LSWS interface

Discussion in 'Install/Configuration' started by viperxx, Nov 7, 2010.

  1. viperxx

    viperxx New Member

    Hello,

    I'm unable to compile PHP5 from LSWS interface. I instead get a screen that is stuck on "Step 3 : Preparing for building PHP 5.3.3 Binary" with the following message:

    Code:
    [B]Main Status:[/B]
    
    **MAIN_STATUS** retrieved from /opt/lsws/phpbuild/buildphp_1289121589.5.progress
    Preparing all source code for building PHP 5.3.3 with LSAPI
    
    
    
    [B]Detailed Log:[/B]
    
    **LOG_DETAIL** retrieved from /opt/lsws/phpbuild/buildphp_1289121589.5.log
    =============================================================
    Preparing all source code for building PHP 5.3.3 with LSAPI
    =============================================================
    Sun Nov 7 09:19:49 GMT 2010
    
    Changing to build directory /opt/lsws/phpbuild
    /opt/lsws/phpbuild/buildphp_1289121589.5.prep.sh: test: argument expected
    
    Help would be greatly appreciated!
  2. webizen

    webizen New Member

    What version of lsws are you running? Is it possible for you to run 'sh -xv /opt/lsws/phpbuild/buildphp_1289121589.5.prep.sh' manually from command line and see where triggers the 'test: argument expected' message?
  3. viperxx

    viperxx New Member

    This is what I get have inputting the command "sh -xv /opt/lsws/phpbuild/buildphp_1289121589.5.prep.sh".

    Attached Files:

  4. webizen

    webizen New Member

    Looks like your local tar (doesn't support z option) is not Gnu tar compatible. Hence the error below.

    + [ N = N ]
    + DOWNLOAD_URL=http://us.php.net/get/php-5.3.3.tar.gz/from/us.php.net/mirror
    + main_msg Retrieving PHP source archive from http://us.php.net/get/php-5.3.3.ta
    r.gz/from/us.php.net/mirror
    Retrieving PHP source archive from http://us.php.net/get/php-5.3.3.tar.gz/from/u
    s.php.net/mirror
    + wget -nv -O php-5.3.3.tar.gz http://us.php.net/get/php-5.3.3.tar.gz/from/us.ph
    p.net/mirror
    2010-11-08 02:58:37 URL:http://us.php.net/distributions/php-5.3.3.tar.gz [139215
    29/13921529] -> "php-5.3.3.tar.gz" [1]
    + test_phpsrc_ok php-5.3.3.tar.gz
    Extracting PHP source archive: tar -zxf php-5.3.3.tar.gz
    tar: z: unknown function modifier
    Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@/[0-7]][bfk][X...] [blocksize] [tarfile
    ] [size] [exclude-file...] {file | -I include-file | -C directory file}...
    Could not extract PHP source archive
    + [ 1 -eq 0 ]

    Are you running a Sun server? If so, you may get Gnu tar from http://www.sunfreeware.com/. For OS like certain solaris distribution that does not have GNU tool chain installed, it is recommended to install all GNU packages first. http://www.blastwave.org is another place to look for these packages.
  5. viperxx

    viperxx New Member

    webizen,

    Our server is running on Solaris 10. Since I am still relatively new with Linux I would like to know if you provide a service to help fix the problem?

    Regards,
    Christopher
  6. viperxx

    viperxx New Member

    I've installed Gnu tar and still getting the same error output.

    Very odd.
  7. mistwang

    mistwang LiteSpeed Staff

    You need to make sure GNU tar has higher priority in the PATH env than the stock one.
  8. VisBits

    VisBits New Member

    I'm pretty surprised Solaris does not have zlib..
  9. webizen

    webizen New Member

    Solaris does have zlib. The error below just means Solaris native tar doesn't support z option (gnu style).

Share This Page