php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80585 Compile error - iconv dose not support errno
Submitted: 2021-01-04 15:06 UTC Modified: 2021-01-05 10:28 UTC
Votes:6
Avg. Score:4.3 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:3 (50.0%)
Same OS:3 (50.0%)
From: tomas at rybarik dot com Assigned:
Status: Open Package: *Compile Issues
PHP Version: 8.0.0 OS: OracleLinux 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tomas at rybarik dot com
New email:
PHP Version: OS:

 

 [2021-01-04 15:06 UTC] tomas at rybarik dot com
Description:
------------
I'm unable to compile PHP 8.0.0 with enabled iconv.
This is output from configure command:
checking for iconv support... yes
checking for iconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... no
configure: error: iconv does not support errno

I tried compile PHP 7.4.13 with the same version of iconv (1.16), there everything is OK.
checking for iconv support... yes
checking for iconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... yes
checking if iconv supports //IGNORE... no



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-05 10:28 UTC] cmb@php.net
As of PHP 8.0.0, iconv implementation which do not support errno
(i.e. non POSIX conforming implementations) are no longer
supported.  Either you glic iconv does not support errno, or that
support is wrongly detected.

Consider to install and use libiconv.
 [2021-01-18 08:49 UTC] shimozawa dot hiroki at misou dot co dot jp
I am also getting the same error.
Will it be fixed in the next version?

Reproduction procedure.

~~~
# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 

# cd /usr/local/src/
# wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
# tar zxvf ./libiconv-1.16.tar.gz
# cd libiconv-1.16
# ./configure --prefix=/usr
# make & make install

# iconv --version
iconv (GNU libiconv 1.16)
Copyright (C) 2000-2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
...


# cd /usr/local/src/php-8.0.1
# ./configure \
... \
... \
--with-iconv

...
...
checking for iconv support... yes
checking for iconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... no
configure: error: iconv does not support errno
 [2021-03-09 22:47 UTC] guillaume-php at outters dot eu
Tomas, could you please tell us what error is logged in the config.log?

As suggested by cmg, this is a problem of detection; but in my case (FreeBSD 10.2, with "hand"-compiled GNU iconv 1.16 without pkgconfig), the detection program had no problem, rather it was its compile env that lacked a -liconv.

So this could be circumvented by running an:
  export LDFLAGS="$LDFLAGS -liconv"
before the configure.

I _think_ that, like you, I had no problem compiling a PHP 7 in the same environment (so this detect failure would be a configure regression); but I cannot be certain.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 05:01:23 2021 UTC