Bug #50358 [Asn->Csd]: Compile failure compiling ext/phar/util.lo
| From: | felipe@php.net | Date: | Sat, 06 Mar 2010 14:46:35 +0000 |
| Subject: | Bug #50358 [Asn->Csd]: Compile failure compiling ext/phar/util.lo | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-148332@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=50358&edit=1
ID: 50358
Updated by: felipe@php.net
Reported by: yatessc at telkom dot co dot za
Summary: Compile failure compiling ext/phar/util.lo
-Status: Assigned
+Status: Closed
Type: Bug
Package: PHAR related
Operating System: Solaris 9 sparc
PHP Version: 5.3.1
Assigned To: cellog
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2009-12-02 15:39:09] yatessc at telkom dot co dot za
Unfortunately till fails with the same errors (using snapshot
php5.3-200912021330).
I can get it to compile by changing the define in tar.h from:
#ifdef PHP_WIN32
#pragma pack(1)
# define PHAR_TAR_PACK
#elif defined(__sgi)
# define PHAR_TAR_PACK
#else
# define PHAR_TAR_PACK __attribute__((__packed__))
#endif
to
#ifdef PHP_WIN32
#pragma pack(1)
# define PHAR_TAR_PACK
#elif defined(__sgi)
# define PHAR_TAR_PACK
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHAR_TAR_PACK __attribute__((__packed__))
#else
# define PHAR_TAR_PACK
#endif
although I have not yet tested the functioning of the PHAR extension
(busy running the tests).
------------------------------------------------------------------------
[2009-12-02 12:10:01] jani@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[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/bug.php?id=50358&edit=1