#31121 [Fbk-Opn]: Compilation fails on zend_strtod.c
ID: 31121 User updated by: strube at physik3 dot gwdg dot de Reported By: strube at physik3 dot gwdg dot de -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 7 SPARC PHP Version: 4.3.10 Assigned To: derick New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz Therein (=php4-STABLE-200412171130), zend_strtod.c is no different from the one in 200412210730 I tested previously. And you're wrong about WORDS_BIGENDIAN. It will NOT be defined at all on a system which is not big-endian. Sorry, you are right. I did not actually configure in x86 but concluded this from the php_config.h in the official 4.3.10 release, containing #define WORDS_BIGENDIAN 1. In the present snapshots, it is defined without value. Previous Comments: [2004-12-22 00:46:35] [EMAIL PROTECTED] And you're wrong about WORDS_BIGENDIAN. It will NOT be defined at all on a system which is not big-endian. (not to 0 or not to 1) [2004-12-22 00:45:14] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Try again. [2004-12-21 10:51:54] strube at physik3 dot gwdg dot de I tested compiling zend_strtod.c from php4-STABLE-200412210730 in Solaris 7 SPARC and Solaris 9_x86 with Sun cc and gcc. All compilations succeed, but in x86, still IEEE_BIG_ENDIAN is erroneously defined. Fix line 104: #ifdef WORDS_BIGENDIAN must be #if WORDS_BIGENDIAN because it is either 1 or 0. Also, on those architectures for which subsequent #define IEEE_..._ENDIAN occur (lines 116 and 126; not in Solaris), there will be warnings or errors concerning redefinition of IEEE_..._ENDIAN (not in Solaris) or failure in the test of line 226 due to definition of both IEEE_{BIG,LITTLE}_ENDIAN. I cannot test on those architectures myself. [2004-12-21 05:53:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-12-17 13:00:29] [EMAIL PROTECTED] We had some problems with our snapshots, the next one (9:30 GMT) should have the updated files. If you can try those, please do so. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31121 -- Edit this bug report at http://bugs.php.net/?id=31121edit=1
#31121 [Fbk-Opn]: Compilation fails on zend_strtod.c
ID: 31121 User updated by: strube at physik3 dot gwdg dot de Reported By: strube at physik3 dot gwdg dot de -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 7 SPARC PHP Version: 4.3.10 Assigned To: derick New Comment: I didn't ask you to look if some file is same as it was before. I asked you to try the fresh snapshot. So did it compile or not? As zend_strtod.c is unchanged and compiled with my previous test in Solaris, so will it now. I think the case is solved for Solaris and am not interested in testing the whole snapshot. Also now I can neither continue testing nor reply before January. Previous Comments: [2004-12-22 10:33:26] [EMAIL PROTECTED] I didn't ask you to look if some file is same as it was before. I asked you to try the fresh snapshot. So did it compile or not? [2004-12-22 09:48:08] strube at physik3 dot gwdg dot de Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz Therein (=php4-STABLE-200412171130), zend_strtod.c is no different from the one in 200412210730 I tested previously. And you're wrong about WORDS_BIGENDIAN. It will NOT be defined at all on a system which is not big-endian. Sorry, you are right. I did not actually configure in x86 but concluded this from the php_config.h in the official 4.3.10 release, containing #define WORDS_BIGENDIAN 1. In the present snapshots, it is defined without value. [2004-12-22 00:46:35] [EMAIL PROTECTED] And you're wrong about WORDS_BIGENDIAN. It will NOT be defined at all on a system which is not big-endian. (not to 0 or not to 1) [2004-12-22 00:45:14] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Try again. [2004-12-21 10:51:54] strube at physik3 dot gwdg dot de I tested compiling zend_strtod.c from php4-STABLE-200412210730 in Solaris 7 SPARC and Solaris 9_x86 with Sun cc and gcc. All compilations succeed, but in x86, still IEEE_BIG_ENDIAN is erroneously defined. Fix line 104: #ifdef WORDS_BIGENDIAN must be #if WORDS_BIGENDIAN because it is either 1 or 0. Also, on those architectures for which subsequent #define IEEE_..._ENDIAN occur (lines 116 and 126; not in Solaris), there will be warnings or errors concerning redefinition of IEEE_..._ENDIAN (not in Solaris) or failure in the test of line 226 due to definition of both IEEE_{BIG,LITTLE}_ENDIAN. I cannot test on those architectures myself. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31121 -- Edit this bug report at http://bugs.php.net/?id=31121edit=1
#31121 [Fbk-Opn]: Compilation fails on zend_strtod.c
ID: 31121 User updated by: strube at physik3 dot gwdg dot de Reported By: strube at physik3 dot gwdg dot de -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 7 SPARC PHP Version: 4.3.10 Assigned To: derick New Comment: I tested compiling zend_strtod.c from php4-STABLE-200412210730 in Solaris 7 SPARC and Solaris 9_x86 with Sun cc and gcc. All compilations succeed, but in x86, still IEEE_BIG_ENDIAN is erroneously defined. Fix line 104: #ifdef WORDS_BIGENDIAN must be #if WORDS_BIGENDIAN because it is either 1 or 0. Also, on those architectures for which subsequent #define IEEE_..._ENDIAN occur (lines 116 and 126; not in Solaris), there will be warnings or errors concerning redefinition of IEEE_..._ENDIAN (not in Solaris) or failure in the test of line 226 due to definition of both IEEE_{BIG,LITTLE}_ENDIAN. I cannot test on those architectures myself. Previous Comments: [2004-12-21 05:53:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-12-17 14:18:07] strube at physik3 dot gwdg dot de I now tested compilation of zend_strtod.c from snapshot php4-STABLE-200412171130. It works on Solaris 7 SPARC with gcc. It does not work with Sun Workshop/Forte/SunONE cc, since the architecture macros are gcc specific. It also does not work on Solaris 9_x86, even with gcc; although gcc compiles without error, IEEE_BIG_ENDIAN is erroneously assigned (because the test #if BYTE_ORDER == BIG_ENDIAN does not make sense in Solaris). All this could have been deduced from my previous comments. [2004-12-17 13:00:29] [EMAIL PROTECTED] We had some problems with our snapshots, the next one (9:30 GMT) should have the updated files. If you can try those, please do so. [2004-12-17 09:46:09] strube at physik3 dot gwdg dot de I just found that main/php_config.h already contains the big/little-endian information in WORDS_BIGENDIAN. Why don't you simply include this and test this macro? [2004-12-17 09:37:59] strube at physik3 dot gwdg dot de I tried php4-STABLE-latest.tar.gz, i.e. php4-STABLE-200412170730. The zend_strtod.c therein is identical to that of the official 4.3.10 release. Also the configure script is unchanged (apart of the EXTRA_VERSION). Thus this does not fix anything. As a general remark, architecture macros like __sparc__ and __i386__ are gcc specific. Suns Workshop/Forte/SunONE compilers define __sparc and __i386, respectively, for the architecture. (Likewise, the SGI IRIX compilers do not define __mips__). Also Solaris does not define BYTE_ORDER and BIG_ENDIAN (or LITTLE_ENDIAN)in sys/types.h (only in arpa/nameser_compat.h, not normally included) but _BIG_ENDIAN (or _LITTLE_ENDIAN) in sys/isa_defs.h, also included by sys/types.h. Instead of using [_]BYTE_ORDER, the big/little decision could have been directly based on the architectures. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31121 -- Edit this bug report at http://bugs.php.net/?id=31121edit=1
#31121 [Fbk-Opn]: Compilation fails on zend_strtod.c
ID: 31121 Updated by: [EMAIL PROTECTED] Reported By: strube at physik3 dot gwdg dot de -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 7 SPARC PHP Version: 4.3.10 Assigned To: derick New Comment: And you're wrong about WORDS_BIGENDIAN. It will NOT be defined at all on a system which is not big-endian. (not to 0 or not to 1) Previous Comments: [2004-12-22 00:45:14] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Try again. [2004-12-21 10:51:54] strube at physik3 dot gwdg dot de I tested compiling zend_strtod.c from php4-STABLE-200412210730 in Solaris 7 SPARC and Solaris 9_x86 with Sun cc and gcc. All compilations succeed, but in x86, still IEEE_BIG_ENDIAN is erroneously defined. Fix line 104: #ifdef WORDS_BIGENDIAN must be #if WORDS_BIGENDIAN because it is either 1 or 0. Also, on those architectures for which subsequent #define IEEE_..._ENDIAN occur (lines 116 and 126; not in Solaris), there will be warnings or errors concerning redefinition of IEEE_..._ENDIAN (not in Solaris) or failure in the test of line 226 due to definition of both IEEE_{BIG,LITTLE}_ENDIAN. I cannot test on those architectures myself. [2004-12-21 05:53:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-12-17 14:18:07] strube at physik3 dot gwdg dot de I now tested compilation of zend_strtod.c from snapshot php4-STABLE-200412171130. It works on Solaris 7 SPARC with gcc. It does not work with Sun Workshop/Forte/SunONE cc, since the architecture macros are gcc specific. It also does not work on Solaris 9_x86, even with gcc; although gcc compiles without error, IEEE_BIG_ENDIAN is erroneously assigned (because the test #if BYTE_ORDER == BIG_ENDIAN does not make sense in Solaris). All this could have been deduced from my previous comments. [2004-12-17 13:00:29] [EMAIL PROTECTED] We had some problems with our snapshots, the next one (9:30 GMT) should have the updated files. If you can try those, please do so. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31121 -- Edit this bug report at http://bugs.php.net/?id=31121edit=1
#31121 [Fbk-Opn]: Compilation fails on zend_strtod.c
ID: 31121 User updated by: strube at physik3 dot gwdg dot de Reported By: strube at physik3 dot gwdg dot de -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 7 SPARC PHP Version: 4.3.10 Assigned To: derick New Comment: I tried php4-STABLE-latest.tar.gz, i.e. php4-STABLE-200412170730. The zend_strtod.c therein is identical to that of the official 4.3.10 release. Also the configure script is unchanged (apart of the EXTRA_VERSION). Thus this does not fix anything. As a general remark, architecture macros like __sparc__ and __i386__ are gcc specific. Suns Workshop/Forte/SunONE compilers define __sparc and __i386, respectively, for the architecture. (Likewise, the SGI IRIX compilers do not define __mips__). Also Solaris does not define BYTE_ORDER and BIG_ENDIAN (or LITTLE_ENDIAN)in sys/types.h (only in arpa/nameser_compat.h, not normally included) but _BIG_ENDIAN (or _LITTLE_ENDIAN) in sys/isa_defs.h, also included by sys/types.h. Instead of using [_]BYTE_ORDER, the big/little decision could have been directly based on the architectures. Previous Comments: [2004-12-16 19:59:35] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Something similar is in CVS right now, can you try the latest snapshot please? [2004-12-16 18:47:46] strube at physik3 dot gwdg dot de As I wrote, it was an ad-hoc patch, which worked for me on Solaris 7 SPARC. It may not be sufficiently general. Since the necessity to defined u_int32_t is not dependent on the architecture but on the OS and obviously meant for Solaris, the second chunk must be changed to work both on SPARC and x86 Solaris (don't know about ppc): *** *** 127,133 #define IEEE_LITTLE_ENDIAN #endif ! #if defined(__sparc__) || defined(__ppc__) #define u_int32_t uint32_t #endif --- 134,140 #define IEEE_LITTLE_ENDIAN #endif ! #if defined(sun) || defined(__sun) || defined(__ppc__) #define u_int32_t uint32_t #endif I compiled zend_strtod.c successfully in Solaris 7 and 8 (SPARC) and Solaris 9_x86, with various versions (=5) of the Sun compilers and of the GNU compilers. (I did not compile the whole php for testing, only zend_strtod.c.) As I cannot give you an account here, this will hopefully help. [2004-12-16 13:02:58] [EMAIL PROTECTED] Hello, I think your patch is not 100% correct, would it be possible for me to get an account on your machine to debug it? Derick [2004-12-16 12:46:02] strube at physik3 dot gwdg dot de Description: Compilation of zend_strtod.c fails in Solaris 7 with Sun Workshop 5.0 compiler. There are two reasons: (1) IEEE_*_ENDIAN does not get defined. (2) line 246: syntax error before or at: u_int32_t As for (2), this is almost identical to Bug #30779, but (1) is not reported there. My ad-hoc patch: *** Zend/zend_strtod.c.ORI Tue Dec 14 09:35:26 2004 --- Zend/zend_strtod.c Thu Dec 16 12:21:54 2004 *** *** 95,101 static char *rcsid = $OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $; #endif /* LIBC_SCCS and not lint */ ! #if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \ defined(__powerpc__) || defined(__ppc__) || defined(__m88k__) || \ defined(__hppa__) || defined(__x86_64__) || (defined(__arm__) \ --- 95,108 static char *rcsid = $OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $; #endif /* LIBC_SCCS and not lint */ ! #if defined(sun) || defined(__sun) ! #include sys/isa_defs.h ! #ifdef _BIG_ENDIAN ! #define IEEE_BIG_ENDIAN ! #else ! #define IEEE_LITTLE_ENDIAN ! #endif ! #elif defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \ defined(__powerpc__) || defined(__ppc__) || defined(__m88k__) || \ defined(__hppa__) || defined(__x86_64__) || (defined(__arm__) \ *** *** 127,133 #define IEEE_LITTLE_ENDIAN #endif ! #if defined(__sparc__) || defined(__ppc__) #define u_int32_t uint32_t #endif --- 134,140 #define IEEE_LITTLE_ENDIAN #endif ! #if defined(__sparc__) || defined(__sparc) || defined(__ppc__) #define u_int32_t uint32_t #endif -- Edit this bug report at http://bugs.php.net/?id=31121edit=1