|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77011 configure cannot detect iconv library on Mojave (macOS 10.14)
Submitted: 2018-10-14 19:42 UTC Modified: -
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: axnnoindexr11 at gmail dot com Assigned:
Status: Open Package: Compile Failure
PHP Version: 7.3.0RC3 OS: macOS 10.14
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-10-14 19:42 UTC] axnnoindexr11 at gmail dot com
In Mojave, remove /usr/include and put system headers on only /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include:

Yesterday, I tried to compile PHP with iconv bundled Mojave, but ./configure reports an error: Please reinstall the iconv library.
I researched the reason and I found that shared libraries bundled Mojave have strange extensions, `.tbd`.

$ xcrun --show-sdk-path
$ ls $(xcrun --show-sdk-path)/usr/include/iconv.h
$ ls $(xcrun --show-sdk-path)/usr/lib/libiconv.*
$ ls /usr/include
ls: cannot access '/usr/include': No such file or directory
$ ls /usr/lib/libiconv.*

configure of PHP check only `.dylib` for macOS libraries.  Actually, `.tbd` is also a shared library extension for macOS and make works well after I applied simple patch that also checks `.tbd`.

I want to add `.tbd` extension support for configure.

Test script:
/usr/bin/ruby -e "$(curl -fsSL"
brew update && brew install autoconf pkg-config bison sqlite
env PATH=$(brew --prefix bison)/bin:$PATH ./configure \
  --without-pear \
  --enable-fpm \
  --with-mysqli \
  --with-sqlite3=$(brew --prefix sqlite) \
  --with-pdo-sqlite=$(brew --prefix sqlite) \
  --with-iconv=$(xcrun --show-sdk-path)/usr

Expected result:
No errors

Actual result:
checking size of short... (cached) 2
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of long long... (cached) 8
checking size of long int... 8
checking checking if we're at 64-bit platform... yes
checking for iconv support... yes
configure: error: Please reinstall the iconv library.


add-tbd-ext-for-iconv (last revision 2018-10-14 19:42 UTC by )

Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Mar 24 11:01:26 2019 UTC