Build Information
Failed to build xgrammar, reference v0.2.8 (977873), with Swift 6.2 for Wasm on 29 Sep 2026 16:17:53 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344845-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.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1Build 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.2
Building package at path: $PWD
https://github.com/mlc-ai/xgrammar.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344845-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.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1
wasm-6.2-latest: Pulling from saguaro1/spi-images
Digest: sha256:ff44196b45f83e5a0a99a627b185f548850d9bc1242e3dee2178fb1570812fe8
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest
Building for debugging...
[0/28] Compiling logging.cc
[1/28] Compiling recursion_guard.cc
[2/28] Compiling testing.cc
[3/28] Compiling glm.cc
[4/28] Compiling minimax.cc
[5/28] Compiling kimi_k3.cc
[6/28] Compiling suffix_automata.cc
[7/28] Compiling minimax_m3.cc
[8/28] Compiling tokenizer_info.cc
[9/28] Compiling regex_converter.cc
[10/28] Compiling grammar_printer.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.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/shared_ptr.h:416:59: note: 'shared_ptr' declared here
416 | class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS 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.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/cstdio:141:9: note: 'fread' declared here
141 | 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.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/vector:388:17: note: template parameter is declared here
388 | 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:18: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
45 | std::unique_lock<std::mutex> lock(queue_mutex_);
| ~~~~~^~~~~~~~~~~
| unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/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) {
| ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/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:46:35: error: use of undeclared identifier 'lock'; did you mean 'clock'?
46 | queue_condition_.wait(lock, [this] { return shutdown_ || !task_queue_.empty(); });
| ^~~~
| clock
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/wasm32-wasip1/time.h:71:9: note: 'clock' declared here
71 | clock_t clock (void);
| ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/host/spi-builder-workspace/cpp/support/thread_pool.h:58:18: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
58 | std::unique_lock<std::mutex> lock(queue_mutex_);
| ~~~~~^~~~~~~~~~~
| unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/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) {
| ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/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.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/shared_ptr.h:416:59: note: 'shared_ptr' declared here
416 | class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS 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:12: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
90 | std::unique_lock<std::mutex> lock(queue_mutex_);
| ~~~~~^~~~~~~~~~~
| unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/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) {
| ^
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:12: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
112 | std::unique_lock<std::mutex> lock(queue_mutex_);
| ~~~~~^~~~~~~~~~~
| unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/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) {
| ^
In file included from /host/spi-builder-workspace/cpp/grammar_matcher.cc:33:
/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:12: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
129 | std::unique_lock<std::mutex> lock(queue_mutex_);
| ~~~~~^~~~~~~~~~~
| unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/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) {
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[11/28] Compiling grammar_matcher.cc
[11/28] Compiling grammar_builder.cc
[11/28] Compiling grammar_compiler.cc
[11/28] Compiling grammar_parser.cc
[11/28] Compiling json_schema_converter.cc
[11/28] Compiling grammar_functor.cc
[11/28] Compiling structural_tag.cc
[11/28] Compiling lark_converter.cc
BUILD FAILURE 6.2 wasm