ID: 17440 Comment by: e at no-spam-remove-ThiS dot erric dot net Reported By: adconrad at 0c3 dot net Status: Closed Bug Type: Compile Failure Operating System: Linux 2.4 PHP Version: 4.2.1 New Comment:
Hi, On openbsd 3.3 this still seems to be broken. The patch is applied during the ports build process however I still endup with: Making all in iconv /bin/sh /usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/libtool --silent --mode=compile cc -I. -I/usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/ext/iconv -I/usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/main -I/usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3 -I/usr/lib/apache/include -I/usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/Zend -I/usr/local/include -I/usr/local/include/freetype -I/usr/local/include/c-client -I/usr/local/include/mysql -I/usr/local/include -I/usr/local/include/postgresql -I/usr/local/include/ucd-snmp -DDEV_RANDOM=/dev/arandom -DMOD_SSL=208112 -DEAPI -DUSE_EXPAT -I/usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/TSRM -O2 -I/usr/local/include -c iconv.c iconv.c:142: conflicting types for `php_iconv_string' iconv.c:90: previous declaration of `php_iconv_string' iconv.c: In function `php_iconv_string': iconv.c:179: warning: passing arg 2 of `libiconv' from incompatible pointer type iconv.c:179: warning: passing arg 3 of `libiconv' from incompatible pointer type iconv.c:179: warning: passing arg 5 of `libiconv' from incompatible pointer type iconv.c: In function `php_if_iconv': iconv.c:294: warning: passing arg 4 of `php_iconv_string' from incompatible pointer type iconv.c: In function `zif_ob_iconv_handler': iconv.c:323: warning: passing arg 4 of `php_iconv_string' from incompatible pointer type *** Error code 1 Stop in /usr/local/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/ext/iconv. *** Error code 1 Stop in /usr/local/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/ext/iconv (line 37 of /usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/build/rules.mk). *** Error code 1 Stop in /usr/local/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/ext (line 37 of /usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/build/rules.mk). *** Error code 1 Stop in /usr/local/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3 (line 37 of /usr/ports/www/php4/extensions/w-php-4.2.3-no_x11/php-4.2.3/build/rules.mk). *** Error code 1 Stop in /usr/ports/www/php4/extensions (line 1739 of /usr/ports/infrastructure/mk/bsd.port.mk). *** Error code 1 Stop in /usr/ports/www/php4. Previous Comments: ------------------------------------------------------------------------ [2002-08-10 10:09:27] [EMAIL PROTECTED] This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2002-05-26 16:25:50] adconrad at 0c3 dot net The build seems to go fine (with a warning about "passing arg 4 of `php_iconv_string' from incompatible pointer type", but there are warnings like that ALL over the PHP code when compiling on non-32-bit arches, that's nothing new) with the following simple patch applied. I'm not the world's greatest C programmer by any stretch, so someone may want to double check that this one-line fix isn't doing something incredibly stupid: ------- Begin Patch ---------- --- php4-4.2.1.orig/ext/iconv/iconv.c Thu Mar 21 13:25:25 2002 +++ php4-4.2.1/ext/iconv/iconv.c Sun May 26 14:18:46 2002 @@ -87,7 +87,7 @@ ZEND_GET_MODULE(iconv) #endif -static int php_iconv_string(const char * in_str, unsigned int in_len, char ** out_str, unsigned int * out_len, const char * in_encoding, const char * out_encoding, int *err TSRMLS_DC); +static int php_iconv_string(const char * in_str, size_t in_len, char ** out_str, size_t * out_len, const char * in_encoding, const char * out_encoding, int *err TSRMLS_DC); /* {{{ PHP_INI */ ---------- End Patch ---------- ... Adam ------------------------------------------------------------------------ [2002-05-26 14:30:34] adconrad at 0c3 dot net The complete build logs for 4.2.1 can be seen here (scroll to the bottom to get at recent versions): http://buildd.debian.org/build.php?&pkg=php4 Click through on 4.2.1 s390, alpha, or ia64. You'll notice the build failures on the first attempt. This is due to an assumption that "unsigned int" == size_t, which isn't true on all architectures, only some. ... Adam ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17440&edit=1