asdf-community/asdf-php

PHP won't install PEAR/PECL on macOS w/ libxml2@2.13.3

Closed this issue · 1 comments

Provide environment information

OS:
Darwin slothfire.attlocal.net 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64 x86_64

SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)

BASH VERSION:
5.2.32(1)-release

ASDF VERSION:
v0.14.1

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/will/.asdf
ASDF_DIR=/usr/local/opt/asdf/libexec
ASDF_CONFIG_FILE=/Users/will/.asdfrc

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 65441d3
php                          https://github.com/asdf-community/asdf-php.git master 52c669a
python                       https://github.com/danhper/asdf-python.git master 8505457
ruby                         https://github.com/asdf-vm/asdf-ruby.git master 4e5b177

To Reproduce

Install the latest libxml2 - 2.13.3

brew install libxml2

or

brew upgrade libxml2

Install php

asdf install php 8.2.14

NOTE: I also tried 8.2.23, 8.2.22, 8.3.11, etc

Pear and pecl are missing from the new installation

pecl --version
pear --version
cat $(which pecl)
cat $(which pear)

There were a couple times where Pear seemed to be partially installed with 8.2.23, but I couldn't repeat it.

Describe the Bug

This bug is related to an issue with php itself. See here

Apparently, libxml2@2.13.3 is incompatible with some of the php builds. According to that ticket, there is a fix in the pipeline, but it clearly hasn't propagated yet.

I'm creating this post to share a solution for anyone else who comes across this issue

Expected Behaviour

The expected behavior is that PECL/PEAR are installed along with the corresponding version unless you explicitly exclude them.

I solved this by installing libxml2 @ 2.12.9. Steps are here