asdf-php: Can't install PHP 7 on macOS

When I try to install PHP 7 on macOS High Sierra after following the instructions in the README, I get the following error:

$ export PHP_CONFIGURE_OPTIONS='--disable-gettext'
$ PATH="$(brew --prefix bison)/bin:$(brew --prefix icu4c)/bin:$(brew --prefix icu4c)/sbin:$PATH" PHP_CONFIGURE_OPTIONS="--with-iconv=$(brew --prefix libiconv) --with-openssl=$(brew --prefix openssl)" asdf install php 7.2.1

...

/usr/local/Cellar/icu4c/60.2/include/unicode/unistr.h:3014:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text)) {}
      ^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/60.2/include/unicode/unistr.h:3076:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text), length) {}
      ^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/60.2/include/unicode/unistr.h:3169:7: error: delegating constructors are permitted only in C++11
      UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
      ^~~~~~~~~~~~~
12 warnings and 3 errors generated.
make: *** [ext/intl/intl_convertcpp.lo] Error 1

Any idea about what is going on?

After Googling around I could only find one related and unsolved issue: https://github.com/phpbrew/phpbrew/issues/899

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 28 (10 by maintainers)

Most upvoted comments

@jeromedalbert try:

brew tap magrathealabs/homebrew-mlabs
brew install icu4c icu4c@58.1

5.6

export PATH="$(brew --prefix bison@2.7)/bin:$(brew --prefix icu4c@58.1)/bin:$(brew --prefix icu4c@58.1)/sbin:$PATH"
export PHP_CONFIGURE_OPTIONS="--with-iconv=$(brew --prefix libiconv) --with-openssl=$(brew --prefix openssl)"
asdf install php 5.6.36

7.x

export PATH="$(brew --prefix bison)/bin:$(brew --prefix icu4c)/bin:$(brew --prefix icu4c)/sbin:$PATH"
export PHP_CONFIGURE_OPTIONS="--with-iconv=$(brew --prefix libiconv) --with-openssl=$(brew --prefix openssl)"
export PHP_CONFIGURE_OPTIONS='--disable-gettext'
asdf install php 7.2.6

There are too many irrelevant people in the thread. If you need help, open a new post on discussions.

@salzig Yes, that would be a good idea.

checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/

After running

brew install libsodium gpg git tmux neovim vim htop curl wget re2c bison zlib libgd libiconv oniguruma postgresql bzip2 readline libedit tidy-html5 openssl libzip

export PATH="$(brew --prefix bison)/bin:$(brew --prefix icu4c)/bin:$(brew --prefix icu4c)/sbin:$PATH"
export PHP_CONFIGURE_OPTIONS="--with-zlib-dir=$(brew --prefix zlib) --with-bz2=$(brew --prefix bzip2) --with-readline=$(brew --prefix readline) --with-libedit=$(brew --prefix libedit) --with-tidy=$(brew --prefix tidy-html5) --with-iconv=$(brew --prefix libiconv) --with-openssl=$(brew --prefix openssl) --with-curl=$(brew --prefix curl)"

asdf install php 7.1.3

PHP 8.0.6 succeeds.