From:             
Operating system: Any
PHP version:      5.4.2
Package:          Compile Failure
Bug Type:         Bug
Bug description:"make install" script fails when prefix dir is a symbolic link

Description:
------------
I've been using a symbolic link scheme for the prefix destination dir of 
PHP/Apache/etc. software that I compile myself for over ten years now, to
easily 
and quickly switch between releases in case of problems showing up when I
move 
to a new version:

# ls -l /usr/opt
drwxr-xr-x   6 root  wheel  512 Mar 20  2011 php536
drwxr-xr-x   6 root  wheel  512 Dec 11 12:44 php538
drwxr-xr-x  16 root  wheel  512 May  5 11:02 php542
lrwxr-xr-x   1 root  wheel    6 May  5 11:02 php -> php542
...

./configure --prefix=/usr/opt/php --other-flags

If something goes wrong, I just shut down the servers, change the
symbolical 
link, restart... You get the idea...

It is not a problem with any earlier version of PHP, but as of PHP 5.4.0 
something changed in the "install" portion of the Makefile that breaks this

handy practice:

# make install
Installing PHP CLI binary:        /usr/opt/php/bin/
Installing PHP CLI man page:      /usr/opt/php/php/man/man1/
mkdir: /usr/opt/php/php: File exists
mkdir: /usr/opt/php/php/man: Too many levels of symbolic links
mkdir: /usr/opt/php/php/man/man1: Too many levels of symbolic links
*** Error code 1

Stop in /usr/opt/php-5.4.2 (line 243 of Makefile).


And when I take a look at what the install script has been doing:

# cd /usr/opt/php
# ls -l
total 4
drwxr-xr-x  2 root  wheel  512 May  5 13:43 bin
lrwxr-xr-x  1 root  wheel    3 May  5 11:02 php -> php


For some reason, when the prefix dir is a symbolic link, the 5.4.x Makefile

creates a symbolic link to itself inside the prefix dir. Note also that the

timestamp of the symbolic is identical to the actual symbolic link I make
for 
the prefix destination, as if the Makefile tries to copy the directory into

itself.

The problem is easily solved by entering the prefix dir, removing the
broken 
link that the install script creates and just "mkdir php", then resuming
"make 
install" again.

This shouldn't be needed, obviously. The script shouldn't fail just because
the 
prefix happens to be a symbolic link to an actual destination sitting in
the 
same directory - there are no technical complications caused by this handy

practice.



-- 
Edit bug report at https://bugs.php.net/bug.php?id=61951&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61951&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61951&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61951&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61951&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61951&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61951&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61951&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61951&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61951&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61951&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61951&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61951&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61951&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61951&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61951&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61951&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61951&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61951&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61951&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61951&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61951&r=mysqlcfg

  • [PHP-BUG] Bug #61951 [NEW]: "... stolen dot data dot net at gmail dot com

Reply via email to