--with-libxml-dir and libxml headers on MacOS
| From: | Brent Roose | Date: | Thu, 21 Nov 2019 10:36:51 +0000 |
| Subject: | --with-libxml-dir and libxml headers on MacOS | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-107846@lists.php.net to get a copy of this message | ||
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