The Swift Package Index logo.Swift Package Index

Build Information

Failed to build xgrammar, reference main (3fe393), with Swift 6.1 for Wasm on 21 Nov 2026 00:48:47 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-54344846-0":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi 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.1
Building package at path:  $PWD
https://github.com/mlc-ai/xgrammar.git
https://github.com/mlc-ai/xgrammar.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344846-0":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:46373e069458549b0fb0727bf4d0f0bb9d8a18a2e211e19b57193bdf60e4b3d5
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
Building for debugging...
[0/30] Compiling config.cc
[1/30] Compiling glm.cc
[2/30] Compiling deepseek.cc
[3/30] Compiling tokenizer_info.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.
[4/30] Compiling gemma.cc
[4/30] Compiling suffix_automata.cc
[4/30] Compiling logging.cc
[4/30] Compiling recursion_guard.cc
[4/30] Compiling testing.cc
In file included from /host/spi-builder-workspace/cpp/json_schema_converter.cc:33:
In file included from /host/spi-builder-workspace/cpp/grammar_functor.h:17:
/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;
      |           ~~~~~^
[4/30] Compiling json_schema_converter.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:8: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  520 |   std::unique_lock<std::mutex> lock(impl.adaptive_token_mask_cache_mutex, std::defer_lock);
      |   ~~~~~^~~~~~~~~~~
      |        unique_copy
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/c++/v1/__algorithm/unique_copy.h:102:1: note: 'unique_copy' declared here
  102 | unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) {
      | ^
/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:522:5: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  522 |     lock.lock();
      |     ^~~~
      |     clock
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/wasm32-wasi/time.h:71:9: note: 'clock' declared here
   71 | clock_t clock (void);
      |         ^
/host/spi-builder-workspace/cpp/compiled_grammar.cc:522:5: warning: 'clock' is deprecated: WASI lacks process-associated clocks; to enable emulation of the `clock` function using the wall clock, which isn't sensitive to whether the program is running or suspended, compile with -D_WASI_EMULATED_PROCESS_CLOCKS and link with -lwasi-emulated-process-clocks [-Wdeprecated-declarations]
  522 |     lock.lock();
      |     ^
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/wasm32-wasi/time.h:66:16: note: 'clock' has been explicitly marked deprecated here
   66 | __attribute__((__deprecated__(
      |                ^
/host/spi-builder-workspace/cpp/compiled_grammar.cc:522:9: error: member reference base type 'clock_t ()' (aka 'long long ()') is not a structure or union
  522 |     lock.lock();
      |     ~~~~^~~~~
/host/spi-builder-workspace/cpp/compiled_grammar.cc:602:8: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  602 |   std::unique_lock<std::mutex> lock(impl.adaptive_token_mask_cache_mutex, std::defer_lock);
      |   ~~~~~^~~~~~~~~~~
      |        unique_copy
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/c++/v1/__algorithm/unique_copy.h:102:1: note: 'unique_copy' declared here
  102 | unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) {
      | ^
/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);
      |                    ~~~~~^
/host/spi-builder-workspace/cpp/compiled_grammar.cc:604:5: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  604 |     lock.lock();
      |     ^~~~
      |     clock
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/wasm32-wasi/time.h:71:9: note: 'clock' declared here
   71 | clock_t clock (void);
      |         ^
/host/spi-builder-workspace/cpp/compiled_grammar.cc:604:5: warning: 'clock' is deprecated: WASI lacks process-associated clocks; to enable emulation of the `clock` function using the wall clock, which isn't sensitive to whether the program is running or suspended, compile with -D_WASI_EMULATED_PROCESS_CLOCKS and link with -lwasi-emulated-process-clocks [-Wdeprecated-declarations]
  604 |     lock.lock();
      |     ^
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/wasm32-wasi/time.h:66:16: note: 'clock' has been explicitly marked deprecated here
   66 | __attribute__((__deprecated__(
      |                ^
/host/spi-builder-workspace/cpp/compiled_grammar.cc:604:9: error: member reference base type 'clock_t ()' (aka 'long long ()') is not a structure or union
  604 |     lock.lock();
      |     ~~~~^~~~~
[4/30] Compiling compiled_grammar.cc
[4/30] Compiling cohere.cc
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344846-0":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:46373e069458549b0fb0727bf4d0f0bb9d8a18a2e211e19b57193bdf60e4b3d5
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/26] Compiling logging.cc
[1/26] Compiling recursion_guard.cc
[2/26] Compiling regex_converter.cc
[3/26] Compiling suffix_automata.cc
[4/26] Compiling testing.cc
[5/26] Compiling grammar_printer.cc
In file included from /host/spi-builder-workspace/cpp/lark_converter.cc:29:
In file included from /host/spi-builder-workspace/cpp/grammar_functor.h:17:
/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;
      |           ~~~~~^
1 error generated.
[6/26] Compiling lark_converter.cc
[6/26] Compiling grammar_builder.cc
[6/26] Compiling grammar_functor.cc
[6/26] Compiling grammar_compiler.cc
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:26:
/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;
      |           ~~~~~^
[6/26] Compiling grammar_matcher.cc
[6/26] Compiling grammar_parser.cc
In file included from /host/spi-builder-workspace/cpp/structural_tag.cc:20:
In file included from /host/spi-builder-workspace/cpp/grammar_functor.h:17:
/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;
      |           ~~~~~^
[6/26] Compiling structural_tag.cc
In file included from /host/spi-builder-workspace/cpp/json_schema_converter.cc:33:
In file included from /host/spi-builder-workspace/cpp/grammar_functor.h:17:
/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;
      |           ~~~~~^
[6/26] Compiling json_schema_converter.cc
BUILD FAILURE 6.1 wasm