Bug #51452 [Com]: 'make install-sapi' tries to execute "" for litespeed, resulting in an error

[email protected] ("root at mediamonks dot net") Thu, 1 Apr 2010 04:18:01 +0200 (CEST)
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at http://bugs.php.net/bug.php?id=51452&edit=1

 ID:               51452
 Comment by:       root at mediamonks dot net
 Reported by:      root at mediamonks dot net
 Summary:          'make install-sapi' tries to execute "" for litespeed,
                   resulting in an error
 Status:           Assigned
 Type:             Bug
 Package:          Other web server
 Operating System: FreeBSD 8.0-STABLE
 PHP Version:      5.3.2
 Assigned To:      gwang

 New Comment:

I forgot to add that I think this to be a BSD specific issue.


Previous Comments:
------------------------------------------------------------------------
[2010-03-31 23:43:36] [email protected]

George, please look into this.

------------------------------------------------------------------------
[2010-03-31 23:32:35] root at mediamonks dot net

Description:
------------
Litespeed SAPI generates an error on install due to make trying to
execute an empty variable.

Normally a harmless error, however it results in make returning non-zero
exit status. This breaks the installation from within the Litespeed
webadmin.

From Makefile:

install-sapi: $(OVERALL_TARGET)   
[snip]
        @$(INSTALL_IT)

INSTALL_IT is empty, resulting in:

# make install-sapi
Installing PHP SAPI module:       litespeed
:No such file or directory
*** Error code 1 (continuing)
# make -n install-sapi
echo "Installing PHP SAPI module:       litespeed"
/usr/local/lsws/phpbuild/php-5.2.12/build/shtool mkdir -p
/opt/lsws/lsphp5/bin
if test ! -r /usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so; then 
for i in 0.0.0 0.0 0; do  if test -r
/usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so.$i; then  ln -s
/usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so.$i
/usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so;  break;  fi;  done;
 fi

#

Notice the empty line in the -n output.

Setting INSTALL_IT to a dummy command (INSTALL_IT="@true") in
sapi/litespeed/config.m4 fixes this.

Additionally, 'make install-sapi' doesn't even really install anything
for litespeed, because their webadmin scripts copy the binary directly
from the build directory to where it needs to be (which is not at
$prefix). As usually you'd expect a compiled binary to end up in
$prefix/bin after installation I propose fixing this so it actually
installs something.

Ideally the Litespeed scripts should then copy the binary from
$prefix/bin instead of from the build directory.

A patch that fixes this bug is attached, it also installs the binary to
$prefix/bin/lsphp.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51452&edit=1