ID: 25281 User updated by: phpbugs at rickbradley dot com -Summary: "$foo->bar->baz" ambiguity in double quoted strings Reported By: phpbugs at rickbradley dot com Status: Open Bug Type: Compile Failure Operating System: FreeBSD PHP Version: 4.3.3 Assigned To: moriyoshi New Comment:
Sorry about that. Evidently this mozilla has a memory like an elephant for ancient form data. It took the liberty of changing the subject on this bug for me. Changing back. Previous Comments: ------------------------------------------------------------------------ [2003-08-28 00:58:18] phpbugs at rickbradley dot com I'll go you one better: fred# cd src/php-4.3.3/ fred# grep "PHP_ICONV_H_PATH" ./config.log fred# find . -type f -exec grep -H "PHP_ICONV_H_PATH" {} \; ./ext/iconv/config.m4: PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" ./ext/iconv/config.m4: PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h" ./ext/iconv/config.m4:#include <$PHP_ICONV_H_PATH> ./ext/iconv/config.m4: PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>]) ./ext/iconv/config.m4: AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h]) ./ext/iconv/iconv.c:#ifdef PHP_ICONV_H_PATH ./ext/iconv/iconv.c:#include PHP_ICONV_H_PATH ./main/php_config.h.in:#undef PHP_ICONV_H_PATH ./main/php_config.h:#define PHP_ICONV_H_PATH </home/eastcore/sites/server//iconv/include/iconv.h> ./configure: PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" ./configure: PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h" ./configure:#include <$PHP_ICONV_H_PATH> ./configure: echo "#define PHP_ICONV_H_PATH <$PHP_ICONV_H_PATH>" > include/php_php_iconv_h_path.h ./configure:#define PHP_ICONV_H_PATH <$PHP_ICONV_H_PATH> ./include/php_php_iconv_h_path.h:#define PHP_ICONV_H_PATH </home/eastcore/sites/server//iconv/include/iconv.h> ./config.status:${ac_dA}PHP_ICONV_H_PATH${ac_dB}PHP_ICONV_H_PATH${ac_dC}</home/eastcore/sites/server//iconv/include/iconv.h>${ac_dD} ./config.status:${ac_uA}PHP_ICONV_H_PATH${ac_uB}PHP_ICONV_H_PATH${ac_uC}</home/eastcore/sites/server//iconv/include/iconv.h>${ac_uD} ./config.status:${ac_eA}PHP_ICONV_H_PATH${ac_eB}PHP_ICONV_H_PATH${ac_eC}</home/eastcore/sites/server//iconv/include/iconv.h>${ac_eD} ------------------------------------------------------------------------ [2003-08-28 00:28:26] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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