From:             yatessc at telkom dot co dot za
Operating system: Solaris 9 sparc
PHP version:      5.3.1
PHP Bug Type:     Compile Failure
Bug description:  Compile failure compiling ext/phar/util.lo  

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 bug report at http://bugs.php.net/?id=50358&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50358&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50358&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50358&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50358&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50358&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50358&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50358&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50358&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50358&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50358&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50358&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50358&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50358&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50358&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50358&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50358&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50358&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50358&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50358&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50358&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50358&r=mysqlcfg

Reply via email to