php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48740 PHAR install fails when INSTALL_ROOT is not the final install location
Submitted: 2009-06-30 14:00 UTC Modified: 2009-07-31 01:00 UTC
Votes:6
Avg. Score:4.0 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: james dot cohen at digitalwindow dot com Assigned: cellog (profile)
Status: No Feedback Package: PHAR related
PHP Version: 5.3.0 OS: CentOS release 5.3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-06-30 14:00 UTC] james dot cohen at digitalwindow dot com
Description:
------------
When you run `make install` to install PHAR to a location other than the final build location an error occurs. Building an RPM within a build root is a good example of when this might occur.

The bin/phar symbolic link point will point to the build root rather than the install root.

php-5.3.0/ext/phar/Makefile.frag

Line 46 reads:
$(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar

To correct the bug the line should be modified to the following

$(LN_S) -f phar.phar $(INSTALL_ROOT)$(bindir)/phar


This should be safe as both are in the same directory ($(INSTALL_ROOT)$(bindir)/phar)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-30 14:16 UTC] james dot cohen at digitalwindow dot com
--- php-5.3.0/ext/phar/Makefile.frag	2009-06-30 15:01:38.000000000 +0100
+++ php-5.3.0/ext/phar/Makefile.frag.symlink	2009-06-30 15:05:27.000000000 +0100
@@ -43,4 +43,4 @@ $(builddir)/phar.phar: $(builddir)/phar.
 install-pharcmd: pharcmd
 	-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
 	$(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)
-	$(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar
+	$(LN_S) -f phar.phar $(INSTALL_ROOT)$(bindir)/phar
 [2009-07-23 15:33 UTC] cellog@php.net
hi,

that actually should be:

--- php-5.3.0/ext/phar/Makefile.frag	2009-06-30 15:01:38.000000000
+0100
+++ php-5.3.0/ext/phar/Makefile.frag.symlink	2009-06-30
15:05:27.000000000 +0100
@@ -43,4 +43,4 @@ $(builddir)/phar.phar: $(builddir)/phar.
 install-pharcmd: pharcmd
 	-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
 	$(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)
-	$(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar
$(INSTALL_ROOT)$(bindir)/phar
+	$(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar

Otherwise the symbolic link will be to any file phar.phar in the path and not specifically to our phar.phar


 [2009-07-23 15:40 UTC] cellog@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-07-23 16:13 UTC] james dot cohen at digitalwindow dot com
Hi - I've just tried to build it but the snapshot "php5.3-200907231430" doesn't appear to include this change.
 [2009-07-31 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2013-01-07 20:19 UTC] kevin at twilio dot com
Hi, I'm still running into this issue while trying to compile PHP 5.4.10 on Centos 
6.3. A (bad) workaround is to install it in the usual place, then install it to 
the INSTALL_ROOT directory.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC