Bug #66842 [Opn->Csd]: make install fails -> cp: cannot stat sapi/cli/php.1: No such file

From: Date: Thu, 25 Aug 2016 10:00:13 +0000
Subject: Bug #66842 [Opn->Csd]: make install fails -> cp: cannot stat sapi/cli/php.1: No such file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203534@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66842&edit=1

 ID:                 66842
 Updated by:         cmb@php.net
 Reported by:        lists at iezzi dot ch
 Summary:            make install fails -> cp: cannot stat
                     sapi/cli/php.1: No such file
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Compile Failure
 Operating System:   Debian Wheezy 7.4
 PHP Version:        5.5.10
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

This issue has been fixed with commit a930e047[1], i.e. as of PHP
5.5.11.

[1] <https://github.com/php/php-src/commit/a930e047>


Previous Comments:
------------------------------------------------------------------------
[2014-08-10 12:09:36] shal at semantic-fidelity dot org

I've encountered similar issue with Debian GNU/Linux 7.5, php 5.4.31 when executing 

make clean # without having proceeded to compilation even once

before executing

make && make install

------------------------------------------------------------------------
[2014-03-13 21:39:39] barry dot jaspan at acquia dot com

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.

------------------------------------------------------------------------
[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

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=66842


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


Thread (8 messages)

« previous php.bugs (#203534) next »