php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31883 Doesn't compile on ia64
Submitted: 2005-02-08 14:25 UTC Modified: 2005-02-17 05:46 UTC
From: mcihar at suse dot cz Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.0.3 OS: Linux, IA64
Private report: No CVE-ID: None
 [2005-02-08 14:25 UTC] mcihar at suse dot cz
Description:
------------
Current php sources doesn't compile on IA64 machines.

Reproduce code:
---------------
./configure
make

Expected result:
----------------
working php

Actual result:
--------------
/bin/sh /usr/src/packages/BUILD/php-5.0.3/build-apache2/libtool --silent --preserve-dup-deps --mode=compile gcc  -IZend/ -I/usr/src/packages/BUILD/php-5.0.3/Zend/ -DPHP_ATOM_INC -I/usr/src/packages/BUILD/php-5.0.3/build-apache2/include -I/usr/src/packages/BUILD/php-5.0.3/build-apache2/main -I/usr/src/packages/BUILD/php-5.0.3 -I/usr/src/packages/BUILD/php-5.0.3/build-apache2/Zend -I/usr/include/libxml2 -I/usr/src/packages/BUILD/php-5.0.3/main -I/usr/src/packages/BUILD/php-5.0.3/Zend -I/usr/src/packages/BUILD/php-5.0.3/TSRM -I/usr/src/packages/BUILD/php-5.0.3/build-apache2/  -I/usr/src/packages/BUILD/php-5.0.3/build-apache2/TSRM  -O2 -fmessage-length=0 -Wall -fno-strict-aliasing -DOLD_READLINE  -prefer-pic -c /usr/src/packages/BUILD/php-5.0.3/Zend/zend_strtod.c -o Zend/zend_strtod.lo 
/usr/src/packages/BUILD/php-5.0.3/Zend/zend_strtod.c:233: error: syntax error before "one"
/usr/src/packages/BUILD/php-5.0.3/Zend/zend_strtod.c:233: warning: type defaults to `int' in declaration of `IEEE_BIG_ENDIAN'
/usr/src/packages/BUILD/php-5.0.3/Zend/zend_strtod.c:233: warning: type defaults to `int' in declaration of `VAX'
/usr/src/packages/BUILD/php-5.0.3/Zend/zend_strtod.c:234: warning: type defaults to `int' in declaration of `or'
/usr/src/packages/BUILD/php-5.0.3/Zend/zend_strtod.c:234: error: syntax error before "IBM"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-08 14:27 UTC] mcihar at suse dot cz
Here is patch for this issue (why is here no way to attach patches?). It also adds rather #error directive instead of text.

--- php-5.0.3/Zend/zend_strtod.c.orig   2005-01-26 20:14:32.000000000 +0100
+++ php-5.0.3/Zend/zend_strtod.c        2005-02-08 13:05:34.898089577 +0100
@@ -96,6 +96,7 @@
 #endif /* LIBC_SCCS and not lint */

 #if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
+    defined(__ia64__) ||  \
     defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
     defined(__powerpc__) || defined(__ppc__) || defined(__m88k__) || \
     defined(__hppa__) || defined(__x86_64__) || (defined(__arm__) && \
@@ -230,8 +231,7 @@

 #if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + \
     defined(IBM) != 1
-Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or
-IBM should be defined.
+#error Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or IBM should be defined.
 #endif

 typedef union {
 [2005-02-08 14:28 UTC] mcihar at suse dot cz
Just forgot to mention that same applies on 4.3.10
 [2005-02-08 14:28 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip
 [2005-02-08 15:01 UTC] mcihar at suse dot cz
Hmm, the rewritten code in cvs looks much better, the endian problem should not appear (I haven't yet tested it, will do that soon). However the second part of patch IMHO should be applied anyway. It's better to get preprocessor error, than getting tons of syntax and undefined errors from compiler.
 [2005-02-08 15:08 UTC] derick@php.net
Unfortunately we can't - there are some weird preprocessors out there.
 [2005-02-08 15:23 UTC] mcihar at suse dot cz
And what weird do they do on #error? If they ignore it, there might be line with #error and then one without it. This way you'd get reasonable error message in case preprocessor supports it.

CVS snapshot builds fine on IA64, thanks.
 [2005-02-17 05:46 UTC] sniper@php.net
This bug has been fixed in CVS.

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.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 19 14:00:02 2025 UTC