php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31224 iconv path is locked to /usr/local
Submitted: 2004-12-21 09:23 UTC Modified: 2004-12-21 23:44 UTC
From: js at enradia dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.0.3 OS: gentoo 2.6.9
Private report: No CVE-ID: None
 [2004-12-21 09:23 UTC] js at enradia dot com
Description:
------------
I cannot override the iconv path with either: 
--with-iconv-dir=/new/path 
or 
--with-iconv=/new/path 
 
(the configure file seem to either accept both or are 
unclear as to which is needed)   
 
 
 

Reproduce code:
---------------

my configure statement is like this:
--prefix="/new/path" \
--with-config-file-path="/new/path/etc" \
--with-zlib-dir="/new/path/include" \
--with-libxml-dir="/new/path" \
--enable-sockets \
--enable-wddx \
--with-iconv-dir=/stuff/code/php-module \
--with-iconv="/new/path" \
--with-xsl="/new/path" \
--with-expat-dir="/new/path" \
--with-gd \
--with-gd-native-ttf \
--with-jpeg-dir="/new/path" \
--with-png-dir=/new/path \
--with-xmlrpc="/new/path" \
--with-zlib  \
--enable-discard-path


Expected result:
----------------
 

Actual result:
--------------
My config breaks with: 
checking libexpat install dir... no 
checking whether libxml build works... (cached) yes 
checking for XMLRPC-EPI support... yes 
checking libexpat dir for XMLRPC-EPI... /new/path 
checking iconv dir for XMLRPC-EPI... /usr/local 
configure: error: iconv not found, in order to build 
xmlrpc you need the iconv library 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-21 09:54 UTC] derick@php.net
What does config.log say, perhaps you're missing headers? Also... as you're running linux you should not have to use any paths/external libraries in the first place, as glibc already contains a iconv implementation.
 [2004-12-21 17:11 UTC] js at enradia dot com
Config log end: 
configure:79659: gcc -o conftest -O2 -march=i386 
-mcpu=i686   -Wl,-rpath,/stuff/code/php-module/php/lib 
-L/stuff/code/php-module/php/lib conftest.c -lcrypt 
-lmysqlclient -liconv -lpng -lz -ljpeg -lz -lresolv -lm 
-ldl -lnsl  -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 
-lxml2 -lz -liconv -lm -lcrypt 1>&5 
configure:79684: checking for mbstate_t 
configure:79703: gcc -c -O2 -march=i386 -mcpu=i686  
conftest.c 1>&5 
configure:79998: checking for Sybase support 
configure:80595: checking for Sybase-CT support 
configure:81557: checking whether to enable System V IPC 
support 
configure:81828: checking whether to enable System V 
semaphore support 
configure:82145: checking whether to enable System V 
shared memory support 
configure:82416: checking for TIDY support 
configure:82842: checking whether to enable tokenizer 
support 
configure:83115: checking whether to enable WDDX support 
configure:83390: checking whether to enable XML support 
configure:83463: checking libexpat install dir 
configure:83619: checking whether libxml build works 
configure:84082: checking for XMLRPC-EPI support 
configure:84128: checking libexpat dir for XMLRPC-EPI 
configure:84153: checking iconv dir for XMLRPC-EPI 
 
I realize that I can use my local iconv but for my setup I 
need to create something more encapsulated. I do it with 
php 4 no problem. Regardless... there seems to be an issue 
as it doesn't appear to find it. 
 
In the path I gave to with-iconv= 
I have 
/thepath 
   /include 
      iconv.h,libcharset.h,localcharset.h...more 
   /lib 
      libiconv.la,libiconv.so,libiconv.so.2,libiconv.so.2.2.0,libiconv_plug.sh..more 
 
I was trying to play with the configure file but no luck 
so far. A little lost on how it tries to get the path. But 
I'm comfortable enough modifying in any you want to 
backtrace
 [2004-12-21 23:06 UTC] js at enradia dot com
update. 
It seems that iconv directive works fine for standard php 
- I see it detect during the configure and it goes on 
fine. But if I add the --with-xmlrpc="/new/path" directive 
then it fails during the XMLRPC iconv detection which 
occurs after the regular detection. It seems to do it 
twice in this case and the 2nd one fails.
 [2004-12-21 23:44 UTC] js at enradia dot com
Duuhhhh 
resolved. 
My faylt. I was tagging on some configure options 
automatically using a script and they had an iconv-dir 
directive that created the conflict. Double Duh! 
Sorry to bother ya. Thanks for your time!
 [2015-08-17 15:14 UTC] cahuza at hotmail dot com
Hello. I have to install PHP 4 in Centos 7. My version is 4.4.8. When I add the '--with-iconv' directive I get:

checking for iconv support ... yes
... no checking for iconv
... no checking for libiconv
configure: error: Please reinstall the iconv library.

Change to --with-iconv-dir = / usr / local / libiconv (libiconv-1.13.1 compile and install in / usr / local / libiconv) and the result is:

checking for iconv support ... not
iconv checking for XMLRPC-EPI dir ... / usr / local / libiconv
checking for iconv dir for Sablotron XSL support ... / usr / local / libiconv

But, when you add the line --with-xmlrpc part of the iconv library says:

checking for iconv support ... not
iconv checking for XMLRPC-EPI dir ... / usr / local / libiconv
checking for libiconv in -liconv ... no
checking for iconv in -liconv ... no
configure: error: not found iconv, in order to build xmlrpc you need the iconv library

The config.log says:


configure:92022: checking for iconv in -liconv
configure:92041: gcc -o conftest -g -O2  -Wl,-rpath,/usr/local/libiconv/lib -L/usr/local/libiconv/lib  -Wl,-rpath,/usr/local/zlib/lib -L/usr/local/zlib/lib -Wl,-rpath,/usr/lib64 -L/usr/lib64 -Wl,-rpath,/usr/local/expat/lib -L/usr/local/expat/lib conftest.c -liconv  -lexpat -lexpat -lcrypt -lpq -lxml -lxslt -lz -lz -lresolv -lm -ldl -lnsl  -lssl -lcrypto -lxml2 -lz -lm -ldl -lcrypt 1>&5
/usr/bin/ld: cannot find -lxml
collect2: error: ld returned 1 exit status
configure: failed program was:
#line 92030 "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.  */
char iconv();

int main() {
iconv()
; return 0; }

***********************
What do I do? which may be the problem? if I use --with-iconv it works in one place and not in another and the same with --with-iconv-dir. Can you help me?

Tnks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC