The Swift Package Index logo.Swift Package Index

Build Information

Failed to build xgrammar, reference v0.2.8 (977873), with Swift 6.3 for Wasm on 29 Sep 2026 20:20:00 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-53886770-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.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 5.1.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mlc-ai/xgrammar.git
Reference: v0.2.8
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
 * tag               v0.2.8     -> FETCH_HEAD
HEAD is now at 9778737 feat: support MiMo-V2.6 Pro and Flash structural tags (#916)
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 @):
97787376faee5ed8466cfad57c99855e4ce2f6aa
SUCCESS checkout https://github.com/mlc-ai/xgrammar.git at v0.2.8
========================================
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-53886770-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.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:253aad7f5b11d25cf9eaef34120b94cd8a325782929c57fb304a7711494a3f9a
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest
Building for debugging...
[0/28] Compiling recursion_guard.cc
[1/28] Compiling logging.cc
[2/28] Compiling testing.cc
[3/28] Compiling suffix_automata.cc
[4/28] Compiling regex_converter.cc
[5/28] Compiling deepseek.cc
[6/28] Compiling cohere.cc
[7/28] Compiling tokenizer_info.cc
[8/28] Compiling grammar_printer.cc
[9/28] Compiling lark_converter.cc
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/host/spi-builder-workspace/cpp/support/thread_pool.h:79:46: error: no template named 'shared_future' in namespace 'std'; did you mean 'shared_ptr'?
   79 |   auto Submit(F&& f, Args&&... args) -> std::shared_future<std::invoke_result_t<F, Args...>> {
      |                                         ~~~~~^~~~~~~~~~~~~
      |                                              shared_ptr
/root/.swiftpm/swift-sdks/swift-6.3.2-RELEASE_wasm.artifactbundle/swift-6.3.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/shared_ptr.h:307:38: note: 'shared_ptr' declared here
  307 | class _LIBCPP_SHARED_PTR_TRIVIAL_ABI shared_ptr {
      |                                      ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/host/spi-builder-workspace/cpp/support/thread_pool.h:194:20: error: no member named 'thread' in namespace 'std'; did you mean 'fread'?
  194 |   std::vector<std::thread> workers_;
      |                    ^~~~~~
      |                    fread
/root/.swiftpm/swift-sdks/swift-6.3.2-RELEASE_wasm.artifactbundle/swift-6.3.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/cstdio:144:9: note: 'fread' declared here
  144 | using ::fread _LIBCPP_USING_IF_EXISTS;
      |         ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/host/spi-builder-workspace/cpp/support/thread_pool.h:194:15: error: template argument for template type parameter must be a type
  194 |   std::vector<std::thread> workers_;
      |               ^~~~~~~~~~~
/root/.swiftpm/swift-sdks/swift-6.3.2-RELEASE_wasm.artifactbundle/swift-6.3.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__vector/vector.h:87:17: note: template parameter is declared here
   87 | template <class _Tp, class _Allocator /* = allocator<_Tp> */>
      |                 ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/host/spi-builder-workspace/cpp/support/thread_pool.h:198:8: error: no type named 'mutex' in namespace 'std'
  198 |   std::mutex queue_mutex_;
      |   ~~~~~^
/host/spi-builder-workspace/cpp/support/thread_pool.h:200:8: error: no type named 'condition_variable' in namespace 'std'
  200 |   std::condition_variable queue_condition_;
      |   ~~~~~^
/host/spi-builder-workspace/cpp/support/thread_pool.h:202:8: error: no type named 'condition_variable' in namespace 'std'
  202 |   std::condition_variable tasks_done_condition_;
      |   ~~~~~^
/host/spi-builder-workspace/cpp/support/thread_pool.h:37:40: error: no member named 'thread' in namespace 'std'
   37 |   ThreadPool(size_t num_threads = std::thread::hardware_concurrency()) {
      |                                   ~~~~~^
/host/spi-builder-workspace/cpp/support/thread_pool.h:45:35: error: no member named 'mutex' in namespace 'std'
   45 |             std::unique_lock<std::mutex> lock(queue_mutex_);
      |                                   ^~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:58:35: error: no member named 'mutex' in namespace 'std'
   58 |             std::unique_lock<std::mutex> lock(queue_mutex_);
      |                                   ^~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:83:39: error: no member named 'packaged_task' in namespace 'std'
   83 |     auto task = std::make_shared<std::packaged_task<return_type()>>(
      |                                       ^~~~~~~~~~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:87:10: error: no template named 'shared_future' in namespace 'std'; did you mean 'shared_ptr'?
   87 |     std::shared_future<return_type> res = task->get_future().share();
      |     ~~~~~^~~~~~~~~~~~~
      |          shared_ptr
/root/.swiftpm/swift-sdks/swift-6.3.2-RELEASE_wasm.artifactbundle/swift-6.3.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/shared_ptr.h:307:38: note: 'shared_ptr' declared here
  307 | class _LIBCPP_SHARED_PTR_TRIVIAL_ABI shared_ptr {
      |                                      ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/host/spi-builder-workspace/cpp/support/thread_pool.h:90:29: error: no member named 'mutex' in namespace 'std'
   90 |       std::unique_lock<std::mutex> lock(queue_mutex_);
      |                             ^~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:112:29: error: no member named 'mutex' in namespace 'std'
  112 |       std::unique_lock<std::mutex> lock(queue_mutex_);
      |                             ^~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:129:29: error: no member named 'mutex' in namespace 'std'
  129 |       std::unique_lock<std::mutex> lock(queue_mutex_);
      |                             ^~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:163:29: error: no member named 'mutex' in namespace 'std'
  163 |       std::unique_lock<std::mutex> lock(queue_mutex_);
      |                             ^~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:169:15: error: no type named 'thread' in namespace 'std'
  169 |     for (std::thread& worker : workers_) {
      |          ~~~~~^
/host/spi-builder-workspace/cpp/support/thread_pool.h:177:29: error: no member named 'mutex' in namespace 'std'
  177 |       std::unique_lock<std::mutex> lock(queue_mutex_);
      |                             ^~~~~
/host/spi-builder-workspace/cpp/support/thread_pool.h:186:27: error: no member named 'mutex' in namespace 'std'
  186 |     std::unique_lock<std::mutex> lock(queue_mutex_);
      |                           ^~~~~
/host/spi-builder-workspace/cpp/grammar_matcher.cc:785:53: error: no member named 'thread' in namespace 'std'
  785 |         if (num_threads > static_cast<int32_t>(std::thread::hardware_concurrency())) {
      |                                                ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[10/28] Compiling grammar_matcher.cc
[10/28] Compiling grammar.cc
[10/28] Compiling grammar_builder.cc
[10/28] Compiling grammar_functor.cc
[10/28] Compiling grammar_compiler.cc
[10/28] Compiling grammar_parser.cc
[10/28] Compiling structural_tag.cc
[10/28] Compiling json_schema_converter.cc
BUILD FAILURE 6.3 wasm