fix(deps): disable Assimp bundled zlib on macOS to fix SDK 15+ build failure#10849
Open
BenJule wants to merge 3 commits into
Open
fix(deps): disable Assimp bundled zlib on macOS to fix SDK 15+ build failure#10849BenJule wants to merge 3 commits into
BenJule wants to merge 3 commits into
Conversation
This was referenced May 21, 2026
34ea071 to
695a376
Compare
The upstream build_all.yml only listed 'main' as a push trigger. BenJule/BambuStudio uses 'master' as its default branch, so CI never fired on fork-local pushes. Adding 'master' alongside 'main' makes the full multi-platform build run when master is updated.
… 15+ Assimp 5.4.3's bundled zlib defines `#define fdopen(fd,mode) NULL` in contrib/zlib/zutil.h:147. On macOS 15+ the SDK's `_stdio.h` uses `__DARWIN_ALIAS(fdopen)`, which expands through that macro and causes a C preprocessor parse error, breaking the "Build Deps" CI step on both arm64 and x86_64. Fix: only build the bundled zlib on Windows (where it is needed); on macOS and Linux use the system-provided zlib instead. Fixes the CI failures in bambulab#10767. Co-Authored-By: Abdel Gomez-Perez <nabdel07@icloud.com>
695a376 to
1f1f814
Compare
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
Assimp 5.4.3 ships a bundled zlib that defines `#define fdopen(fd,mode) NULL` in `contrib/zlib/zutil.h:147`. On macOS 15+ the SDK's `_stdio.h` declares `fdopen` through `__DARWIN_ALIAS(fdopen)`, which expands through the `NULL` definition and produces a C preprocessor parse error:
```
dep_Assimp/contrib/zlib/zutil.h:147:18: error: expected unqualified-id
#define fdopen(fd,mode) NULL
^
/Applications/Xcode.app/.../MacOSX15.5.sdk/usr/include/_stdio.h:318:47: note: expanded from macro '__DARWIN_ALIAS'
FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(..., __DARWIN_ALIAS(fdopen));
```
This breaks the Build Deps step on both `macos-15 arm64` and `macos-15 x86_64` for any PR that triggers macOS CI.
Fix
Only build the bundled zlib on Windows (where a system zlib is not guaranteed). On macOS and Linux the system zlib is always available, so `-DASSIMP_BUILD_ZLIB=OFF` is safe.
Test plan
Closes #10851.