php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50400 Compile fails generating phar.phar
Submitted: 2009-12-07 20:13 UTC Modified: 2012-11-16 05:53 UTC
Votes:19
Avg. Score:3.9 ± 0.9
Reproduced:16 of 16 (100.0%)
Same Version:6 (37.5%)
Same OS:7 (43.8%)
From: lepage at grm dot polymtl dot ca Assigned: dsp (profile)
Status: No Feedback Package: PHAR related
PHP Version: 5.3.1 OS: Solaris 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lepage at grm dot polymtl dot ca
New email:
PHP Version: OS:

 

 [2009-12-07 20:13 UTC] lepage at grm dot polymtl dot ca
Description:
------------
Cannot gcc compile php 5.3.1 on Solaris 10 (sparc) since it's failing with phar/phar.php error. It was the same with php 5.3.0.

SunStudio is not an option since many libs are done with gcc and there is incompatibilities with some dependencies. 

php 515 does compile on Solaris 10.
thanks.

Reproduce code:
---------------
php-5.3.1% make
Generating phar.phar

Parse error: syntax error, unexpected $end in /share/concorde/xta3511/install/web/php-5.3.1/ext/phar/phar.php on line 19
*** Error code 255
The following command caused the error:
`  if test -x "/share/concorde/xta3511/install/web/php-5.3.1/sapi/cli/php"; then  /share/concorde/xta3511/install/web/php-5.3.1/build/shtool echo -n -- "/share/concorde/xta3511/install/web/php-5.3.1/sapi/cli/php -n";  if test "x" != "x"; then  /share/concorde/xta3511/install/web/php-5.3.1/build/shtool echo -n -- " -d extension_dir=/share/concorde/xta3511/install/web/php-5.3.1/modules";  for i in bz2 zlib phar; do  if test -f "/share/concorde/xta3511/install/web/php-5.3.1/modules/$i.la"; then  . /share/concorde/xta3511/install/web/php-5.3.1/modules/$i.la; /share/concorde/xta3511/install/web/php-5.3.1/build/shtool echo -n -- " -d extension=$dlname";  fi;  done;  fi;  else  /share/concorde/xta3511/install/web/php-5.3.1/build/shtool echo -n -- "";  fi;` -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' ext/phar/phar.php pack -f ext/phar/phar.phar -a pharcommand -c auto -x \\.svn -p 0 -s /share/concorde/xta3511/install/web/php-5.3.1/ext/phar/phar/phar.php -h sha1 -b "`if test -x ""; then  /share/concorde/xta3511/install/web/php-5.3.1/build/shtool echo -n -- "";  else  /share/concorde/xta3511/install/web/php-5.3.1/build/shtool echo -n -- "/usr/local_10/opt/php-531/bin/php";  fi; `"  /share/concorde/xta3511/install/web/php-5.3.1/ext/phar/phar/
make: Fatal error: Command failed for target `ext/phar/phar.phar'


Expected result:
----------------
to compile.

Actual result:
--------------
failed compiling.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-26 17:09 UTC] ekcheu at uncg dot edu
I've had this issue before.  It appears that this error occurs depending upon which version of gcc you are using.  After continuing to fail to compile on a version of gcc (4.2.1).. I used blastwave's gcc, and it was able to get past this issue.  Don't ask why it compiles find on some versions of gcc and not others.
 [2010-07-02 01:04 UTC] omars1234 at gmail dot com
As a work-around, pass "--disable-phar" to configure.  I don't do anything that explicitly needs phar archives (so far), so I did this to build PHP5.3.2 on Solaris10 after running into the same problem.
 [2010-07-02 11:33 UTC] johannes@php.net
-Status: Assigned +Status: Feedback
 [2010-07-02 11:33 UTC] johannes@php.net
Please try using this snapshot:

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

  http://windows.php.net/snapshots/
 [2010-07-05 21:43 UTC] omars1234 at gmail dot com
Tried the new snapshot, no luck.  Using Solaris10, gcc 4.2.1.  Configured without any options.

Generating phar.php
*** Error code 139
The following command caused the error:
`  if test -x "/tmp/php5.3-201007051830/sapi/cli/php"; then  /tmp/php5.3-201007051830/build/shtool echo -n -- "/tmp/php5.3-201007051830/sapi/cli/php -n";  if test "x" != "x"; then  /tmp/php5.3-201007051830/build/shtool echo -n -- " -d extension_dir=/tmp/php5.3-201007051830/modules";  for i in bz2 zlib phar; do  if test -f "/tmp/php5.3-201007051830/modules/$i.la"; then  . /tmp/php5.3-201007051830/modules/$i.la; /tmp/php5.3-201007051830/build/shtool echo -n -- " -d extension=$dlname";  fi;  done;  fi;  else  /tmp/php5.3-201007051830/build/shtool echo -n -- "/tmp/php5.3-201007051830/sapi/cli/php";  fi;` -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' /tmp/php5.3-201007051830/ext/phar/build_precommand.php > ext/phar/phar.php
make: Fatal error: Command failed for target `ext/phar/phar.php'

(my disable-phar version didn't work out either, resulting cli-binary core dumps :( )
 [2010-09-28 15:26 UTC] steve at computurn dot com
I have a fix for this issue (PHP5.3.3)

It's caused by ext/phar/build_precommand.php having a header of #!/usr/bin/php
I fixed it on my system by creating a /usr/bin/php symlink to a php executable, but I suspect the proper fix will be to change the #! to point to sapi/cli/php, if that's built when we get to this stage.
 [2012-11-16 05:53 UTC] dsp@php.net
-Status: Feedback +Status: No Feedback
 [2012-11-16 05:53 UTC] dsp@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2013-04-21 03:00 UTC] uorsini1 at gmail dot com
See my comment from 4/20/2013 in https://bugs.php.net/bug.php?id=51216 for a 
possible cause/workaround.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 26 22:01:23 2020 UTC