#25281 [NEW]: specifying --with-iconv=<dir> causes compile failure
| From: | phpbugs at rickbradley dot com | Date: | Wed, 27 Aug 2003 23:53:03 +0000 |
| Subject: | #25281 [NEW]: specifying --with-iconv=<dir> causes compile failure | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-46799@lists.php.net to get a copy of this message | ||
From: phpbugs at rickbradley dot com
Operating system: FreeBSD
PHP version: 4.3.3
PHP Bug Type: Compile Failure
Bug description: specifying --with-iconv=<dir> causes compile failure
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 bug report at http://bugs.php.net/?id=25281&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25281&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25281&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25281&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25281&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25281&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25281&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25281&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25281&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25281&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25281&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25281&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25281&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25281&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25281&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25281&r=gnused