Bug #70595 [Fbk->NoF]: Generating phar.phar failed under OS X 10.11
| From: | php-bugs at lists dot php dot net | Date: | Sun, 14 Feb 2021 04:22:08 +0000 |
| Subject: | Bug #70595 [Fbk->NoF]: Generating phar.phar failed under OS X 10.11 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232144@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70595&edit=1
ID: 70595
Updated by: php-bugs@lists.php.net
Reported by: 191919 at gmail dot com
Summary: Generating phar.phar failed under OS X 10.11
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Compile Failure
Operating System: OS X
PHP Version: 7.0Git-2015-09-28 (Git)
Assigned To: cmb
Private report: N
New Comment:
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 "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-02-03 13:15:24] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2015-09-28 03:55:43] 191919 at gmail dot com
Description:
------------
dev failed to build under OS X 10.11 when generating phar.phar.
```
$ rm -rf /opt/php7
$ ./buildconf
$ ./configure --prefix=/opt/php7 --enable-opcache
$ make
...
...
...
Generating phar.phar
Parse error: syntax error, unexpected end of file in /Users/XX/box/php-src/ext/phar/phar.php on line
3
make: *** [ext/phar/phar.phar] Error 255
```
I checked the generated phar.php, which looks like an error message output elsewhere.
```
$ cat /Users/XX/box/php-src/ext/phar/phar.php
Parse error: syntax error, unexpected ''<'' (T_ENCAPSED_AND_WHITESPACE),
expecting '(' in /Users/XX/box/php-src/ext/phar/build_precommand.php on line 2
```
build_precommand.php looks like totally valid:
```
$ cat /Users/XX/box/php-src/ext/phar/build_precommand.php
#!/usr/bin/php
<?php echo '<'.'?php';?>
/** @file phar.php
* @ingroup Phar
* @brief class Phar Pre Command
* @author Marcus Boerger
* @date 2007 - 2008
*
* Phar Command
*/
foreach(array("SPL", "Reflection", "Phar") as $ext) {
if (!extension_loaded($ext)) {
echo "$argv[0] requires PHP extension $ext.\n";
exit(1);
}
}
<?php
$classes = array(
'DirectoryTreeIterator',
'DirectoryGraphIterator',
'InvertedRegexIterator',
'CLICommand',
'PharCommand',
);
foreach($classes as $name) {
echo "if (!class_exists('$name', 0))\n{\n";
$f = file(dirname(__FILE__) . '/phar/' . strtolower($name) . '.inc');
unset($f[0]);
$c = count($f);
while ($c && (strlen($f[$c]) == 0 || $f[$c] == "\n" || $f[$c] ==
"\r\n")) {
unset($f[$c--]);
}
if (substr($f[$c], -2) == "\r\n") {
$f[$c] = substr($f[$c], 0, -2);
}
if (substr($f[$c], -1) == "\n") {
$f[$c] = substr($f[$c], 0, -1);
}
if (substr($f[$c], -2) == '?>') {
$f[$c] = substr($f[$c], 0,-2);
}
while ($c && (strlen($f[$c]) == 0 || $f[$c] == "\n" || $f[$c] ==
"\r\n")) {
unset($f[$c--]);
}
echo join('', $f);
echo "\n}\n\n";
}
echo 'new PharCommand($argc, $argv);'."\n";
?>
```
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70595&edit=1