ID:               17449
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         Arrays related
 Operating System: Digital UNIX V4.0G (Rev. 1530)
 PHP Version:      4.2.1
 New Comment:

php4-200205280000.tar.gz doesn't compile here:

% configure --prefix=/Team/local
[...]
gcc  -Imain/ -I/Team/local/src/php4-200205280000/main/ -DPHP_ATOM_INC
-I/Team/local/src/php4-200205280000/include
-I/Team/local/src/php4-200205280000/main
-I/Team/local/src/php4-200205280000
-I/Team/local/src/php4-200205280000/Zend
-I/Team/local/src/php4-200205280000/ext/xml/expat 
-I/Team/local/src/php4-200205280000/TSRM -g -O2  -c
/Team/local/src/php4-200205280000/main/user_streams.c -o
main/user_streams.o  && echo > main/user_streams.lo
In file included from
/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h:36,
                 from
/Team/local/src/php4-200205280000/Zend/zend.h:59,
                 from /Team/local/src/php4-200205280000/main/php.h:34,
                 from
/Team/local/src/php4-200205280000/main/user_streams.c:22:
/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h:36:
warning: redefinition of `va_list'
/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va_list.h:7:
warning: `va_list' previously declared here
Make:  Don't know how to make /zend_language_parser.c.  Stop.

Zend/zend_language_parser.c exists, but the Makefile searches for
/zend_language_parser.c and several other files in /.


Previous Comments:
------------------------------------------------------------------------

[2002-05-27 17:28:23] [EMAIL PROTECTED]

This may be related to a casting problem which is supposed to be fixed
in HEAD, please try this version (snapshots are available at
snaps.php.net), thx.

------------------------------------------------------------------------

[2002-05-27 17:19:01] [EMAIL PROTECTED]

4.2.0RC1 introduced the new sorting code Zend/zend_qsort.c from
Sterling, maybe that's related?

------------------------------------------------------------------------

[2002-05-27 15:42:16] [EMAIL PROTECTED]

Bug #17257 seems to be the same problem ("Digital UNIX OSF/1" is the
old name of "Compaq Tru64"). People there found that all sort functions
broke with PHP-4.2.0RC1, I can confirm this now.

Smallest test program:

<?php
$a = array(9,7,3,5);
sort($a);
print_r($a);
?>

Output:

Array
(
    [0] => 9
    [1] => 7
    [2] => 3
    [3] => 5
)

It's not compiler-related, both gcc-2.95.2 and Compac C V6.3-129 give
the same results. Maybe endianess-related (the Compaq machine have
Alpha processors)?

If somebody more clueful wants to take a look at this problem: Compaq
provides free test accounts (not only with Tru64, but also with
FreeBSD, NetBSD and Linux), see
<http://www.testdrive.compaq.com/>.

I compiled PHP-4.2.0RC1 there on FreeBSD/Alpha, and gcc-2.95.3 gives
lots of warnings:

***     The -O2 flag TRIGGERS KNOWN OPTIMIZER BUGS ON THIS PLATFORM

But even with CFLAGS="-O0 -g" sort() does not sort at all.

On FreeBSD/Intel it does work, so it probably is an endianess problem.

------------------------------------------------------------------------

[2002-05-27 14:29:54] [EMAIL PROTECTED]

Well,
the script runs fine under my IRIX64 6.5.16m on mod_php/Apache 1.3.24
but not when using a 64bit cgi binary with Apache2.

Case 1
http://sgi.takenet.de/php/sort.php

Case 2
http://sgi.takenet.de:8080/php/sort.php

------------------------------------------------------------------------

[2002-05-27 11:11:05] [EMAIL PROTECTED]

I checked some older versions:
until PHP-4.1.2, sort() was fine. I didn't check 4.2.0RC*, yet, but
will do so tomorrow.

------------------------------------------------------------------------

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/17449

-- 
Edit this bug report at http://bugs.php.net/?id=17449&edit=1

Reply via email to