The Swift Package Index logo.Swift Package Index

Build Information

Failed to build xgrammar, reference main (3fe393), with Swift 6.3 for Wasm on 21 Nov 2026 00:44:12 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-58779149-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mlc-ai/xgrammar.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/mlc-ai/xgrammar
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 3fe3932 feat: add Muse Spark structural tag and muse_xml style (#1079)
Submodule path '3rdparty/cpptrace': checked out '6689d14c203eed390ae7bb64f56a983cfd7dff9c'
Submodule path '3rdparty/dlpack': checked out 'bbd2f4d32427e548797929af08cfe2a9cbb3cf12'
Submodule path '3rdparty/googletest': checked out 'df1544bcee0c7ce35cd5ea0b3eb8cc81855a4140'
Submodule '3rdparty/cpptrace' (https://github.com/jeremy-rifkin/cpptrace.git) registered for path '3rdparty/cpptrace'
Submodule '3rdparty/dlpack' (https://github.com/dmlc/dlpack.git) registered for path '3rdparty/dlpack'
Submodule '3rdparty/googletest' (https://github.com/google/googletest.git) registered for path '3rdparty/googletest'
Cloning into '/host/spi-builder-workspace/3rdparty/cpptrace'...
Cloning into '/host/spi-builder-workspace/3rdparty/dlpack'...
Cloning into '/host/spi-builder-workspace/3rdparty/googletest'...
Cloned https://github.com/mlc-ai/xgrammar.git
Revision (git rev-parse @):
3fe39321a6f24c90c2cc4fa4519b87e22367bcfc
SUCCESS checkout https://github.com/mlc-ai/xgrammar.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.3
Building package at path:  $PWD
https://github.com/mlc-ai/xgrammar.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-58779149-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from saguaro1/spi-images
Digest: sha256:d3f568d85e0aea9035607cd00c00b956e2abec4c377680cdb286c930e5f653a0
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest
Building for debugging...
[0/30] Compiling config.cc
[1/30] Compiling muse.cc
[2/30] Compiling deepseek.cc
[3/30] Compiling minimax_m3.cc
[4/30] Compiling grammar_builder.cc
In file included from /host/spi-builder-workspace/cpp/converter_ext/gemma.cc:12:
In file included from /host/spi-builder-workspace/cpp/converter_ext/../grammar_functor.h:17:
/host/spi-builder-workspace/cpp/converter_ext/../compiled_grammar_impl.h:157:16: error: no type named 'mutex' in namespace 'std'
  157 |   mutable std::mutex adaptive_token_mask_cache_mutex;
      |           ~~~~~^
1 error generated.
[5/30] Compiling gemma.cc
[5/30] Compiling recursion_guard.cc
[5/30] Compiling suffix_automata.cc
[5/30] Compiling testing.cc
[5/30] Compiling logging.cc
[5/30] Compiling tokenizer_info.cc
[5/30] Compiling cohere.cc
In file included from /host/spi-builder-workspace/cpp/compiled_grammar.cc:16:
/host/spi-builder-workspace/cpp/compiled_grammar_impl.h:157:16: error: no type named 'mutex' in namespace 'std'
  157 |   mutable std::mutex adaptive_token_mask_cache_mutex;
      |           ~~~~~^
/host/spi-builder-workspace/cpp/compiled_grammar.cc:520:25: error: no member named 'mutex' in namespace 'std'
  520 |   std::unique_lock<std::mutex> lock(impl.adaptive_token_mask_cache_mutex, std::defer_lock);
      |                         ^~~~~
/host/spi-builder-workspace/cpp/compiled_grammar.cc:602:25: error: no member named 'mutex' in namespace 'std'
  602 |   std::unique_lock<std::mutex> lock(impl.adaptive_token_mask_cache_mutex, std::defer_lock);
      |                         ^~~~~
[5/30] Compiling compiled_grammar.cc
BUILD FAILURE 6.3 wasm