Libraries

Up to date list of libraries, built from source, to support toolkit build. This list will be updated with new libraries based on toolkit needs.

❗️ For a successful build, libraries must be built in the documented order

⚠️ macOS may ship with serveral pre-installed libraries, however, they are system specific and should not be tampered with to avoid disrupting normal system functions.


libpcap

The Tcpdump Group GitHub: libpcap

Step 1: Clone libpcap repository

mkdir libpcap && cd libpcap
git clone https://github.com/the-tcpdump-group/libpcap.git .

Step 2: Configure and Install libpcap

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 3: Verify libpcap library files are available

ls -latr /usr/local/lib

libyaml

PyYAML Project - LibYAML Wiki

Step 1: Download tarball from PyYAML Project’s LibYAML Wiki

Download will be available in $HOME/Downloads directory. Move tarball to appropriate working directory.

Step 2: Extract libyaml tarball

tar -xvf yaml-0.2.5.tar && rm yaml-0.2.5.tar
cd yaml-0.2.5

Step 3: Configure and Install libyaml

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 4: Verify libyaml library files are available

ls -latr /usr/local/lib

openssl

OpenSSL GitHub: openssl

Step 1: Clone openssl repository

mkdir openssl && cd openssl
git clone https://github.com/openssl/openssl.git .

Compatible architecture and configuration settings need to be provided in the Configure step to build a working openssl.

Step 2: List available architecture options for openssl

./Configure LIST

From the list, there is a compatible architecture for macOS on Apple Silicon (M Chips):

darwin64-arm64-cc

Step 4: Configure and Install openssl

❗️ The OpenSSL Wiki provides the recommended configuration options for a stable build. Linked below:

OpenSSL Wiki: OSX Compilation and Installation

./Configure darwin64-arm64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl
make depend
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/.

Configuration files for openssl are stored in /usr/local/ssl. By not defining the prefix option, the openssl binary is stored in the default location setting: /usr/local/bin. Additionally, libraries are stored in: /usr/local/lib.

Step 5: Verify openssl binary and library files are available

ls -latr /usr/local/bin
ls -latr /usr/local/lib

libffi

libffi GitHub: libffi

libffi Releases

Step 1: Download the latest, stable tarball

Download will be available in $HOME/Downloads. Move the tarball to appropriate working directory.

Step 2: Extract libffi tarball

tar -xvf libffi-3.5.1.tar && rm libffi-3.5.1.tar
cd libffi-3.5.1

Step 3: Configure and install libffi

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 4: Verify libffi library files are available

ls -latr /usr/local/lib

zlib

Mark Adler GitHub: zlib

zlib Releases

Step 1: Download the latest, stable tarball

Download will be available in $HOME/Downloads. Move tarball to appropriate working directory.

Step 2: Extract tarball

tar -xvf zlib-1.3.1.tar && rm zlib-1.3.1.tar
cd zlib-1.3.1

Step 3: Configure and install zlib

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 4: Verify zlib library files are available

ls -latr /usr/local/lib

readline

Savannah GNU Readline Library

Step 1: Clone readline git repository

mkdir readline && cd readline
git clone https://git.savannah.gnu.org/git/readline.git .

Step 2: Configure and install readline

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 3: Verify readline library files are available

ls -latr /usr/local/lib

libxml2

GNOME GitHub: libxml2

libxml2 Official Releases

Step 1: Download the latest, stable tarball

Download will be available in $HOME/Downloads directory. Move to appropriate working directory.

Step 2: Extract tarball

tar -xvf libxml2-2.14.4.tar.xz && rm libxml2-2.14.4.tar.xz
cd libxml2-2.14.4

Step 3: Configure and install libxml2

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 4: Verify libxml2 library files are available

ls -latr /usr/local/lib

pcre2

PCRE2Project GitHub: pcre2

PCRE2 Releases

Step 1: Download the latest, stable tarball

Download will be available in $HOME/Downloads directory. Move to appropriate working directory.

Step 2: Extract tarball

tar -xvf pcre2-10.45.tar && rm pcre2-10.45.tar
cd pcre2-10.45

