On Sat, Feb 12, 2005 at 07:47:11PM +0100, Torsten Landschoff wrote: > On Wed, Feb 09, 2005 at 04:24:44PM -0800, Blars Blarson wrote: > > > swig1.3 fails to build from source on sparc, duplicated on sparc pbuilder. > > > > gcc -DHAVE_CONFIG_H -I. -I. -I../Source/Include -I/usr/include/php4 > > -I/usr/include/php4/main -I/usr/include/php4/Zend -I/usr/include/php4/TSRM > > -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN > > -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE > > -D_FILE_OFFSET_BITS=64 -MT libswigphp4_la-libphp4.lo -MD -MP -MF > > .deps/libswigphp4_la-libphp4.Tpo -c libphp4.c -fPIC -DPIC -o > > .libs/libswigphp4_la-libphp4.o > > libphp4.c: In function `SWIG_ZTS_ConvertResourcePtr': > > libphp4.c:535: error: too few arguments to function > > `zend_rsrc_list_get_rsrc_type' > > Okay, that was part of the runtime libraries. They are gone (replaced) > in swig 1.3.24 which is already packaged but I am waiting for dependent > packages to repair the no-runtime-anymore breakage. > > Should be a non-issue mid of next week.
Actually, the same problem is still present in PHP wrapper code generated by SWIG, so I suspect this will move from a FTBFS for SWIG to a FTBFS for any package which use SWIG to generate PHP bindings. This problem has been there all along. The reason we're only now seeing it is that the Debian php4 package recently enabled thread safety in Zend: php4 (4:4.3.10-3) unstable; urgency=medium [snip] * Enable Zend Thread Safety for all SAPIs, meaning that our modules are now compiled for ZTS APIs as well. (closes: #278212, #264015) - Make sure caudium-php4 now provides phpapi-$(ver), and modules can be configured with the caudium SAPI. - Add 039-reentrant_libs.patch to link to the reentrant versions of libldap and libmysqlclient [snip] -- Adam Conrad <[EMAIL PROTECTED]> Sun, 6 Feb 2005 05:32:11 -0700 I've attached a patch which fixes this. When thread safety is enabled, zend_rsrc_list_get_rsrc_type now expects more than one argument, and there's some standard macro magic to deal with this. It's used throughout the patched file - it's just missing in this one call (when thread safety is off, TSRMLS_CC is empty, which is why it's worked up until now). Cheers, Olly
--- Lib/php4/php4run.swg.orig Sat Oct 16 19:23:51 2004 +++ Lib/php4/php4run.swg Mon Feb 21 07:08:22 2005 @@ -195,7 +195,7 @@ p = value->ptr; if (type==-1) return -1; - type_name=zend_rsrc_list_get_rsrc_type(z->value.lval); + type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC); return SWIG_ZTS_ConvertResourceData(p,type,type_name,ptr,ty TSRMLS_CC); }