ID:               32702
 Comment by:       yukawa at daigoro dot jp
 Reported By:      zhouxh at im dot ac dot cn
 Status:           No Feedback
 Bug Type:         Compile Failure
 Operating System: * (with GCC 4 only)
 PHP Version:      5.0.4
 New Comment:

It seems gcc4's cast-as-lvalues issue.
I've patched below and maybe it works fine in
my apache2 MPM=worker environment...

--- php-5.0.4/TSRM/TSRM.h       2005-03-11 20:12:07.000000000 +0900
+++ php-5.0.4/TSRM/TSRM.h       2005-06-15 03:23:07.000000000 +0900
@@ -137,7 +137,7 @@
 
 #define TSRMLS_FETCH()                 void ***tsrm_ls = (void ***)
ts_resource_ex(0, NULL)
 #define TSRMLS_FETCH_FROM_CTX(ctx)     void ***tsrm_ls = (void ***) ctx
-#define TSRMLS_SET_CTX(ctx)            (void ***) ctx = tsrm_ls
+#define TSRMLS_SET_CTX(ctx, type)      ctx = (type)tsrm_ls
 #define TSRMG(id, type, element)       (((type) (*((void ***)
tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
 #define TSRMLS_D       void ***tsrm_ls
 #define TSRMLS_DC      , TSRMLS_D
--- php-5.0.4/ext/curl/interface.c      2005-03-14 18:02:42.000000000 +0900
+++ php-5.0.4/ext/curl/interface.c      2005-06-15 03:23:34.000000000 +0900
@@ -806,7 +806,7 @@
        }
 
        alloc_curl_handle(&ch);
-       TSRMLS_SET_CTX(ch->thread_ctx);
+       TSRMLS_SET_CTX(ch->thread_ctx ,void ***);
 
        ch->cp = cp;
        
@@ -867,7 +867,7 @@
        }
 
        alloc_curl_handle(&dupch);
-       TSRMLS_SET_CTX(ch->thread_ctx);
+       TSRMLS_SET_CTX(ch->thread_ctx, void ***);
 
        dupch->cp = cp;
        dupch->handlers->write->method = ch->handlers->write->method;
--- php-5.0.4/ext/interbase/ibase_events.c      2004-04-19
23:13:41.000000000 +0900
+++ php-5.0.4/ext/interbase/ibase_events.c      2005-06-15
03:23:29.000000000 +0900
@@ -312,7 +312,7 @@
 
        /* allocate the event resource */
        event = (ibase_event *) safe_emalloc(sizeof(ibase_event), 1, 0);
-       TSRMLS_SET_CTX(event->thread_ctx);
+       TSRMLS_SET_CTX(event->thread_ctx, void **);
        event->link_res_id = link_res_id;
        event->link = ib_link;
        event->event_count = 0;


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

[2005-04-29 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2005-04-14 14:56:30] [EMAIL PROTECTED]

It's a bug for sure, but why do you have this in your configure line:
--enable-maintainer-zts ??



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

[2005-04-14 10:42:37] zhouxh at im dot ac dot cn

Description:
------------
i upgrade from Fedora Core 3 to Fedora Core 4 test 2, then i want to
recompile php5.0.4 with apache 2.0.53.

kernel: 2.6.11-1.1226_FC4

gcc version: gcc-4.0.0-0.40

curl version: curl-7.13.1-1

ps: at Fedora Core 3 all are ok!

Reproduce code:
---------------
/configure --with-mod_charset --prefix=/usr/local/php5
--with-libxml-dir --with-zlib=/usr/local --enable-bcmath --with-bz2
--enable-calendar --with-jpeg-dir=/usr/local --with-tiff-dir
--with-curl=/usr --with-curlwrappers --with-gd --enable-ftp
--with-png-dir --with-freetype-dir --enable-gd-native-ttf
--enable-gd-jis-conv --with-mysql=/usr/local/mysql4
--enable-magic-quotes --enable-embedded-mysqli --with-tidy
--enable-sockets --enable-shmop --enable-soap --enable-wddx
--enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte
--enable-yp --with-iconv --enable-exif
--with-apxs2=/usr/local/apache/bin/apxs --enable-mbstring
--with-oci8=/home/oracle/ouihome --enable-sigchild --enable-sqlite-utf8
--enable-ucd-snmp-hack --enable-roxen-zts --enable-dbase --enable-dbx
--enable-dio --enable-libgc --with-openssl --enable-safe-mode
--with-cpdflib --with-gettext

Expected result:
----------------
compile finished!

