Essential tools needed for build -------------------------------- - Xcode full install from Appstore - verify that gcc is enabled - xquartz install to default /opt https://www.xquartz.org/ - We will be installing everything to /usr/local - create $HOME/SRC to hold our source code Autoconf https://www.gnu.org/software/autoconf/ curl http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz -o autoconf-latest.tar.gz tar -zxvf autoconf-latest.tar rm autoconf-latest.tar cd autoconf-2.71 ./configure make -j8 sudo make install Now we should enable the /usr/local/bin path to your ENV vi $HOME/.zshrc export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/bin Exit terminal and reload it Automake https://mirror.kumi.systems/gnu/automake/ curl https://mirror.kumi.systems/gnu/automake/automake-1.16.5.tar.gz tar -zxvf automake-1.16.5.tar.gz rm automake-1.16.5.tar.gz cd automake-1.16.5 ./configure make -j8 sudo make install pkg-config https://www.freedesktop.org/wiki/Software/pkg-config/ curl https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -o pkg-config-0.29.2.tar.gz tar -zxvf pkg-config-0.29.2.tar.gz rm pkg-config-0.29.2.tar.gz cd pkg-config LDFLAGS="-framework CoreFoundation -framework Carbon" ./configure --with-internal-glib make -j8 sudo make install OpenSSL https://www.openssl.org/source/old/1.1.1/ curl https://www.openssl.org/source/old/1.1.1/openssl-1.1.1p.tar.gz -o openssl.tar.gz tar -zxvf openssl.tar.gz cd openssl-1.1.1p ./config make -j8 sudo make install pcre https://www.pcre.org/ Download via browser and move to $HOME/SRC https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.tar.gz mv $HOME/Downloads/pcre2-10.40.tar.gz $HOME/SRC tar -zxvf pcre2-10.40.tar.gz rm pcre2-10.40.tar.gz cd pcre2-10.40 ./configure make -j8 sudo make install wget https://ftp.gnu.org/gnu/wget/ curl https://ftp.gnu.org/gnu/wget/wget2-latest.tar.gz -o wget.tar.gz tar -zxvf wget.tar.gz rm wget.tar.gz cd wget2-2.0.1/ ./configure make -j8 sudo make install Next we need to download Mozilla root certs for proper TLS/SSL wget2 work cd $HOME/SRC curl https://curl.se/ca/cacert.pem -o cacert.pem sudo mv cacert.pem /usr/local/ssl/certs Next we need to create a wget wrapper for the above certs to work cd /usr/local/bin vi wget #!/bin/sh /usr/local/bin/wget2 --ca-directory=/usr/local/ssl/certs --progress bar "$1" chmod +x /usr/local/bin/wget libffi https://github.com/libffi/libffi/releases/tag/v3.4.2 wget https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz tar -zxvf libffi-3.4.2.tar.gz rm libffi-3.4.2.tar.gz cd libffi-3.4.2 ./configure make -j8 sudo make install Libiconv https://www.gnu.org/software/libiconv/ wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz tar -zxcvf libiconv-1.17.tar.gz rm libiconv-1.17.tar.gz cd libiconv-1.17 make -j8 sudo make install Gettext https://www.gnu.org/software/gettext/ wget https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz tar -zxvf gettext-0.21.tar.gz rm gettext-0.21.tar.gz cd gettext-0.21 ./configure make -j8 sudo make install LibPNG http://www.libpng.org/pub/png/libpng.html wget https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz tar -zxvf libpng-1.6.37.tar.gz rm libpng-1.6.37.tar.gz cd libpng-1.6.37 ./configure make -j8 sudo make install Cmake https://cmake.org/download/ wget https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0.tar.gz tar -zxvf cmake-3.24.0.tar.gz rm cmake-3.24.0.tar.gz cd cmake-3.24.0 ./configure make -j8 sudo make install Jpeg-turbo https://github.com/libjpeg-turbo/libjpeg-turbo wget https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.7-esr.tar.gz tar -zxvf 2.0.7-esr.tar.gz rm 2.0.7-esr.tar.gz cd libjpeg-turbo-2.0.7-esr mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local .. make -j8 sudo make install XZ https://tukaani.org/xz/ wget https://tukaani.org/xz/xz-5.2.5.tar.gz tar -zxvf xz-5.2.5.tar.gz rm xz-5.2.5.tar.gz cd xz-5.2.5 ./configure make -j8 sudo make install Meson sudo pip3 install meson Ninja https://github.com/ninja-build/ninja git clone https://github.com/ninja-build/ninja cd ninja mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local .. make -j8 sudo make install Glib2 source wget https://download.gnome.org/sources/glib/2.73/glib-2.73.3.tar.xz xz -d glib-2.73.3.tar.xz tar -xvf glib-2.73.3.tar rm glib-2.73.3.tar cd glib-2.73.3 meson setup _build meson compile -C _build sudo meson install -C _build GNUPG https://www.gnupg.org/download/index.html wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.45.tar.bz2 bunzip libgpg-error-1.45.tar.bz2 tar -xvf libgpg-error-1.45.tar rm libgpg-error-1.45.tar cd libgpg-error-1.45 ./configure make -j8 sudo make install wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.10.1.tar.bz2 bunzip2 libgcrypt-1.10.1.tar.bz2 tar -xvf libgcrypt-1.10.1.tar rm libgcrypt-1.10.1.tar cd libgcrypt-1.10.1 ./configure make -j8 sudo make install wget https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2 bunzip2 libassuan-2.5.5.tar.bz2 tar -xvf libassuan-2.5.5.tar rm libassuan-2.5.5.tar cd libassuan-2.5.5 ./configure make -j8 sudo make install wget https://www.gnupg.org/ftp/gcrypt/libksba/libksba-1.6.0.tar.bz2 bunzip2 libksba-1.6.0.tar.bz2 tar -xvf libksba-1.6.0.tar rm libksba-1.6.0.tar cd libksba.1.6.0 ./configure make -j8 sudo make install wget https://www.gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2 bunzip2 npth-1.6.tar.bz2 tar -xvf npth-1.6.tar rm ntpth-1.6.tar cd npth-1.6 ./configure make -j8 sudo make install wget https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.3.7.tar.bz2 bunzip2 gnupgp-2.3.7.tar.bz2 tar -xvf gnupgp-2.3.7.tar rm gnupgp-2.3.7.tar cd gnupgp-2.3.7 ./configure make -j8 Pixman https://www.cairographics.org/releases/ wget https://www.cairographics.org/releases/pixman-0.40.0.tar.gz tar -zxvf pixman-0.40.0.tar.gz rm pixman-0.40.0.tar.gz cd pixman-0.40.0 ./configure make -j8 sudo make install LibOGG LbbVorbis https://xiph.org/downloads/ wget https://downloads.xiph.org/releases/ogg/libogg-1.3.5.tar.gz tar -zxvf libogg-1.3.5.tar.gz rm libogg-1.3.5.tar.gz cd liboff-1.3.5 ./configure make -j8 sudo make install wget https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.gz tar -zxvf libvorbis-1.3.7.tar.gz rm libvorbis-1.3.7.tar.gz cd libvorbis-1.3.7 ./configure make -j8 sudo make install FLAC https://ftp.osuosl.org/pub/xiph/releases/flac/ wget https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.4.tar.xz xz -d flac-1.3.4.tar.xz tar -xvf flac-1.3.4.tar rm flac-1.3.4.tar cd flac-1.3.4 ./configure make -j8 sudo make install Opus https://opus-codec.org/downloads/ wget https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz tar -zxvf opus-1.3.1.tar.gz rm opus-1.3.1.tar.gz cd opus-1.3.1 ./configure make -j8 sudo make install wget https://downloads.xiph.org/releases/opus/opusfile-0.12.tar.gz tar -zxvf opusfile-0.12.tar.gz rm opusfile-0.12.tar.gz cd opusfile-0.12 ./configure make -j8 sudo make install wget https://archive.mozilla.org/pub/opus/libopusenc-0.2.1.tar.gz tar -zxvf libopusenc-0.2.1.tar.gz rm libopusenc-0.2.1.tar.gz cd libopusenc-0.2.1 ./configure make -j8 sudo make install wget https://archive.mozilla.org/pub/opus/opus-tools-0.2.tar.gz tar -zxvf opus-tools-0.2.tar.gz rm opus-tools-0.2.tar.gz cd opus-tools-0.2 ./configure make -j8 sudo make install Bison https://ftp.gnu.org/gnu/bison/ wget https://ftp.gnu.org/gnu/bison/bison-3.8.tar.gz tar zxvf bison-3.8.tar.gz rm bison-3.8.tar.gz cd bison-3.8 ./configure make -j8 sudo make install Libtool http://www.gnu.org/software/libtool wget https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz tar -zxvf libtool-2.4.6.tar.gz rm libtool-2.4.6.tar.gz cd libtool-2.4.6 ./configure make -j8 sudo make install LibXML2 http://xmlsoft.org/sources/ wget http://xmlsoft.org/sources/libxml2-sources-2.9.10.tar.gz tar -zxvf libxml2-source-2.9.10.tar.gz rm libxml2-sources-2.9.10.tar.gz cd libxml2-2.9.10 ./configure make -j8 sudo make install json-glib https://gitlab.gnome.org/GNOME/json-glib git clone https://gitlab.gnome.org/GNOME/json-glib.git cd json-glib meson setup _build meson compile -C _build sudo meson install -C _build sudo pip3 install certifi ZSTD https://github.com/facebook/zstd/releases/tag/v1.5.2 wget https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz tar -zxvf zstd-1.5.2.tar.gz rm zstd-1.5.2.tar.gz cd zstd-1.5.2 make sudo make install GNUTLS https://www.gnutls.org/ wget https://gmplib.org/download/gmp/gmp-6.2.1.tar.bz2 bunzip2 gmp-6.2.1.tar.bz2 tar -xvf gmp-6.2.1.tar rm gmp-6.2.1.tar cd gmp-6.2.1 ./configure make -j8 make check sudo make install wget https://ftp.gnu.org/gnu/nettle/nettle-3.8.tar.gz tar -zxvf nettle-3.8.tar.gz rm nettle-3.8.tar.gz cd nettle-3.8 ./configure make -j8 sudo make install wget https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.18.0.tar.gz tar -zxvf libtasn1-4.18.0.tar.gz rm libtasn1-4.18.0.tar.gz cd libtasn1-4.18.0 ./configure make -j8 sudo make install wget https://ftp.gnu.org/gnu/libunistring/libunistring-1.0.tar.gz tar -zxvf libunistring-1.0.tar.gz rm libunistring-1.0.tar.gz cd libunistring-1.0 ./configure make -j8 sudo make install wget https://github.com/p11-glue/p11-kit/archive/refs/tags/0.24.1.tar.gz tar -zxvf 0.24.1.tar.gz rm 0.24.1.tar.gz cd p11-kit-0.24.1 ./autogen.sh --without-trust-paths make -j8 make install #NOTE gnutls-3.7.0 fails to build on the M2 MacOS) wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.16.tar.xz xz -d gnutls-3.6.16.tar.gz tar -xvf gnutls-3.6.16.tar rm gnutls-3.6.16 cd gnutls-3.6.16 ./configure make -j8 sudo make install LibSSH2 https://www.libssh2.org/ wget https://www.libssh2.org/download/libssh2-1.10.0.tar.gz tar -zxvf libssh2-1.10.0.tar.gz rm libssh2-1.10.0.tar.gz cd libssh2-1.10.0 ./configure make -j8 sudo make install Finally QEMU https://github.com/qemu/qemu git clone https://github.com/qemu/qemu cd qemu ./configure make -j8 git config --global --add safe.directory /Users/user/SRC/qemu/dtc git config --global --add safe.directory /Users/user/SRC/qemu/slirp git config --global --add safe.directory /Users/user/SRC/qemu/tests/fp/berkeley-testfloat-3 git config --global --add safe.directory /Users/user/SRC/qemu/ui/keycodemapdb sudo make install TELNET https://www.gnu.org/software/inetutils/ wget https://ftp.gnu.org/gnu/inetutils/inetutils-2.3.tar.gz tar -zxvf inetutils-2.3.tar.gz rm inetutils-2.3.tar.gz cd inetutils-2.3 ./configure make -j8 sudo make install