Build Information
Failed to build mlx-swift-lm, reference main (fd0f13), with Swift 6.2 for Wasm on 16 Oct 2026 02:39:25 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344843-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.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.1.3
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/drewster99/mlx-swift-lm.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/drewster99/mlx-swift-lm
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at fd0f13b add TurboQuant KV cache compression (#232)
Cloned https://github.com/drewster99/mlx-swift-lm.git
Revision (git rev-parse @):
fd0f13bcab1f8af78a57f91fbf250a7dfde74c9b
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/drewster99/mlx-swift-lm.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.2
Building package at path: $PWD
https://github.com/drewster99/mlx-swift-lm.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344843-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.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1
wasm-6.2-latest: Pulling from saguaro1/spi-images
Digest: sha256:0563b842faffea9ddc6fe15fbd2051d02dff3ef29dc4b5bfe0a0910a084eee81
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest
Fetching https://github.com/ml-explore/mlx-swift
Fetching https://github.com/swiftlang/swift-syntax.git
[1/17176] Fetching mlx-swift
Fetched https://github.com/ml-explore/mlx-swift from cache (1.65s)
[1/80777] Fetching swift-syntax
Fetched https://github.com/swiftlang/swift-syntax.git from cache (6.18s)
Computing version for https://github.com/ml-explore/mlx-swift
Computed https://github.com/ml-explore/mlx-swift at 0.31.4 (0.22s)
Fetching https://github.com/apple/swift-numerics
[1/6756] Fetching swift-numerics
Fetched https://github.com/apple/swift-numerics from cache (0.71s)
Computing version for https://github.com/swiftlang/swift-syntax.git
Computed https://github.com/swiftlang/swift-syntax.git at 603.0.2 (1.73s)
Computing version for https://github.com/apple/swift-numerics
Computed https://github.com/apple/swift-numerics at 1.1.1 (0.15s)
Creating working copy for https://github.com/apple/swift-numerics
Working copy of https://github.com/apple/swift-numerics resolved at 1.1.1
Creating working copy for https://github.com/swiftlang/swift-syntax.git
Working copy of https://github.com/swiftlang/swift-syntax.git resolved at 603.0.2
Creating working copy for https://github.com/ml-explore/mlx-swift
Working copy of https://github.com/ml-explore/mlx-swift resolved at 0.31.4
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/host/spi-builder-workspace/Libraries/MLXFoundationModels/README.md
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/host/spi-builder-workspace/Libraries/MLXGuidedGeneration/README.md
Building for debugging...
[0/405] Write sources
[27/405] Compiling _SwiftSyntaxCShims PlatformMutex.c
[28/405] Compiling _NumericsShims _NumericsShims.c
[28/405] Write sources
[31/405] Compiling MLXCXGrammar shim.cc
[32/405] Compiling recursion_guard.cc
[33/405] Compiling logging.cc
[34/405] Compiling testing.cc
[35/405] Compiling MLXCXGrammar shim.cc
[36/405] Compiling config.cc
[37/405] Compiling regex_converter.cc
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/grammar_functor_wrapper.cc:16:
/host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:2244:8: error: no type named 'mutex' in namespace 'std'
2244 | std::mutex mutex_;
| ~~~~~^
/host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:2291:24: error: no member named 'mutex' in namespace 'std'
2291 | std::lock_guard<std::mutex> lock(mutex_);
| ~~~~~^
/host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:2321:24: error: no member named 'mutex' in namespace 'std'
2321 | std::lock_guard<std::mutex> lock(mutex_);
| ~~~~~^
/host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:2356:24: error: no member named 'mutex' in namespace 'std'
2356 | std::lock_guard<std::mutex> lock(mutex_);
| ~~~~~^
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/grammar_functor_wrapper.cc:16:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:6:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/xgrammar.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/compiler.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/grammar.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/object.h:10:
In file included from /root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/memory:944:
In file included from /root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/inout_ptr.h:16:
In file included from /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:28:
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/compressed_pair.h:146:12: error: static_cast from '__compressed_pair<allocator<Impl>, Impl> *' to '_Base1 *' (aka '__compressed_pair_elem<std::allocator<mlx_xgrammar::RuleLevelCache::Impl>, 0> *'), which are not related by inheritance, is not allowed
146 | return static_cast<_Base1*>(__pair);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:312:68: note: in instantiation of member function 'std::__compressed_pair<std::allocator<mlx_xgrammar::RuleLevelCache::Impl>, mlx_xgrammar::RuleLevelCache::Impl>::__get_first_base' requested here
312 | typename _CompressedPair::_Base1* __first = _CompressedPair::__get_first_base(__as_pair);
| ^
/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:308:75: note: in instantiation of member function 'std::__shared_ptr_emplace<mlx_xgrammar::RuleLevelCache::Impl, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>>::_Storage::__get_alloc' requested here
308 | _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) { ::new ((void*)__get_alloc()) _Alloc(std::move(__a)); }
| ^
/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:261:88: note: in instantiation of member function 'std::__shared_ptr_emplace<mlx_xgrammar::RuleLevelCache::Impl, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>>::_Storage::_Storage' requested here
261 | _LIBCPP_HIDE_FROM_ABI explicit __shared_ptr_emplace(_Alloc __a, _Args&&... __args) : __storage_(std::move(__a)) {
| ^
/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:843:51: note: in instantiation of function template specialization 'std::__shared_ptr_emplace<mlx_xgrammar::RuleLevelCache::Impl, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>>::__shared_ptr_emplace<unsigned long &, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>, 0>' requested here
843 | ::new ((void*)std::addressof(*__guard.__get())) _ControlBlock(__a, std::forward<_Args>(__args)...);
| ^
/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:851:15: note: in instantiation of function template specialization 'std::allocate_shared<mlx_xgrammar::RuleLevelCache::Impl, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>, unsigned long &, 0>' requested here
851 | return std::allocate_shared<_Tp>(allocator<__remove_cv_t<_Tp> >(), std::forward<_Args>(__args)...);
| ^
/host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:2353:19: note: in instantiation of function template specialization 'std::make_shared<mlx_xgrammar::RuleLevelCache::Impl, unsigned long &, 0>' requested here
2353 | : pimpl_(std::make_shared<Impl>(max_cache_memory_size)) {}
| ^
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/grammar_functor_wrapper.cc:16:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:6:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/xgrammar.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/compiler.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/grammar.h:10:
In file included from /host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/include/xgrammar/object.h:10:
In file included from /root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/memory:944:
In file included from /root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/inout_ptr.h:16:
In file included from /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:28:
/root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/WASI.sdk/include/c++/v1/__memory/compressed_pair.h:149:12: error: static_cast from '__compressed_pair<allocator<Impl>, Impl> *' to '_Base2 *' (aka '__compressed_pair_elem<mlx_xgrammar::RuleLevelCache::Impl, 1> *'), which are not related by inheritance, is not allowed
149 | return static_cast<_Base2*>(__pair);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:318:69: note: in instantiation of member function 'std::__compressed_pair<std::allocator<mlx_xgrammar::RuleLevelCache::Impl>, mlx_xgrammar::RuleLevelCache::Impl>::__get_second_base' requested here
318 | typename _CompressedPair::_Base2* __second = _CompressedPair::__get_second_base(__as_pair);
| ^
/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:269:73: note: in instantiation of member function 'std::__shared_ptr_emplace<mlx_xgrammar::RuleLevelCache::Impl, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>>::_Storage::__get_elem' requested here
269 | _LIBCPP_HIDE_FROM_ABI _Tp* __get_elem() _NOEXCEPT { return __storage_.__get_elem(); }
| ^
/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:846:26: note: in instantiation of member function 'std::__shared_ptr_emplace<mlx_xgrammar::RuleLevelCache::Impl, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>>::__get_elem' requested here
846 | (*__control_block).__get_elem(), std::addressof(*__control_block));
| ^
/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:851:15: note: in instantiation of function template specialization 'std::allocate_shared<mlx_xgrammar::RuleLevelCache::Impl, std::allocator<mlx_xgrammar::RuleLevelCache::Impl>, unsigned long &, 0>' requested here
851 | return std::allocate_shared<_Tp>(allocator<__remove_cv_t<_Tp> >(), std::forward<_Args>(__args)...);
| ^
/host/spi-builder-workspace/Libraries/MLXCXGrammar/xgrammar/cpp/grammar_functor.cc:2353:19: note: in instantiation of function template specialization 'std::make_shared<mlx_xgrammar::RuleLevelCache::Impl, unsigned long &, 0>' requested here
2353 | : pimpl_(std::make_shared<Impl>(max_cache_memory_size)) {}
| ^
6 errors generated.
[38/405] Compiling MLXCXGrammar grammar_functor_wrapper.cc
[38/405] Compiling grammar_printer.cc
[38/405] Compiling structural_tag.cc
[38/405] Compiling tokenizer_info.cc
[38/405] Compiling json_schema_converter.cc
[38/405] Compiling grammar_parser.cc
[38/405] Write swift-version-24593BA9C3E375BF.txt
[38/405] Compiling MLXCXGrammar grammar_functor_wrapper.cc
BUILD FAILURE 6.2 wasm