php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14423 PHP won't compile with --with-iconv turned on
Submitted: 2001-12-11 07:35 UTC Modified: 2002-03-04 18:28 UTC
Votes:8
Avg. Score:4.4 ± 1.1
Reproduced:8 of 8 (100.0%)
Same Version:3 (37.5%)
Same OS:6 (75.0%)
From: never at nevermind dot kiev dot ua Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.1.0 OS: FreeBSD 4.4-STABLE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: never at nevermind dot kiev dot ua
New email:
PHP Version: OS:

 

 [2001-12-11 07:35 UTC] never at nevermind dot kiev dot ua
System:
[never@mile ~]$ uname -a
FreeBSD mile.nevermind.kiev.ua 4.4-STABLE FreeBSD 4.4-STABLE #0: Tue Dec  4 21:12:20 EET 2001     root@mile.nevermind.kiev.ua:/usr/obj/usr/src/sys/mile  i386
[never@mile ~]$ pkg_info | grep iconv-2
iconv-2.0_1         Charset conversion library and utilities

How to repeat:
./configure '--with-mysql=/usr/local' '--with-pgsql=/usr/local' '--enable-track-vars' '--enable-sockets' '--enable-ftp' '--with-ttf' '--with-gd=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-freetype' '--with-zlib-dir=/usr/local' '--with-iconv=/usr/local' '--enable-xslt' '--enable-wddx' '--with-xslt-sablot' '--with-expat-dir=/usr/local'
make
Output:
Making all in .
/bin/sh /usr/local/src/php-4.1.0/libtool --silent --mode=link gcc -I. -I/usr/local/src/php-4.1.0/ -I/usr/local/src/php-4.1.0/main -I/usr/local/src/php-4.1.0 -I/usr/local/src/php-4.1.0/Zend -I/usr/local/include/freetype2/freetype -I/usr/local/include/gd -I/usr/local/include -I/usr/local/include/mysql  -I/usr/local/src/php-4.1.0/TSRM -g -O2   -o php -export-dynamic stub.lo libphp4.la
./.libs/libphp4.a(internal_functions.o): In function `php_startup_internal_extensions':
/usr/local/src/php-4.1.0/main/internal_functions.c(.data+0x28): undefined reference to `iconv_module_entry'
*** Error code 1

Stop in /usr/local/src/php-4.1.0.
*** Error code 1

Stop in /usr/local/src/php-4.1.0.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-24 10:48 UTC] never at nevermind dot kiev dot ua
Here is configure, which works fine. But I cannot find out what caused it to fail in previous case...

'./configure' '--with-config-file-path=/usr/local/etc/php.standalone'                                                                                                             '--disable-pear' '--enable-discard-path' '--with-readline=/usr'                                                                                                                   '--enable-versioning' '--with-system-regex' '--disable-debug'                                                                                                                     '--enable-track-vars' '--with-gd=/usr/local'                                                                                                                                      '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'                                                                                                                     '--with-png-dir=/usr/local' '--with-zlib' '--with-mysql=/usr/local'                                                                                                               '--with-pgsql=/usr/local' '--with-openssl=/usr' '--with-xml'                                                                                                                      '--with-xmlrpc=/usr/local' '--with-ttf' '--with-freetype'                                                                                                                         '--enable-xslt' '--with-xslt-sablot' '--with-expat-dir=/usr/local'                                                                                                                '--with-dom=/usr/local' '--enable-ftp' '--with-iconv=/usr/local'                                                                                                                  '--enable-bcmath' '--enable-sockets' '--prefix=/usr/local'                                                                                                                        'i386--freebsd4.5'
 [2002-01-23 16:29 UTC] cynic@php.net
Does it *always* fail with the former configure line?
 [2002-01-24 09:06 UTC] never at nevermind dot kiev dot ua
Yes, just tried on 4.5-PRERELEASE.
 [2002-02-23 06:40 UTC] maxi at c-tera dot de
I'm experiencing the same Problem with PHP4.1.1 and FreeBSD 4.5
 [2002-03-03 01:36 UTC] kalowsky@php.net
any chance you can test this patch out on your machine against a current CVS checkout?

Index: config.m4
===================================================================
RCS file: /repository/php4/ext/iconv/config.m4,v
retrieving revision 1.7
diff -u -r1.7 config.m4
--- config.m4   30 Nov 2001 18:59:38 -0000      1.7
+++ config.m4   3 Mar 2002 06:24:44 -0000
@@ -7,15 +7,27 @@
 
 if test "$PHP_ICONV" != "no"; then
 
+dnl This is a fix for why FreeBSD does not work with ICONV
+dnl It seems libtool checks for libiconv_open which only exists in
+dnl the giconv series of files under FreeBSD
+
+  ac_os_uname = `uname -s 2>/dev/null`
+
+  if test "$ac_os_uname" = "FreeBSD"; then
+       lib_name=giconv
+  else
+       lib_name=iconv
+  fi
+
   for i in /usr /usr/local $PHP_ICONV; do
-    test -r $i/include/iconv.h && ICONV_DIR=$i
+    test -r $i/include/${lib_name}.h && ICONV_DIR=$i
   done
 
   if test -z "$ICONV_DIR"; then
     AC_MSG_ERROR(Please reinstall the iconv library.)
   fi
   
-  if test -f $ICONV_DIR/lib/libconv.a -o -f $ICONV_DIR/lib/libiconv.$SHLIB_SUFFIX_NAME ; then
+  if test -f $ICONV_DIR/lib/libconv.a -o -f $ICONV_DIR/lib/lib${lib_name}.$SHLIB_SUFFIX_NAME ; 
then
     PHP_ADD_LIBRARY_WITH_PATH(iconv, $ICONV_DIR/lib, ICONV_SHARED_LIBADD)
     AC_CHECK_LIB(iconv, libiconv_open, [
        AC_DEFINE(HAVE_ICONV, 1, [ ])
Index: php_iconv.h
===================================================================
RCS file: /repository/php4/ext/iconv/php_iconv.h,v
retrieving revision 1.9
diff -u -r1.9 php_iconv.h
--- php_iconv.h 13 Dec 2001 14:31:16 -0000      1.9
+++ php_iconv.h 3 Mar 2002 06:24:44 -0000
@@ -26,8 +26,9 @@
 #define PHP_ICONV_API
 #endif
 
+#if HAVE_ICONV
 extern zend_module_entry iconv_module_entry;
-#define phpext_iconv_ptr &iconv_module_entry
+#define iconv_module_ptr &iconv_module_entry;
 
 PHP_MINIT_FUNCTION(miconv);
 PHP_MSHUTDOWN_FUNCTION(miconv);
@@ -53,6 +54,14 @@
 #define ICONV_INPUT_ENCODING "ISO-8859-1" 
 #define ICONV_OUTPUT_ENCODING "ISO-8859-1"
 #define ICONV_INTERNAL_ENCODING "ISO-8859-1" 
+
+#else
+
+#define iconv_module_ptr NULL
+
+#endif /* HAVE_ICONV */
+
+#define phpext_iconv_ptr iconv_module_entry
 
 #endif /* PHP_ICONV_H */

 [2002-03-04 18:28 UTC] kalowsky@php.net
This bug has been fixed in CVS.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC