Bug #50400 [Com]: Compile fails generating phar.phar
Edit report at http://bugs.php.net/bug.php?id=50400&edit=1
ID: 50400
Comment by: steve at computurn dot com
Reported by: lepage at grm dot polymtl dot ca
Summary: Compile fails generating phar.phar
Status: Feedback
Type: Bug
Package: PHAR related
Operating System: Solaris 10
PHP Version: 5.3.1
Assigned To: dsp
Block user comment: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2010-07-05 21:43:00] 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-07-02 11:33:17] 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-02 01:04:44] 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-01-26 17:09:36] 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.
------------------------------------------------------------------------
[2009-12-07 20:13:01] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=50400&edit=1
Thread (9 messages)