Building PHP

OpenSUSE

Ended up aborting this, but the notes might be handy for reference

# Install phpenv
curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | bash

# setup opensuse tumbleweed, php compiling required packages
sudo zypper install -y -t pattern devel_basis 
sudo zypper install -y libxml2-devel libxslt-devel openssl-devel sqlite3-devel libbz2-devel libcurl-devel libpng-devel libjpeg-devel libicu-devel oniguruma-devel libtidy-devel libzip-devel

phpenv install 8.0.23  

:(

HomeBrew

For php-version

$ brew install php@7.3
$ php-version 7.3

macOS PHPenv

For phpenv (untested and incomplete). Install phpenv first.

brew install openssl bzip2 libiconv
PHP_BUILD_CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl) --with-bz2=$(brew --prefix bzip2) --with-iconv=$(brew --prefix libiconv)" phpenv install 8.0.26

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
/usr/local/Cellar/openssl@3/3.1.0/include/openssl/dh.h:203:1: note: 'DH_free' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
^
/usr/local/Cellar/openssl@3/3.1.0/include/openssl/macros.h:193:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
#   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
                                                ^
/usr/local/Cellar/openssl@3/3.1.0/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
#     define OSSL_DEPRECATED(since) __attribute__((deprecated))
                                                   ^
3 warnings generated.
-----------------------------------------

Revision #6
Created 26 April 2023 10:50:45 by Sander
Updated 2 May 2023 08:27:05 by Sander