ID: 25281 Updated by: [EMAIL PROTECTED] Reported By: phpbugs at rickbradley dot com -Status: Assigned +Status: Feedback Bug Type: Compile Failure Operating System: FreeBSD PHP Version: 4.3.3 Assigned To: moriyoshi New Comment:
Hmm, I need just one trivial piece of information. Can you run the following command on top of the PHP source tree to see what the content of PHP_ICONV_H_PATH is like? $ grep "PHP_ICONV_H_PATH" ./config.log AFAIK "#include MACRO" is allowed both in cpp-2.95.4 and cpp-3.3. So the real cause for this failure is most likely that PHP_ICONV_H_PATH is defined null. Previous Comments: ------------------------------------------------------------------------ [2003-08-27 22:54:26] [EMAIL PROTECTED] I should tackle this problem. ------------------------------------------------------------------------ [2003-08-27 18:53:03] phpbugs at rickbradley dot com Description: ------------ When building PHP-4.3.3 if --with-iconv-dir=<iconvdir> is specified the build of PHP fails with the following error: gcc -Iext/iconv/ -I/home/eastcore/sites/build/src/php-4.3.3/ext/iconv/ -DPHP_ATOM_INC -I/home/eastcore/sites/build/src/php-4.3.3/include -I/home/eastcore/sites/build/src/php-4.3.3/main -I/home/eastcore/sites/build/src/php-4.3.3 -I/home/eastcore/sites/build/src/php-4.3.3/Zend -I/home/eastcore/sites/server//openssl/include -I/home/eastcore/sites/server//iconv/include -I/usr/local/include/mysql -I/home/eastcore/sites/server//expat/include -I/home/eastcore/sites/build/src/php-4.3.3/TSRM -g -O2 -c /home/eastcore/sites/build/src/php-4.3.3/ext/iconv/iconv.c -o ext/iconv/iconv.o && echo > ext/iconv/iconv.lo /home/eastcore/sites/build/src/php-4.3.3/ext/iconv/iconv.c:40: `#include' expects "FILENAME" or <FILENAME> gmake: *** [ext/iconv/iconv.lo] Error 1 The problem is that the iconv.c file in question contains the following around line 40: #ifdef PHP_ICONV_H_PATH #include PHP_ICONV_H_PATH #else #include <iconv.h> #endif I'm running gcc version 2.95.4, with cpp version 2.95.4. Granted, GNU's cpp is a piece of shit, but back where I come from doing #include <MACRO> is a no-no. Anyway, my configure line is like so: ./configure --prefix=/home/eastcore/sites/server//php --with-apache=/home/eastcore/sites/build/src/apache_1.3.28 --with-mysql=/usr/local --with-openssl=/home/eastcore/sites/server//openssl --enable-trans-sid --with-expat-dir=/home/eastcore/sites/server//expat --with-xml --enable-xslt --with-xslt-sablot=/home/eastcore/sites/server//expat --with-iconv=/home/eastcore/sites/server//iconv --with-pear=/home/eastcore/sites/server//php This is FreeBSD 4.8-RELEASE, with the following versions of hand-compiled software (of interest to my PHP build): VERSIONPHP = php-4.3.3 VERSIONAPACHE = apache_1.3.28 VERSIONMODSSL = mod_ssl-2.8.15-1.3.28 VERSIONOPENSSL = openssl-0.9.7b VERSIONEXPAT = expat-1.95.2 VERSIONSABLOT = Sablot-1.0 VERSIONLIBXML = libxml2-2.4.30 VERSIONZLIB = zlib-1.1.3 VERSIONICONV = libiconv-1.7 Yes, that's from a Makefile.in. I build self-contained (as in everything under one base directory) server installations for multiple distinct servers on a single system. Being able to install each library version with the server it was built with is important. I haven't tried this on my Linux servers yet but I see no reason why it won't fail there as well. Reproduce code: --------------- # gmake Expected result: ---------------- I expected it to compile. Actual result: -------------- It didn't compile. If I apply this patch: --- php-4.3.3/ext/iconv/iconv.c Wed Aug 13 13:22:17 2003 +++ php-4.3.3-patched/ext/iconv/iconv.c Wed Aug 27 18:19:42 2003 @@ -36,11 +36,7 @@ #ifdef HAVE_ICONV -#ifdef PHP_ICONV_H_PATH -#include PHP_ICONV_H_PATH -#else #include <iconv.h> -#endif #ifdef HAVE_GLIBC_ICONV #include <gnu/libc-version.h> PHP 4.3.3 will build, but it is not using the same iconv I specified in the --with-iconv=<iconvdir> configure argument. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25281&edit=1