Actual result:
--------------
/bin/sh /data/websoft/php-5.0.4/libtool --silent --preserve-dup-deps
--mode=compile /data/websoft/php-5.0.4/meta_ccld
-I/data/websoft/php-5.0.4/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBJPEG
-DHAVE_LIBFREETYPE -DJISX0208 -Iext/cpdf/
-I/data/websoft/php-5.0.4/ext/cpdf/ -DPHP_ATOM_INC
-I/data/websoft/php-5.0.4/include -I/data/websoft/php-5.0.4/main
-I/data/websoft/php-5.0.4 -I/usr/include/libxml2
-I/usr/kerberos/include -I/usr/local/include
-I/usr/local/include/freetype2
-I/data/websoft/php-5.0.4/ext/mbstring/oniguruma
-I/data/websoft/php-5.0.4/ext/mbstring/libmbfl
-I/data/websoft/php-5.0.4/ext/mbstring/libmbfl/mbfl
-I/usr/local/mysql4/include/mysql -I/home/oracle/ouihome/rdbms/public
-I/home/oracle/ouihome/rdbms/demo -I/home/oracle/ouihome/plsql/public
-I/usr/local/include/tidy -I/data/websoft/php-5.0.4/TSRM
-I/data/websoft/php-5.0.4/Zend  -D_REENTRANT  -g -O2 -pthread -DZTS 
-prefer-non-pic -c /data/websoft/php-5.0.4/ext/cpdf/cpdf.c -o
ext/cpdf/cpdf.lo
/data/websoft/php-5.0.4/ext/cpdf/cpdf.c: In function
'zif_cpdf_stringwidth':
/data/websoft/php-5.0.4/ext/cpdf/cpdf.c:1035: warning: pointer targets
in passing argument 2 of 'cpdf_stringWidth' differ in signedness
/bin/sh /data/websoft/php-5.0.4/libtool --silent --preserve-dup-deps
--mode=compile /data/websoft/php-5.0.4/meta_ccld  -Iext/ctype/
-I/data/websoft/php-5.0.4/ext/ctype/ -DPHP_ATOM_INC
-I/data/websoft/php-5.0.4/include -I/data/websoft/php-5.0.4/main
-I/data/websoft/php-5.0.4 -I/usr/include/libxml2
-I/usr/kerberos/include -I/usr/local/include
-I/usr/local/include/freetype2
-I/data/websoft/php-5.0.4/ext/mbstring/oniguruma
-I/data/websoft/php-5.0.4/ext/mbstring/libmbfl
-I/data/websoft/php-5.0.4/ext/mbstring/libmbfl/mbfl
-I/usr/local/mysql4/include/mysql -I/home/oracle/ouihome/rdbms/public
-I/home/oracle/ouihome/rdbms/demo -I/home/oracle/ouihome/plsql/public
-I/usr/local/include/tidy -I/data/websoft/php-5.0.4/TSRM
-I/data/websoft/php-5.0.4/Zend  -D_REENTRANT  -g -O2 -pthread -DZTS 
-prefer-non-pic -c /data/websoft/php-5.0.4/ext/ctype/ctype.c -o
ext/ctype/ctype.lo
/bin/sh /data/websoft/php-5.0.4/libtool --silent --preserve-dup-deps
--mode=compile /data/websoft/php-5.0.4/meta_ccld  -Iext/curl/
-I/data/websoft/php-5.0.4/ext/curl/ -DPHP_ATOM_INC
-I/data/websoft/php-5.0.4/include -I/data/websoft/php-5.0.4/main
-I/data/websoft/php-5.0.4 -I/usr/include/libxml2
-I/usr/kerberos/include -I/usr/local/include
-I/usr/local/include/freetype2
-I/data/websoft/php-5.0.4/ext/mbstring/oniguruma
-I/data/websoft/php-5.0.4/ext/mbstring/libmbfl
-I/data/websoft/php-5.0.4/ext/mbstring/libmbfl/mbfl
-I/usr/local/mysql4/include/mysql -I/home/oracle/ouihome/rdbms/public
-I/home/oracle/ouihome/rdbms/demo -I/home/oracle/ouihome/plsql/public
-I/usr/local/include/tidy -I/data/websoft/php-5.0.4/TSRM
-I/data/websoft/php-5.0.4/Zend  -D_REENTRANT  -g -O2 -pthread -DZTS 
-prefer-non-pic -c /data/websoft/php-5.0.4/ext/curl/interface.c -o
ext/curl/interface.lo
/data/websoft/php-5.0.4/ext/curl/interface.c: In function
'zif_curl_init':
/data/websoft/php-5.0.4/ext/curl/interface.c:809: error: invalid lvalue
in assignment
/data/websoft/php-5.0.4/ext/curl/interface.c: In function
'zif_curl_copy_handle':
/data/websoft/php-5.0.4/ext/curl/interface.c:870: error: invalid lvalue
in assignment
make: *** [ext/curl/interface.lo] Error 1



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


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

Reply via email to