export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
export CXXFLAGS="-I/usr/local/include"
export CFLAGS="-I/usr/local/include"
Option --libdir
let it install to lib
directory rather then lib64
(MySQL can't recognize it)
wget --no-hsts https://github.com/openssl/openssl/releases/download/openssl-3.5.0/openssl-3.5.0.tar.gz
tar zxf openssl-3.5.0.tar.gz
cd openssl-3.5.0
./Configure --prefix=/usr/local --libdir=lib --openssldir=/usr/local/etc/openssl --api=1.1.0 no-deprecated shared enable-ktls enable-ec_nistp_64_gcc_128 no-uplink no-comp no-docs no-filenames no-fips-securitychecks no-fips-post no-ml-dsa no-ml-kem no-gost no-http no-legacy no-sm2-precomp no-tests no-ts no-ui-console no-ssl no-ssl3-method no-argon2 no-bf no-blake2 no-cast no-cmac no-dsa no-idea no-md4 no-mdc2 no-ocb no-rc2 no-rc4 no-rmd160 no-scrypt no-siphash no-siv no-whirlpool
make install
wget --no-hsts https://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
tar zxf termcap-1.3.1.tar.gz
cd termcap-1.3.1
./configure --prefix=/usr/local
make install
wget --no-hsts https://ftp.gnu.org/gnu/readline/readline-8.2.13.tar.gz
tar zxf readline-8.2.13.tar.gz
cd readline-8.2.13
./configure --prefix=/usr/local --enable-static --without-debug --without-python
make install
wget --no-hsts https://ftp.postgresql.org/pub/source/v17.5/postgresql-17.5.tar.gz
tar zxf postgresql-17.5.tar.gz
cd postgresql-17.5
./configure --prefix=/usr/local --without-icu --without-zlib --with-openssl --with-readline
make install
Option CMAKE_FIND_USE_CMAKE_SYSTEM_PATH
disallowed cmake find libaray in standard pathes and so on
Option CMAKE_PREFIX_PATH
sets expected library pathes
wget --no-hsts https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.5.tar.gz
tar zxf mysql-8.4.5.tar.gz
cd mysql-8.4.5
mkdir dogshit
cd dogshit
cmake .. -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=0 -DCMAKE_PREFIX_PATH="/usr;/usr/local" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DINSTALL_SBINDIR=sbin -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_PRIV_LIBDIR=lib/mysql/private -DINSTALL_MYSQLSHAREDIR=share/mysql -DINSTALL_PLUGINDIR=lib/mysql/plugin -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_general_ci
wget --no-hsts https://curl.se/download/curl-8.13.0.tar.gz
tar zxf curl-8.13.0.tar.gz
cd curl-8.13.0
./configure --prefix=/usr/local --disable-werror --disable-warnings --disable-debug --disable-curldebug --disable-unity --disable-test-bundles --disable-ftp --disable-ipfs --disable-ldap --disable-ldaps --disable-rtsp --disable-dict --disable-telnet --disable-tftp --disable-gopher --disable-mqtt --disable-smb --disable-manual --disable-docs --disable-libcurl-option --disable-threaded-resolver --disable-sspi --disable-kerberos-auth --disable-negotiate-auth --disable-aws --disable-ntlm --disable-socketpair --disable-bindlocal --disable-netrc --disable-dnsshuffle --without-libpsl --without-libgsasl --without-librtmp --without-winidn --without-apple-idn --without-ngtcp2 --without-nghttp3 --without-quiche --without-msh3 --without-zsh-functions-dir --without-libuv --disable-httpsrr --enable-optimize --enable-symbol-hiding --enable-versioned-symbols --enable-ares --enable-http --enable-pop3 --enable-imap --enable-smtp --enable-ipv6 --enable-basic-auth --enable-bearer-auth --enable-digest-auth --enable-unix-sockets --enable-cookies --enable-http-auth --enable-doh --enable-mime --enable-form-api --enable-dateparse --enable-progress-meter --enable-sha512-256 --enable-get-easy-options --enable-alt-svc --enable-headers-api --enable-hsts --enable-websockets --with-openssl --with-zlib --with-brotli --with-zstd --with-nghttp2 --without-fish-functions-dir --with-ca-bundle=/usr/local/etc/root.pem
LIBRARY_REL
will be lib/x86_64-linux-gnu
under ubuntu (change it)
wget --no-hsts https://github.com/P-H-C/phc-winner-argon2/archive/refs/tags/20190702.tar.gz
tar zxf 20190702.tar.gz
cd phc-winner-argon2-20190702
PREFIX=/usr/local LIBRARY_REL=lib make install
wget --no-hsts https://www.php.net/distributions/php-8.1.31.tar.gz
tar zxf php-8.1.31.tar.gz
cd php-8.1.31
./configure --prefix=/usr/local --with-config-file-path=/usr/local/etc/php --disable-cgi --disable-phpdbg --disable-short-tags --disable-all --with-libxml --with-password-argon2 --enable-fpm