php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50753 crypt_sha256.c / crypt_sha512.c - Gnu specific code, non-Gnu compiler
Submitted: 2010-01-14 15:22 UTC Modified: 2010-02-09 22:26 UTC
From: yatessc at telkom dot co dot za Assigned: dsp (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.3.2RC1 OS: Solaris 9 Sparc
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yatessc at telkom dot co dot za
New email:
PHP Version: OS:

 

 [2010-01-14 15:22 UTC] yatessc at telkom dot co dot za
Description:
------------
Using Sun ONE Studio 8 cc compiler on Solaris 9 Sparc.
Compilation of ext/standard/crypt_sha512.c fails with:
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 376: syntax error before or at: __attribute__
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 377: invalid type combination
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 378: syntax error before or at: __attribute__
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 380: invalid type combination
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 416: warning: implicit function declaration: __alignof__
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 416: syntax error before or at: uint64_t
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 419: undefined symbol: tmp
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 419: syntax error before or at: uint64_t
"/usr/local/php5.3-201001130730/ext/standard/crypt_sha512.c", line 420: cannot recover from previous errors

ext/standard/crypt_sha256.c also fails with similar errors,
just different line numbers.

I believe that __attribute__ and __alignof__ are Gnu specific
extensions, although __alignof__ has been adopted by some other 
compilers (e.g. Sun Studio, but only from Release 12 onwards).

The problem still exists with yesterday's snapshot
(php5.3-201001130730.tar.gz).


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-14 15:33 UTC] johannes@php.net
Related to #50496.

David, as you expected the other C99 types create some trouble, too :-/
 [2010-02-09 21:58 UTC] svn@php.net
Automatic comment from SVN on behalf of johannes
Revision: http://svn.php.net/viewvc/?view=revision&revision=294825
Log: Detect if we can rely on compiler-specific alignment features else use custom
workarounds. Fixes #50753
 [2010-02-09 22:26 UTC] johannes@php.net
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.


 [2010-02-09 22:29 UTC] svn@php.net
Automatic comment from SVN on behalf of johannes
Revision: http://svn.php.net/viewvc/?view=revision&revision=294827
Log: merge 294825: Detect if we can rely on compiler-specific alignment features else
use custom workarounds. Fixes #50753 (johannes)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 14:01:34 2025 UTC