php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31546 iconv undefined error
Submitted: 2005-01-14 02:42 UTC Modified: 2005-01-31 22:32 UTC
From: tichiel_ff at yahoo dot co dot jp Assigned:
Status: Not a bug Package: ICONV related
PHP Version: 4.3.10 OS: FreeBSD 4.10
Private report: No CVE-ID: None
 [2005-01-14 02:42 UTC] tichiel_ff at yahoo dot co dot jp
Description:
------------
The following errors were encountered when PHP was built.
It is the same as that of what had the report in the past.
libiconv ver1.9.2 is used.

http://bugs.php.net/bug.php?id=19717

sorry, not good at English.

error message

ext/xmlrpc/libxmlrpc/encodings.lo: In function `convert':
/home/tichiel/src/php-4.3.10/ext/xmlrpc/libxmlrpc/encodings.c:64: undefined referen
ce to `libiconv_open'
/home/tichiel/src/php-4.3.10/ext/xmlrpc/libxmlrpc/encodings.c:75: undefined referen
ce to `libiconv'
/home/tichiel/src/php-4.3.10/ext/xmlrpc/libxmlrpc/encodings.c:95: undefined referen
ce to `libiconv_close'
*** Error code 1

Stop in /home/tichiel/src/php-4.3.10.

configure option

./configure 
--with-apxs2=/usr/local/apache2/bin/apxs 
--with-trac-vars 
--with-zlib-dir=/usr/local/lib 
--enable-mbstring 
--enable-mbregex 
--enable--sockets 
--with-gd=/usr/local 
--enable-gd-native-ttf 
--with-jpeg=/usr/local/lib 
--with-png-dir=/usr/local/lib 
--with-freetype-dir=/usr/local/lib 
--with-mysql=/usr/local 
--with-openssl=/usr 
--enable-simplexml 
--with-xmlrpc



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-14 04:26 UTC] sniper@php.net
What iconv version do you have installed in your system?
You can always try adding this to your configure line:
--with-iconv-dir=</iconv/install/prefix/>

 [2005-01-15 18:53 UTC] rtang at rhyton dot com
When configuring for 4.3.10 using the following configuration:

./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local \
--with-openssl-dir=/usr/local/ssl \
--with-zlib \
--with-curl \
--with-mcrypt \
--with-freetype-dir=/usr/local \
--with-jpeg-dir=/usr/local \
--with-png \
--with-ttf \
--with-iconv-dir=/usr/local/lib \
--with-gd=/usr/local \
--enable-gd-native-ttf \
--enable-sockets \
--with-exif \
--enable-sysvsem \
--enable-sysvshm

The configuration bombs with the following relevant errors from the config.log:

char gdImageString16();

int main() {
gdImageString16()
; return 0; }
configure:33619: checking for gdImagePaletteCopy in -lgd
configure:33638: gcc -o conftest -g -O2  -R/usr/local/lib -L/usr/local/lib  -R/usr/local/lib -L/usr/local/lib conftest.c -lgd  -lgd 
-lfreetype -ljpeg -lcurl -lz -lm  -lcurl -lssl -lcrypto -lz 1>&5
/usr/local/lib/libgd.so: undefined reference to `libiconv_open'
/usr/local/lib/libgd.so: undefined reference to `libiconv_close'
/usr/local/lib/libgd.so: undefined reference to `libiconv'
configure: failed program was:
#line 33627 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */


The same error paragraph duplicates for EACH of the gd functuons, ie: gdImagePaletteCopy(), etc....

I tried to fix the problem by installing iconv-2.0_3, but it didn't make any difference.

The really strange this is that I do NOT get these errors when I configure for 4.3.8. I went back and ran the config (same configuration as above) for 4.3.8 and it worked like a charm.
 [2005-01-16 11:36 UTC] derick@php.net
/usr/local/lib is WRONG, you need to use the prefix only, which is /usr/local
 [2005-01-31 22:32 UTC] sniper@php.net
User error.

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