php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: p2409 at hotmail dot com
New email:
PHP Version: OS:

 

 [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 commitsRelated reports
 [2009-03-17 23:49 UTC] scottmac@php.net
AC_MSG_CHECKING([if iconv supports errno])

it's intentionally checking to see if iconv sets errno as well as returning -1.

This has nothing to do with iconv not building on leopard.
 [2009-04-27 17:49 UTC] scottmac@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

--with-iconv=/opt/local not --with-iconv-dir this is only for xmlrpc and not for the regular iconv.
 [2009-04-27 18:35 UTC] jani@php.net
Not fixed in PHP_5_2 -> re-opened and assigned.
 [2009-04-27 18:42 UTC] jani@php.net
Fixed in all branches now, thanks Scott.
 [2009-04-30 09:28 UTC] p2409 at hotmail dot com
"[17 Mar 11:49pm UTC] scottmac@php.net
AC_MSG_CHECKING([if iconv supports errno])

it's intentionally checking to see if iconv sets errno as well as
returning -1.

This has nothing to do with iconv not building on leopard."


So what got fixed then?
 [2009-04-30 13:03 UTC] scottmac@php.net
Whoops, this was the wrong bug report. Was another iconv issue on leopard.

bug #43189
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 18:01:30 2024 UTC