Edit report at http://bugs.php.net/bug.php?id=51178&edit=1
ID: 51178 Updated by: ras...@php.net Reported by: blake at bluehost dot com Summary: Compile fails randomly with default RPM CFLAGS -Status: Open +Status: Bogus Type: Bug Package: Compile Failure Operating System: CentOS 5.4 PHP Version: 5.2.13 New Comment: I see nothing wrong with that code. Line 136 of main/streams/cast.c in PHP 5.2.13 is: #if HAVE_FOPENCOOKIE And that define come from the configure check in acinclude.m4 which does a test compile with _GNU_SOURCE defined. I don't see why that would sometimes work and sometimes not on the same system. Feel free to send us some suggested patches if you can figure out what is sometimes tripping up your system, but since I see no bug here I am marking this one bogus. Previous Comments: ------------------------------------------------------------------------ [2010-03-02 00:40:32] ras...@php.net I see nothing wrong with that code. Line 136 of main/streams/cast.c in PHP 5.2.13 is: #if HAVE_FOPENCOOKIE And that define come from the configure check in acinclude.m4 which does a test compile with _GNU_SOURCE defined. I don't see why that would sometimes work and sometimes not on the same system. Feel free to send us some suggested patches if you can figure out what is sometimes tripping up your system, but since I see no bug here I am marking this one bogus. ------------------------------------------------------------------------ [2010-03-01 22:48:17] blake at bluehost dot com Description: ------------ The CFLAGS used for this build are: -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=0 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DSECURITY_HOLE_PASS_AUTHORIZATION The differences from a default RPM build are SECURITY_HOLE_PASS_AUTHORIZATION and _FORTIFY_SOURCE=2. I don't have this failure when building normally via ./configure && make, so this makes me think it's the optimisation that's making the build flakey. Is it possible to make this function a little more resilient to optimisation? About 50% of the time PHP fails to build, it always fails in exactly the same place: /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:136: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'stream_cookie_functions' /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c: In function '_php_stream_cast': /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:189: warning: implicit declaration of function 'fopencookie' /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:189: error: 'stream_cookie_functions' undeclared (first use in this function) /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:189: error: (Each undeclared identifier is reported only once /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:189: error: for each function it appears in.) /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:189: warning: assignment makes pointer from integer without a cast /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:230: warning: cast to pointer from integer of different size /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:233: warning: cast to pointer from integer of different size /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c: In function '_php_stream_open_wrapper_as_file': /usr/src/rpm/BUILD/php-5.2.13/main/streams/cast.c:306: warning: dereferencing type-punned pointer will break strict-aliasing rules make: *** [main/streams/cast.lo] Error 1 Expected result: ---------------- A successful build 100% of the time. Actual result: -------------- If I build the RPM 20 times (without changing ANYTHING), it fails to build at least - usually more - than half the time. This increases the time required to roll-out updates to PHP a great deal, by breaking our automated build system. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51178&edit=1