fix(deps): use system zlib for Assimp on macOS/Linux#11051
Open
BenJule wants to merge 1 commit into
Open
Conversation
Assimp's bundled zlib (contrib/zlib) uses K&R-style function declarations
(e.g. 'int ZEXPORT compress2(dest, destLen, ...)') and an fdopen() macro
that no longer parse against the macOS 15+/26 SDK, breaking the dependency
build on Mac ('Build All (macos-15, arm64) / Build Deps'):
contrib/zlib/CMakeFiles/zlibstatic.dir/zutil.c.o
error: expected ')'
Set ASSIMP_BUILD_ZLIB=OFF on macOS and Linux so Assimp links the system
zlib (always available there); keep the bundled copy on Windows.
This was referenced Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The dependency build fails on macOS while building Assimp — see the failing run
Build All (macos-15, arm64) / Build Deps:Assimp bundles an old copy of zlib (
contrib/zlib) that still uses K&R-style function declarations and anfdopen()macro. These no longer parse against the macOS 15+/26 SDK headers, soASSIMP_BUILD_ZLIB=ONbreaks the macOS dependency build.Fix
Build Assimp against the system zlib on macOS and Linux (always available there), keeping the bundled copy only on Windows. One-file change, no behavior change on Windows.