Skip to content

Building from Source

podkit ships prebuilt native binaries for macOS (Intel and Apple Silicon) and Linux (x64). If prebuilt binaries are not available for your platform, podkit will attempt to build the native module from source during installation. This requires libgpod development headers.

macOS

libgpod is not available in Homebrew, so it must be built from source. The podkit repo includes a build script:

Terminal window
git clone https://github.com/jvgomg/podkit.git
cd podkit/tools/libgpod-macos
./build.sh

This will:

  1. Install Homebrew dependencies (libplist, gdk-pixbuf, autoconf, etc.)
  2. Download libgpod 0.8.3 source and required patches
  3. Build and install to ~/.local

Add to your shell profile (~/.zshrc or ~/.bashrc):

Terminal window
export PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH"
export DYLD_LIBRARY_PATH="$HOME/.local/lib:$DYLD_LIBRARY_PATH"

Reload your shell, then install podkit:

Terminal window
source ~/.zshrc # or ~/.bashrc
npm install -g podkit

Ubuntu / Debian

Terminal window
sudo apt install -y libgpod-dev
npm install -g podkit

Fedora

Terminal window
sudo dnf install -y libgpod-devel
npm install -g podkit

Arch Linux

Terminal window
sudo pacman -S libgpod
npm install -g podkit

Verifying the Build

Terminal window
podkit --version
podkit device info # Should not show native binding errors

Troubleshooting

libgpod build fails (macOS)

Ensure Homebrew packages are properly linked:

Terminal window
brew link --force libplist gdk-pixbuf gettext

pkg-config can’t find libgpod

Verify your PKG_CONFIG_PATH includes ~/.local/lib/pkgconfig:

Terminal window
echo $PKG_CONFIG_PATH
pkg-config --modversion libgpod-1.0
# Expected: 0.8.3

Runtime: library not found

Ensure DYLD_LIBRARY_PATH is set:

/Users/yourname/.local/lib
echo $DYLD_LIBRARY_PATH

See Also