#50358 [Opn->Fbk]: Compile failure compiling ext/phar/util.lo
| From: | jani@php.net | Date: | Wed, 02 Dec 2009 12:10:01 +0000 |
| Subject: | #50358 [Opn->Fbk]: Compile failure compiling ext/phar/util.lo | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-145324@lists.php.net to get a copy of this message | ||
ID: 50358
Updated by: jani@php.net
Reported By: yatessc at telkom dot co dot za
-Status: Open
+Status: Feedback
-Bug Type: Compile Failure
+Bug Type: PHAR related
Operating System: Solaris 9 sparc
PHP Version: 5.3.1
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-12-02 11:19:35] yatessc at telkom dot co dot za
Description:
------------
Using Sun ONE Studio compiler, not gcc - error output is:
"/usr/local/php-5.3.1/ext/phar/tar.h", line 52: syntax error before or
at: (
"/usr/local/php-5.3.1/ext/phar/tar.h", line 52: warning: "typedef"
valid only for function declaration
"/usr/local/php-5.3.1/ext/phar/tar.h", line 52: warning: old-style
declaration or incorrect type for: old_tar_header
"/usr/local/php-5.3.1/ext/phar/tar.h", line 92: syntax error before or
at: (
"/usr/local/php-5.3.1/ext/phar/tar.h", line 92: warning: "typedef"
valid only for function declaration
"/usr/local/php-5.3.1/ext/phar/tar.h", line 92: identifier redefined:
__attribute__
current : function() returning struct _tar_header {array[100]
of char name, array[8] of char mode, array[8] of char uid, arr
ay[8] of char gid, array[12] of char size, array[12] of char mtime,
array[8] of char checksum, char typeflag, array[100] of char lin
kname, array[6] of char magic, array[2] of char version, array[32] of
char uname, array[32] of char gname, array[8] of char devmajor
, array[8] of char devminor, array[155] of char prefix, array[12] of
char padding}
previous: function() returning struct _old_tar_header
{array[100] of char name, array[8] of char mode, array[8] of char uid,
array[8] of char gid, array[12] of char size, array[12] of char mtime,
array[8] of char checksum, char link, array[100] of char lin
kname} : "/usr/local/php-5.3.1/ext/phar/tar.h", line 52
"/usr/local/php-5.3.1/ext/phar/tar.h", line 92: warning: old-style
declaration or incorrect type for: tar_header
cc: acomp failed for /usr/local/php-5.3.1/ext/phar/util.c
*** Error code 1
This appears to be related to #46072, but the fix for that does not
work directly on Solaris. It appears to be due to the
# define PHAR_TAR_PACK __attribute__((__packed__))
in line 28 of ext/phar/tar.h - all other uses of __attribute__ in
various PHP sources are wrapped with
#if defined(__GNUC__) && __GNUC__ >= 4
and reproducing that here also allows compilation to succeed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50358&edit=1