--with-libxml-dir and libxml headers on MacOS

php.internals

Brent

6 years ago
Hello internals The upgrading guide lists that the option --with-libxml-dir is removed in PHP 7.4 (https://github.com/php/php-src/blob/PHP-7.4/UPGRADING#L763 <https://github.com/php/php-src/blob/PHP-7.4/UPGRADING#L763>). Unfortunately on MacOS, header files are not stored in the usual locations, which means that compiling PHP fails with the following error: fatal error: 'libxml/parser.h' file not found With the removal of --with-libxml-dir, I wonder what the right way is to tell PHP where the header files are located. As a sidenote: some might suggest using the built-in MacOS tool to install the header files in /usr/include (https://silvae86.github.io/sysadmin/mac/osx/mojave/beta/libxml2/2018/07/05/fixing-missing-headers-for-homebrew-in-mac-osx-mojave/ <https://silvae86.github.io/sysadmin/mac/osx/mojave/beta/libxml2/2018/07/05/fixing-missing-headers-for-homebrew-in-mac-osx-mojave/>), though this tool doesn't seem to work anymore in recent MacOS versions. Kind regards Brent

Christoph Becker

6 years ago
On 21.11.2019 at 11:36, Brent Roose wrote:
> The upgrading guide lists that the option --with-libxml-dir is removed in PHP 7.4 (https://github.com/php/php-src/blob/PHP-7.4/UPGRADING#L763 <https://github.com/php/php-src/blob/PHP-7.4/UPGRADING#L763>). Unfortunately on MacOS, header files are not stored in the usual locations, which means that compiling PHP fails with the following error: fatal error: 'libxml/parser.h' file not found > > With the removal of --with-libxml-dir, I wonder what the right way is to tell PHP where the header files are located.
See <https://github.com/php/php-src/blob/php-7.4.0RC6/UPGRADING#L720-L724>.
-- Christoph M. Becker