ID: 35288
Updated by: [EMAIL PROTECTED]
Reported By: webmaster at negeta dot com
Status: Assigned
Bug Type: ICONV related
Operating System: FreeBSD 5.4
PHP Version: 5CVS-2005-12-13
Assigned To: moriyoshi
New Comment:
See also bug #35554
Previous Comments:
------------------------------------------------------------------------
[2005-12-12 13:29:46] webmaster at negeta dot com
I don't disagree that -lxml2 and -liconv are necessary for build iconv
extension.
I said "compile" as "compile configure:44150", and paste its log.
It only checks iconv() in the libc.
I think -liconv shouldn't exist here,
because it make to link to iconv library.
I understand the searching order as follows:
1. iconv() in the libc.
2. libiconv() in the libc.
3. libiconv() in the userland.
4. iconv() in the userland.
Because acinclude.m4 says
"Check libc first if no path is provided in --with-iconv."
Is this searching order wrong?
My system has libiconv() and iconv() in the userland.
(libiconv() is an alias of iconv().)
I think following behavior is correct:
1. and 2. fail, and 3. succeeds.
------------------------------------------------------------------------
[2005-12-11 23:47:38] [EMAIL PROTECTED]
Well, then are you *really* sure that the userland function named
libiconv() is defined instead of iconv() in your build and that's the
case?
Regarding the issues you call "more basal things", -liconv is appended
to resolve libxml2 dependency there and so it's not a problem in the
iconv extension.
You always need to specify --with-iconv=[PREFIX] when the libc doesn't
have an iconv implementation nor no alternative can be found in the
default header search path (supposedly /usr/include).
------------------------------------------------------------------------
[2005-12-10 01:28:14] webmaster at negeta dot com
I found more basal things which cause this problem.
configure checks iconv in libc first.
But '-liconv' is added to compile option.
My system does not have iconv in libc , but it is found.
My system should find 'libiconv' in configure:44354.
-- output
checking for iconv support... yes
checking for iconv... yes
-- config.log
configure:44060: checking for iconv support
configure:44122: checking for iconv
configure:44150: gcc -o conftest -g -O2 -R/usr/local/lib
-L/usr/local/lib conftest.c -lm -lxml2 -lz -liconv -lm -lxml2 -lz
-liconv -lm 1>&5
------------------------------------------------------------------------
[2005-12-07 12:01:24] [EMAIL PROTECTED]
Since when having libiconv() instead of iconv() is expected behaviour?
------------------------------------------------------------------------
[2005-12-07 11:56:18] [EMAIL PROTECTED]
That's expected behaviour. I did not break anything. Rather, it would
never detect the correct header if with --with-iconv before I fixed.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/35288
--
Edit this bug report at http://bugs.php.net/?id=35288&edit=1