PHP :: Bug #50358 :: Compile failure compiling ext/phar/util.lo
| Bug #50358 | Compile failure compiling ext/phar/util.lo | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2009-12-02 11:19 UTC | Modified: | 2010-03-06 15:46 UTC |
|
||||||
| From: | yatessc at telkom dot co dot za | Assigned: | cellog (profile) | |||||||
| Status: | Closed | Package: | PHAR related | |||||||
| PHP Version: | 5.3.1 | OS: | Solaris 9 sparc | |||||||
| Private report: | No | CVE-ID: | None | |||||||
[2009-12-02 11:19 UTC] 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.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-12-02 15:39 UTC] yatessc at telkom dot co dot za
[2010-03-06 15:46 UTC] felipe@php.net
-Status: Assigned +Status: Closed
[2010-03-06 15:46 UTC] felipe@php.net