--with-iconv configure option always fails in Leopard
| Bug #47695 | --with-iconv configure option always fails in Leopard | ||||
|---|---|---|---|---|---|
| Submitted: | 2009-03-17 18:02 UTC | Modified: | 2009-04-30 13:03 UTC | ||
| From: | p2409 at hotmail dot com | Assigned: | scottmac (profile) | ||
| Status: | Not a bug | Package: | Compile Failure | ||
| PHP Version: | 5.2.9 | OS: | Mac OS X 10.5.5 | ||
| Private report: | No | CVE-ID: | None | ||
[2009-03-17 18:02 UTC] p2409 at hotmail dot com
Description:
------------
Many people report problems compiling PHP on Leopard due to a libiconv issue.
This may be due to the small C test programme in ./configure.
It calls open_conv with two const * char arguments (correct), but these are NOT valid charsets to iconv (incorrect). This then breaks ./configure.
AFAIK from the libiconv documentation, the PHP ./configure call is incorrect: this function expects two valid charset arguments. (You can see a list of valid arguments by running iconv -l).
Changing the call to eg.:
cd = open_conv("UTF-8","ISO-8859-1")
returns a valid iconv_t number (non-negative), and configure can then continue setting up for Makefile compile.
Reproduce code:
---------------
In ./configure, search for open_iconv:
cd = open_iconv("*** blah blah ***","*** blah blah ***")
Expected result:
----------------
This call fails ie. cd return value is negative. ./configure considers this a libiconv fail, and does not continue.
The expected result is correct ie. -1, however this test should return a positive number and allow ./configure to continue.
Changing the two parameters in the call to open_iconv to valid charsets (see list with ./iconv -l) returns a valid translaction number (type iconv_t). This would then allow ./configure to continue.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-03-17 23:49 UTC] scottmac@php.net
[2009-04-27 17:49 UTC] scottmac@php.net
[2009-04-27 18:35 UTC] jani@php.net
[2009-04-27 18:42 UTC] jani@php.net
[2009-04-30 09:28 UTC] p2409 at hotmail dot com