I have macOS 12 Monterey, PHP 7.4. I would like to install sqlsrv and pdo_sqlsrv drives. However, I got the following error.
g++ -I/opt/homebrew/Cellar/php@7.4/7.4.27/include/php/ext -std=c++11 -I. -I/private/tmp/pear/temp/pdo_sqlsrv -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootbnJKua/pdo_sqlsrv-5.9.0/include -I/private/tmp/pear/temp/pear-build-rootbnJKua/pdo_sqlsrv-5.9.0/main -I/private/tmp/pear/temp/pdo_sqlsrv -I/opt/homebrew/Cellar/php@7.4/7.4.27/include/php -I/opt/homebrew/Cellar/php@7.4/7.4.27/include/php/main -I/opt/homebrew/Cellar/php@7.4/7.4.27/include/php/TSRM -I/opt/homebrew/Cellar/php@7.4/7.4.27/include/php/Zend -I/opt/homebrew/Cellar/php@7.4/7.4.27/include/php/ext -I/opt/homebrew/Cellar/php@7.4/7.4.27/include/php/ext/date/lib -I/private/tmp/pear/temp/pdo_sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /private/tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp -fno-common -DPIC -o .libs/pdo_dbh.o
In file included from /private/tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp:24:
In file included from /private/tmp/pear/temp/pdo_sqlsrv/php_pdo_sqlsrv_int.h:23:
In file included from /private/tmp/pear/temp/pdo_sqlsrv/shared/core_sqlsrv.h:41:
In file included from /private/tmp/pear/temp/pdo_sqlsrv/shared/FormattedPrint.h:24:
In file included from /private/tmp/pear/temp/pdo_sqlsrv/shared/xplat_winnls.h:24:
In file included from /private/tmp/pear/temp/pdo_sqlsrv/shared/typedefs_for_linux.h:23:
/private/tmp/pear/temp/pdo_sqlsrv/shared/xplat.h:30:10: fatal error: 'sql.h' file not found
#include <sql.h>
^~~~~~~
1 error generated.
make: *** [pdo_dbh.lo] Error 1
ERROR: `make' failed
I also try 5.10.0-beta2 (pre-release) [1]: https://github.com/microsoft/msphpsql/releases/. But I still get the same error. Did I miss any steps or the release is not ready for macOS 12. Thanks