Bug #66842 [Com]: make install fails -> cp: cannot stat sapi/cli/php.1: No such file
Edit report at https://bugs.php.net/bug.php?id=66842&edit=1
ID: 66842
Comment by: barry dot jaspan at acquia dot com
Reported by: lists at iezzi dot ch
Summary: make install fails -> cp: cannot stat
sapi/cli/php.1: No such file
Status: Open
Type: Bug
Package: Compile Failure
Operating System: Debian Wheezy 7.4
PHP Version: 5.5.10
Block user comment: N
Private report: N
New Comment:
Confirmed that the problem is with make clean. We build cli and fpm sapis, which I guess requires
that we run configure multiple times. Our process is: configure, make clean, make <target>,
make install; configure, make clean, make <other target>, make install.
We now 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.$$
This is definitely a regression in PHP 5.5.10 and presumably should be fixed.
Previous Comments:
------------------------------------------------------------------------
[2014-03-11 07:42:26] lists at iezzi dot ch
> Is there any possibility "make clean" called somewhere in the middle of a build
> process? Just faced it myself.
Great! That did the trick.
During my last 13 years of compiling PHP I always run "make clean" after
"./configure", right before "make". I personally don't care if I need to
change this order in my compilation scripts. I'd prefer if PHP would follow the GNU coding
standards, though.
Thanks a lot for your advice!
------------------------------------------------------------------------
[2014-03-11 07:00:03] adushechkin at parallels dot com
Is there any possibility "make clean" called somewhere in the middle of a build process?
Just faced it myself.
There is an interesting change in 5.5.10:
diff -ruN php-5.5.9/Makefile.global php-5.5.10/Makefile.global
--- php-5.5.9/Makefile.global 2014-02-05 17:00:36.000000000 +0700
+++ php-5.5.10/Makefile.global 2014-03-05 17:18:00.000000000 +0700
@@ -115,6 +115,7 @@
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
+ find . -name \*.1 | xargs rm -f
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH)
$(SAPI_LITESPEED_P
ATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
Seems that *.1 files are generated during "./configure" stage, but deleted during
"make clean", which is somewhat against GNU coding standards (see https://www.gnu.org/prep/standards/html_node/Standard-Targets.html).
I suppose it's better to remove them in "distclean" since make can't regenerate
them if needed.
------------------------------------------------------------------------
[2014-03-08 00:09:45] barry dot jaspan at acquia dot com
Reproduced on Ubuntu 10.04 and 12.04 with PHP 5.5.10.
+ wget http://us1.php.net/distributions/php-5.5.10.tar.bz2
+ ./buildconf --force
Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.65 (ok)
rebuilding aclocal.m4
rebuilding configure
rebuilding main/php_config.h.in
+ ./configure --enable-cli --with-config-file-path=/usr/local/php5.5/etc/cli
--with-config-file-scan-dir=/usr/local/php5.5/etc/cli/conf.d --prefix=/usr/local/php5.5
--enable-bcmath --with-gmp --with-bz2=/usr --enable-calendar --with-curl --enable-dba --with-db4
--enable-exif --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr
--enable-ftp --with-gettext --with-imap --with-kerberos --with-imap-ssl --enable-inline-optimization
--with-ldap --with-ldap-sasl --with-openssl=/usr --enable-mbstring --enable-mbregex --with-mcrypt
--with-mhash --with-mssql --with-mysql --with-mysql-sock=/var/run/mysqld/mysqld.sock
--with-mysqli=/usr/bin/mysql_config --enable-pcntl --with-pcre-regex --with-pgsql --with-pdo-mysql
--with-pdo-pgsql --with-pdo-dblib --with-pspell=/usr --with-readline --enable-shmop --enable-soap
--enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-tidy --with-t1lib=/usr
--enable-wddx --enable-xml --with-xmlrpc --with-xs!
l --with-xpm-dir=/usr --enable-zip --with-zlib --with-libdir=/lib
... much output removed ...
Build complete.
Don't forget to run 'make test'.
+ make install
Installing shared extensions: /usr/local/php5.5/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CLI binary: /usr/local/php5.5/bin/
Installing PHP CLI man page: /usr/local/php5.5/php/man/man1/
cp: cannot stat `sapi/cli/php.1': No such file or directory
make: *** [install-cli] Error 1
------------------------------------------------------------------------
[2014-03-07 10:19:36] lists at iezzi dot ch
some additional information:
--snip--
# make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
--snip--
--snip--
# gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--snip--
--snip--
# ld --version
GNU ld (GNU Binutils for Debian) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
--snip--
------------------------------------------------------------------------
[2014-03-07 10:11:28] lists at iezzi dot ch
Description:
------------
Both compilation of PHP 5.5.10 and 5.4.26 fail upon 'make install':
--snip--
./configure --prefix=/opt/php/5.5.10 --with-config-file-path=/etc/php55 --with-pear=/usr/share/php
--with-imap --enable-ftp --enable-exif --with-xsl --enable-soap --disable-rpath --enable-calendar
--with-gettext --enable-mbstring --enable-sockets --enable-wddx --enable-sysvsem --enable-sysvshm
--disable-debug --enable-bcmath --enable-ctype --enable-dba --enable-intl --with-readline
--with-iconv --with-bz2 --disable-static --with-mysql=mysqlnd --with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-imap-ssl
--with-kerberos --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib --enable-zip
--with-curl --with-mhash --enable-gd-native-ttf --with-freetype-dir --with-t1lib --with-layout=GNU
--with-pcre-regex --enable-sysvmsg --with-xmlrpc --with-gmp --with-mm --with-mcrypt
--with-zlib-dir=/usr --with-openssl=/usr --enable-shmop --enable-tokenizer --with-ldap=/usr
--with-libdir=/lib/x86_64-linux-gnu
--snip--
--snip--
Installing shared extensions: /opt/php/5.5.10/lib/php/20121212/
Installing PHP CLI binary: /opt/php/5.5.10/bin/
Installing PHP CLI man page: /opt/php/5.5.10/share/man/man1/
cp: cannot stat `sapi/cli/php.1': No such file or directory
make: *** [install-cli] Error 1
--snip--
Directory listing of sapi/cli/...
--snip--
# ls -lah sapi/cli/
total 44M
drwxr-xr-x 4 1001 1001 4.0K Mar 7 10:55 .
drwxr-xr-x 24 1001 1001 4.0K Mar 5 11:18 ..
-rw-r--r-- 1 1001 1001 1.9K Mar 5 11:18 cli.h
-rw-r--r-- 1 1001 1001 56 Mar 5 11:18 cli_win32.c
-rw-r--r-- 1 1001 1001 3.3K Mar 5 11:18 config.m4
-rw-r--r-- 1 1001 1001 715 Mar 5 11:18 config.w32
-rw-r--r-- 1 1001 1001 88 Mar 5 11:18 CREDITS
drwxr-xr-x 2 root root 4.0K Mar 7 10:54 .libs
-rw-r--r-- 1 1001 1001 590 Mar 5 11:18 Makefile.frag
-rwxr-xr-x 1 root root 43M Mar 7 10:55 php
-rw-r--r-- 1 1001 1001 9.4K Mar 5 11:18 php.1.in
-rw-r--r-- 1 1001 1001 39K Mar 5 11:18 php_cli.c
-rw-r--r-- 1 root root 321 Mar 7 10:54 php_cli.lo
-rw-r--r-- 1 root root 177K Mar 7 10:54 php_cli.o
-rw-r--r-- 1 1001 1001 2.6K Mar 5 11:18 php_cli_process_title.c
-rw-r--r-- 1 1001 1001 1.6K Mar 5 11:18 php_cli_process_title.h
-rw-r--r-- 1 root root 363 Mar 7 10:54 php_cli_process_title.lo
-rw-r--r-- 1 root root 40K Mar 7 10:54 php_cli_process_title.o
-rw-r--r-- 1 1001 1001 73K Mar 5 11:18 php_cli_server.c
-rw-r--r-- 1 1001 1001 1.9K Mar 5 11:18 php_cli_server.h
-rw-r--r-- 1 root root 342 Mar 7 10:54 php_cli_server.lo
-rw-r--r-- 1 root root 412K Mar 7 10:54 php_cli_server.o
-rw-r--r-- 1 1001 1001 45K Mar 5 11:18 php_http_parser.c
-rw-r--r-- 1 1001 1001 5.3K Mar 5 11:18 php_http_parser.h
-rw-r--r-- 1 root root 345 Mar 7 10:54 php_http_parser.lo
-rw-r--r-- 1 root root 55K Mar 7 10:54 php_http_parser.o
-rw-r--r-- 1 1001 1001 13K Mar 5 11:18 ps_title.c
-rw-r--r-- 1 1001 1001 1.7K Mar 5 11:18 ps_title.h
-rw-r--r-- 1 root root 324 Mar 7 10:54 ps_title.lo
-rw-r--r-- 1 root root 16K Mar 7 10:54 ps_title.o
-rw-r--r-- 1 1001 1001 828 Mar 5 11:18 README
drwxr-xr-x 2 1001 1001 4.0K Mar 5 11:18 tests
-rw-r--r-- 1 1001 1001 7 Mar 5 11:18 TODO
--snip--
Expected result:
----------------
Should be able to compile.
Actual result:
--------------
Compile failure upon make install.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66842&edit=1
Thread (8 messages)