Step 3: Configure and install libpcre2

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 4: Verify libpcre2 library files are available

ls -latr /usr/local/lib

pkg-config

FreeDesktop pkg-config Wiki

pkg-config Official Releases

Step 1: Download the latest, stable tarball

Download will be available in $HOME/Downloads directory. Move to appropriate working directory.

Step 2: Extract tarball

tar -xvf pkg-config-0.29.2.tar && rm pkg-config-0.29.2.tar
cd pkg-config-0.29.2

Step 3: Resolve pkg-config internal glib C code Errors for Clang 17

❗️ pkg-config requires glib to exist for installation. The pkg-config tarball comes with its own internal glib that can be used during buildtime.

πŸ“ Clang 17 compiles the C files. However, it has stricter pointer/integer safety rules that will cause the internal glib build for pkg-config to fail. There are several changes that have to be made to satisfy the Clang 17 compiler. These are listed in the table below:

Directory Location: pkg-config-0.29.2/glib/glib

File Line # Patch
gatomic.c 392 return (gssize) __sync_fetch_and_add((volatile guintptr *) atomic, (guintptr) val);
gatomic.c 416 return (gsize) __sync_fetch_and_and((volatile guintptr *) atomic, (guintptr) val);
gatomic.c 440 return (gsize) __sync_fetch_and_or((volatile guintptr *) atomic, (guintptr) val);
gatomic.c 464 return (gsize) __sync_fetch_and_xor((volatile guintptr *) atomic, (guintptr) val);
gdataset.c 1191 __sync_fetch_and_or((volatile guintptr *)datalist, (guintptr)flags);
gdataset.c 1214 __sync_fetch_and_and((volatile guintptr *)datalist, (guintptr)(~flags));

🧠 Patching Summary

Step 4: Configure and install pkg-config --with-internal-glib

./configure --with-internal-glib
make
sudo make install

πŸ“ pkg-config binary will be in /usr/local/bin. sudo permissions required to install in /usr/local/bin.

Step 5: Verify pkg-config location and version

which -a pkg-config
pkg-config --version

Step 6: Create PKG_CONFIG_PATH environment variable in $HOME/.zshrc

πŸ“ Some libraries and tools need pkg-config to find and link libraries. Environment variables are a simple way for tools to access the pkg-config paths to find .pc files.

Add the following lines to $HOME/.zshrc

# Created for 'pkg-config'
  export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/Library/Frameworks/Python.framework/Versions/3.13/lib/pkgconfig"

glib

GNOME GitHub: GLib

glib Official Releases

Step 1: Download the latest, stable tarball

Download will be available in $HOME/Downloads directory. Move to appropriate working directory.

Step 2: Extract tarball

tar -xvf glib-2.85.1.tar.xz && rm glib-2.85.1.tar.xz
cd glib-2.85.1

Step 3: Install meson and ninja

πŸ“ glib requires a different build chain to compile.

pip3 install meson ninja

πŸ“ pip3 is used to install meson and ninja system wide.

Step 4: Configure and install glib

meson setup _build
meson compile -C _build
sudo meson install -C _build

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 5: Verify glib library files are available

ls -latr /usr/local/lib

Step 6: Reinstall pkg-confg

❗️ Now that glib is available on its own, it is best practice to reconfigure and rebuild pkg-config with no flags

From the pkg-config-0.29.2 working directory run the following:

make clean && make distclean
./configure
make
sudo make install

libxslt

GNOME GitHub: libxslt

libxslt Official Releases

❗️ python3 and pkg-config are required prior to building libxslt

Step 1: Download the latest, stable tarball

Download will be available in $HOME/Downloads directory. Move to appropriate working directory.

Step 2: Extract tarball

tar -xvf libxslt-1.1.43.tar.xz && rm libxslt-1.1.43.tar.xz
cd libxslt-1.1.43

Step 3: Configure and install libxslt

./configure
make
sudo make install

πŸ“ sudo permissions are required to install in /usr/local/lib.

Step 4: Verify libxslt library files are available

ls -latr /usr/local/lib
../