Compiling PHP ~5.4.32 fails due to missing files

2,113 views
Skip to first unread message

Bryan Parker

unread,
Aug 28, 2014, 3:41:40 AM8/28/14
to openlitespee...@googlegroups.com

Compiling PHP 5.4.32 (I have not tested any others personally) using OLS' Compile PHP function results in a failure after compilation during install where it expects files that are no longer there.

Bottom of the log output:

Installing PHP
Installing PHP CLI binary:        /usr/local/lsws/lsphp5/bin/
Installing PHP CLI man page:      /usr/local/lsws/lsphp5/php/man/man1/
cp: cannot stat 'sapi/cli/php.1': No such file or directory
Makefile:246: recipe for target 'install-cli' failed
make: *** [install-cli] Error 1
Installing PHP LiteSpeed binary:   /usr/local/lsws/lsphp5/bin/
Installing PHP CGI binary:        /usr/local/lsws/lsphp5/bin/
Installing PHP CGI man page:      /usr/local/lsws/lsphp5/php/man/man1/
cp: cannot stat 'sapi/cgi/php-cgi.1': No such file or directory
Makefile:268: recipe for target 'install-cgi' failed
make: *** [install-cgi] Error 1
Installing build environment:     /usr/local/lsws/lsphp5/lib/php/build/
Installing header files:          /usr/local/lsws/lsphp5/include/php/
Installing helper programs:       /usr/local/lsws/lsphp5/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/lsws/lsphp5/php/man/man1/
  page: phpize.1
cp: cannot stat 'scripts/man1/phpize.1': No such file or directory
  page: php-config.1
cp: cannot stat 'scripts/man1/php-config.1': No such file or directory
Makefile:436: recipe for target 'install-programs' failed
make: *** [install-programs] Error 1
Installing PEAR environment:      /usr/local/lsws/lsphp5/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.12
[PEAR] Console_Getopt - already installed: 1.3.1
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util       - already installed: 1.2.3
[PEAR] PEAR           - already installed: 1.9.5
Wrote PEAR system config file at: /usr/local/lsws/lsphp5/etc/pear.conf
You may want to add: /usr/local/lsws/lsphp5/lib/php to your php.ini include_path
/usr/local/lsws/phpbuild/php-5.4.32/build/shtool install -c ext/phar/phar.phar /usr/local/lsws/lsphp5/bin
ln -s -f /usr/local/lsws/lsphp5/bin/phar.phar /usr/local/lsws/lsphp5/bin/phar
cp: cannot stat 'ext/phar/phar.1': No such file or directory
Makefile:345: recipe for target 'install-pharcmd' failed
make: *** [install-pharcmd] Error 1
Installing PDO headers:          /usr/local/lsws/lsphp5/include/php/ext/pdo/
make: Target 'install' not remade because of errors.
**ERROR** Could not install PHP 

The files it wants are there in .1.in form, but a "make clean" that is ran just before compile removes the .1 files it wants which were created during the ./configure process.

I can get OLS to successfully compile 5.4.32 by commenting (or removing) the "make clean" line located within /usr/local/lsws/admin/html.open/utility/build_php/build_install.template (there is only one occurrence).

I don't think this omission would break anything long-term, but let me know if I'm wrong and what this is used for, if not just a habit.

-- 
Bryan

George Alin

unread,
Aug 28, 2014, 3:46:14 AM8/28/14
to openlitespee...@googlegroups.com
Chmod lsphp5 folder to 0777, delete everything thats in it and compile again.

Bryan Parker

unread,
Aug 28, 2014, 7:55:15 AM8/28/14
to openlitespee...@googlegroups.com
George,

I would appreciate a more detailed response rather than being told what to do without why I'm doing it, especially when it makes no sense given the circumstances, and advises using 777 on anything.

-- 
Thanks,
Bryan

Jason L

unread,
Nov 10, 2014, 10:00:50 PM11/10/14
to openlitespee...@googlegroups.com
I got the same error. Actually, it turns out to be a bug in PHP. See https://bugs.php.net/bug.php?id=66842
The problem is that "make clean" deletes the .1 files, which are needed later by "make install"

My way round it was to comment out "make clean" in the buildphp_xxxxxxxxx.1.install.sh shell file that's called by /usr/local/lsws/phpbuild/buildphp_manual_run.sh

A more correct workaround is suggested by Barry Jaspan:
wrap these commands around make clean, which solves the problem:

find . -name '*.1' > /tmp/php-1.lst.$$
tar -cf /tmp/php-1.tar.$$ -T /tmp/php-1.lst.$$
make clean
tar -xf /tmp/php-1.tar.$$
rm /tmp/php-1.tar.$$ /tmp/php-1.lst.$$
Reply all
Reply to author
Forward
0 new messages