giflib is a graphics library (GIF), so it seems out of place at the top of the build order before build tools like pkg-config, yasm, and nasm. I checked the latest v1.5.9.
When giflib is removed from the script, pkg-config 0.29.2 fails to configure on macOS 26.4 (Tahoe) on Apple M1 with:
configure: error: cannot compute sizeof (size_t)
configure: error: ./configure failed for glib
Claude Code explanation:
Root cause: The script only creates the workspace/ directory at startup (mkdir -p "$WORKSPACE"), but not its subdirectories. giflib happens to be the first package installed, and its make install creates workspace/lib/ and workspace/include/. Without giflib, these directories do not exist when pkg-config's bundled glib runs its autoconf tests.
On macOS 26, the Apple linker (ld) is stricter — passing -L$WORKSPACE/lib (from LDFLAGS) where the path does not yet exist causes the glib configure test to fail. autoconf then falls back to cross-compile mode, where the old AC_CHECK_SIZEOF macro cannot compute sizeof(size_t).
Suggested fix: Create the workspace subdirectories explicitly at startup:
mkdir -p "$WORKSPACE" "$WORKSPACE/lib" "$WORKSPACE/include" "$WORKSPACE/bin"
This makes the build order independent of giflib and fixes the issue on macOS 26.
giflib is a graphics library (GIF), so it seems out of place at the top of the build order before build tools like pkg-config, yasm, and nasm. I checked the latest v1.5.9.
When giflib is removed from the script, pkg-config 0.29.2 fails to configure on macOS 26.4 (Tahoe) on Apple M1 with:
Claude Code explanation:
Root cause: The script only creates the
workspace/directory at startup (mkdir -p "$WORKSPACE"), but not its subdirectories. giflib happens to be the first package installed, and itsmake installcreatesworkspace/lib/andworkspace/include/. Without giflib, these directories do not exist when pkg-config's bundled glib runs its autoconf tests.On macOS 26, the Apple linker (
ld) is stricter — passing-L$WORKSPACE/lib(fromLDFLAGS) where the path does not yet exist causes the glib configure test to fail. autoconf then falls back to cross-compile mode, where the oldAC_CHECK_SIZEOFmacro cannot computesizeof(size_t).Suggested fix: Create the workspace subdirectories explicitly at startup:
This makes the build order independent of giflib and fixes the issue on macOS 26.