ID: 31358 User updated by: hawk at pld-linux dot org Reported By: hawk at pld-linux dot org -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: PLD Linux 1.0 running on PowerPC PHP Version: 4.3.10 Assigned To: stas New Comment:
According to 'gcc -v': Reading specs from /usr/lib/gcc-lib/ppc-pld-linux/2.95.4/specs gcc version 2.95.4 20010319 (prerelease) And yes, there is stdarg.h in /usr/lib/gcc-lib/ppc-pld-linux/2.95.4/include/stdarg.h Previous Comments: ------------------------------------------------------------------------ [2005-01-02 08:58:47] [EMAIL PROTECTED] Which GCC do you have? It is rather strange va_copy is not defined on Linux. Do you have stdarg.h anywhere? ------------------------------------------------------------------------ [2004-12-31 19:46:59] hawk at pld-linux dot org The bug affects only PPC systems with older GCC which don't support va_copy (sorry, didn't noticed this earlier), the workaround is to change line 776 of zend.c: usr_copy = args; into memcpy(usr_copy, args, sizeof(va_list)); for these architectures. It seems to work perfectly ------------------------------------------------------------------------ [2004-12-30 22:03:06] hawk at pld-linux dot org Description: ------------ The compilation of PHP 4.3.10 fails on Linux running on PowerPC with following error: /home/users/builder/rpm/BUILD/php-4.3.10/Zend/zend.c -o Zend/zend.lo /home/users/builder/rpm/BUILD/php-4.3.10/Zend/zend.c: In function `zend_error': /home/users/builder/rpm/BUILD/php-4.3.10/Zend/zend.c:776: incompatible types in assignment make: *** [Zend/zend.lo] Error 1 Following code change is reponsible for this bug: cvs diff -u -r 1.162.2.21 -r 1.162.2.22 Zend/zend.c Line 776 is: usr_copy = args; where both usr_copy and args are of type va_list. Such code will not compile on Linux on PowerPC (and probably on some other architectures too) because va_list is struct here. I know only two ways for fixing it. One is to use va_copy, but I'm not sure if its safe to change following portion of code: #if defined(va_copy) va_copy(usr_copy, args); #else usr_copy = args; #endif just into: va_copy(usr_copy, args); Probably its not safe. The second way is to use usr_copy[0] = args[0]; for the affected architectures, but its not safe either AFAIR. I also suppose that php 5.0.3 is affected too, because it contains same code ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31358&edit=1