Unable to compile PHP from LSWS interface

#1
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!
 

webizen

Well-Known Member
#2
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?
 

webizen

Well-Known Member
#4
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
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
 

webizen

Well-Known Member
#9
Solaris does have zlib. The error below just means Solaris native tar doesn't support z option (gnu style).

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
 
Top