The Swift Package Index logo.Swift Package Index

Build Information

Failed to build mlx-swift-lm, reference main (a2e01f), with Swift 6.2 for Wasm on 9 May 2026 01:39:12 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/DePasqualeOrg/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/DePasqualeOrg/mlx-swift-lm
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at a2e01f7 Fix model implementations
Cloned https://github.com/DePasqualeOrg/mlx-swift-lm.git
Revision (git rev-parse @):
a2e01f72b0581cbac1e1d9effb4f3aead5123619
SUCCESS checkout https://github.com/DePasqualeOrg/mlx-swift-lm.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.2
Building package at path:  $PWD
https://github.com/DePasqualeOrg/mlx-swift-lm.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1
wasm-6.2-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:2a8b2d9e022a9894c61e0736af7cdaa1ee64c002dbb133a55c0d7e8980b3ad16
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.2-latest
Fetching https://github.com/ml-explore/mlx-swift
[1/14250] Fetching mlx-swift
Fetched https://github.com/ml-explore/mlx-swift from cache (1.75s)
Computing version for https://github.com/ml-explore/mlx-swift
Computed https://github.com/ml-explore/mlx-swift at 0.31.3 (2.26s)
Fetching https://github.com/apple/swift-numerics
[1/6416] Fetching swift-numerics
Fetched https://github.com/apple/swift-numerics from cache (1.29s)
Computing version for https://github.com/apple/swift-numerics
Computed https://github.com/apple/swift-numerics at 1.1.1 (1.66s)
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.3
Creating working copy for https://github.com/apple/swift-numerics
Working copy of https://github.com/apple/swift-numerics resolved at 1.1.1
Building for debugging...
[0/162] Write sources
[9/162] Compiling format.cc
[10/162] Compiling _NumericsShims _NumericsShims.c
[10/162] Write sources
[14/162] Compiling version.cpp
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/device.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:40:15: error: no template named 'future' in namespace 'std'
   40 |       -> std::future<typename std::invoke_result_t<F, Args...>>;
      |          ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:48:20: error: no member named 'thread' in namespace 'std'
   48 |   std::vector<std::thread> workers;
      |               ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:50:8: error: no type named 'mutex' in namespace 'std'
   50 |   std::mutex queue_mutex;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:51:8: error: no type named 'condition_variable' in namespace 'std'
   51 |   std::condition_variable condition;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:61:13: error: no template named 'future' in namespace 'std'
   61 |     -> std::future<typename std::invoke_result_t<F, Args...>> {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:64:37: error: no member named 'packaged_task' in namespace 'std'
   64 |   auto task = std::make_shared<std::packaged_task<return_type()>>(
      |                                ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:8: error: no member named 'future' in namespace 'std'
   67 |   std::future<return_type> res = task->get_future();
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:15: error: unexpected type name 'return_type': expected expression
   67 |   std::future<return_type> res = task->get_future();
      |               ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:28: error: use of undeclared identifier 'res'
   67 |   std::future<return_type> res = task->get_future();
      |                            ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   69 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/device.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:27: error: no member named 'mutex' in namespace 'std'
   69 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:79:10: error: use of undeclared identifier 'res'
   79 |   return res;
      |          ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  100 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/device.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:27: error: no member named 'mutex' in namespace 'std'
  100 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:104:13: error: no type named 'thread' in namespace 'std'
  104 |   for (std::thread& worker : workers) {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:16: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  120 |           std::unique_lock<std::mutex> lock(this->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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/device.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:33: error: no member named 'mutex' in namespace 'std'
  120 |           std::unique_lock<std::mutex> lock(this->queue_mutex);
      |                            ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:122:15: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  122 |               lock, [this] { return this->stop || !this->tasks.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);
      |         ^
18 errors generated.
[15/162] Compiling device.cpp
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/compile.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:40:15: error: no template named 'future' in namespace 'std'
   40 |       -> std::future<typename std::invoke_result_t<F, Args...>>;
      |          ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:48:20: error: no member named 'thread' in namespace 'std'
   48 |   std::vector<std::thread> workers;
      |               ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:50:8: error: no type named 'mutex' in namespace 'std'
   50 |   std::mutex queue_mutex;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:51:8: error: no type named 'condition_variable' in namespace 'std'
   51 |   std::condition_variable condition;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:61:13: error: no template named 'future' in namespace 'std'
   61 |     -> std::future<typename std::invoke_result_t<F, Args...>> {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:64:37: error: no member named 'packaged_task' in namespace 'std'
   64 |   auto task = std::make_shared<std::packaged_task<return_type()>>(
      |                                ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:8: error: no member named 'future' in namespace 'std'
   67 |   std::future<return_type> res = task->get_future();
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:15: error: unexpected type name 'return_type': expected expression
   67 |   std::future<return_type> res = task->get_future();
      |               ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:28: error: use of undeclared identifier 'res'
   67 |   std::future<return_type> res = task->get_future();
      |                            ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   69 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/compile.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:27: error: no member named 'mutex' in namespace 'std'
   69 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:79:10: error: use of undeclared identifier 'res'
   79 |   return res;
      |          ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  100 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/compile.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:27: error: no member named 'mutex' in namespace 'std'
  100 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:104:13: error: no type named 'thread' in namespace 'std'
  104 |   for (std::thread& worker : workers) {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:16: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  120 |           std::unique_lock<std::mutex> lock(this->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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/compile.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:33: error: no member named 'mutex' in namespace 'std'
  120 |           std::unique_lock<std::mutex> lock(this->queue_mutex);
      |                            ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:122:15: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  122 |               lock, [this] { return this->stop || !this->tasks.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);
      |         ^
[15/162] Compiling compile.cpp
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/closure.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:40:15: error: no template named 'future' in namespace 'std'
   40 |       -> std::future<typename std::invoke_result_t<F, Args...>>;
      |          ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:48:20: error: no member named 'thread' in namespace 'std'
   48 |   std::vector<std::thread> workers;
      |               ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:50:8: error: no type named 'mutex' in namespace 'std'
   50 |   std::mutex queue_mutex;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:51:8: error: no type named 'condition_variable' in namespace 'std'
   51 |   std::condition_variable condition;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:61:13: error: no template named 'future' in namespace 'std'
   61 |     -> std::future<typename std::invoke_result_t<F, Args...>> {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:64:37: error: no member named 'packaged_task' in namespace 'std'
   64 |   auto task = std::make_shared<std::packaged_task<return_type()>>(
      |                                ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:8: error: no member named 'future' in namespace 'std'
   67 |   std::future<return_type> res = task->get_future();
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:15: error: unexpected type name 'return_type': expected expression
   67 |   std::future<return_type> res = task->get_future();
      |               ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:28: error: use of undeclared identifier 'res'
   67 |   std::future<return_type> res = task->get_future();
      |                            ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   69 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/closure.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:27: error: no member named 'mutex' in namespace 'std'
   69 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:79:10: error: use of undeclared identifier 'res'
   79 |   return res;
      |          ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  100 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/closure.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:27: error: no member named 'mutex' in namespace 'std'
  100 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:104:13: error: no type named 'thread' in namespace 'std'
  104 |   for (std::thread& worker : workers) {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:16: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  120 |           std::unique_lock<std::mutex> lock(this->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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/closure.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:33: error: no member named 'mutex' in namespace 'std'
  120 |           std::unique_lock<std::mutex> lock(this->queue_mutex);
      |                            ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:122:15: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  122 |               lock, [this] { return this->stop || !this->tasks.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);
      |         ^
[15/162] Compiling closure.cpp
[15/162] Compiling utils.cpp
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/cuda.cpp:9:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:40:15: error: no template named 'future' in namespace 'std'
   40 |       -> std::future<typename std::invoke_result_t<F, Args...>>;
      |          ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:48:20: error: no member named 'thread' in namespace 'std'
   48 |   std::vector<std::thread> workers;
      |               ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:50:8: error: no type named 'mutex' in namespace 'std'
   50 |   std::mutex queue_mutex;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:51:8: error: no type named 'condition_variable' in namespace 'std'
   51 |   std::condition_variable condition;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:61:13: error: no template named 'future' in namespace 'std'
   61 |     -> std::future<typename std::invoke_result_t<F, Args...>> {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:64:37: error: no member named 'packaged_task' in namespace 'std'
   64 |   auto task = std::make_shared<std::packaged_task<return_type()>>(
      |                                ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:8: error: no member named 'future' in namespace 'std'
   67 |   std::future<return_type> res = task->get_future();
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:15: error: unexpected type name 'return_type': expected expression
   67 |   std::future<return_type> res = task->get_future();
      |               ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:28: error: use of undeclared identifier 'res'
   67 |   std::future<return_type> res = task->get_future();
      |                            ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   69 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/cuda.cpp:9:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:27: error: no member named 'mutex' in namespace 'std'
   69 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:79:10: error: use of undeclared identifier 'res'
   79 |   return res;
      |          ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  100 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/cuda.cpp:9:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:27: error: no member named 'mutex' in namespace 'std'
  100 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:104:13: error: no type named 'thread' in namespace 'std'
  104 |   for (std::thread& worker : workers) {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:16: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  120 |           std::unique_lock<std::mutex> lock(this->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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/cuda.cpp:9:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:33: error: no member named 'mutex' in namespace 'std'
  120 |           std::unique_lock<std::mutex> lock(this->queue_mutex);
      |                            ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:122:15: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  122 |               lock, [this] { return this->stop || !this->tasks.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);
      |         ^
[15/162] Compiling cuda.cpp
[15/162] Write swift-version-24593BA9C3E375BF.txt
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/array.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:40:15: error: no template named 'future' in namespace 'std'
   40 |       -> std::future<typename std::invoke_result_t<F, Args...>>;
      |          ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:48:20: error: no member named 'thread' in namespace 'std'
   48 |   std::vector<std::thread> workers;
      |               ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:50:8: error: no type named 'mutex' in namespace 'std'
   50 |   std::mutex queue_mutex;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:51:8: error: no type named 'condition_variable' in namespace 'std'
   51 |   std::condition_variable condition;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:61:13: error: no template named 'future' in namespace 'std'
   61 |     -> std::future<typename std::invoke_result_t<F, Args...>> {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:64:37: error: no member named 'packaged_task' in namespace 'std'
   64 |   auto task = std::make_shared<std::packaged_task<return_type()>>(
      |                                ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:8: error: no member named 'future' in namespace 'std'
   67 |   std::future<return_type> res = task->get_future();
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:15: error: unexpected type name 'return_type': expected expression
   67 |   std::future<return_type> res = task->get_future();
      |               ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:28: error: use of undeclared identifier 'res'
   67 |   std::future<return_type> res = task->get_future();
      |                            ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   69 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/array.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:27: error: no member named 'mutex' in namespace 'std'
   69 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:79:10: error: use of undeclared identifier 'res'
   79 |   return res;
      |          ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  100 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/array.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:27: error: no member named 'mutex' in namespace 'std'
  100 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:104:13: error: no type named 'thread' in namespace 'std'
  104 |   for (std::thread& worker : workers) {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:16: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  120 |           std::unique_lock<std::mutex> lock(this->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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/array.cpp:7:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:33: error: no member named 'mutex' in namespace 'std'
  120 |           std::unique_lock<std::mutex> lock(this->queue_mutex);
      |                            ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:122:15: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  122 |               lock, [this] { return this->stop || !this->tasks.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);
      |         ^
[15/162] Compiling array.cpp
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/random.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:40:15: error: no template named 'future' in namespace 'std'
   40 |       -> std::future<typename std::invoke_result_t<F, Args...>>;
      |          ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:48:20: error: no member named 'thread' in namespace 'std'
   48 |   std::vector<std::thread> workers;
      |               ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:50:8: error: no type named 'mutex' in namespace 'std'
   50 |   std::mutex queue_mutex;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:51:8: error: no type named 'condition_variable' in namespace 'std'
   51 |   std::condition_variable condition;
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:61:13: error: no template named 'future' in namespace 'std'
   61 |     -> std::future<typename std::invoke_result_t<F, Args...>> {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:64:37: error: no member named 'packaged_task' in namespace 'std'
   64 |   auto task = std::make_shared<std::packaged_task<return_type()>>(
      |                                ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:8: error: no member named 'future' in namespace 'std'
   67 |   std::future<return_type> res = task->get_future();
      |   ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:15: error: unexpected type name 'return_type': expected expression
   67 |   std::future<return_type> res = task->get_future();
      |               ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:67:28: error: use of undeclared identifier 'res'
   67 |   std::future<return_type> res = task->get_future();
      |                            ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   69 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/random.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:69:27: error: no member named 'mutex' in namespace 'std'
   69 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:79:10: error: use of undeclared identifier 'res'
   79 |   return res;
      |          ^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:10: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  100 |     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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/random.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:100:27: error: no member named 'mutex' in namespace 'std'
  100 |     std::unique_lock<std::mutex> lock(queue_mutex);
      |                      ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:104:13: error: no type named 'thread' in namespace 'std'
  104 |   for (std::thread& worker : workers) {
      |        ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:16: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  120 |           std::unique_lock<std::mutex> lock(this->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/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/random.cpp:8:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/mlx.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx-c/mlx/c/private/array.h:10:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/mlx.h:14:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export.h:137:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/export_impl.h:4:
In file included from /host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/io/load.h:16:
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:120:33: error: no member named 'mutex' in namespace 'std'
  120 |           std::unique_lock<std::mutex> lock(this->queue_mutex);
      |                            ~~~~~^
/host/spi-builder-workspace/.build/checkouts/mlx-swift/Source/Cmlx/mlx/mlx/threadpool.h:122:15: error: use of undeclared identifier 'lock'; did you mean 'clock'?
  122 |               lock, [this] { return this->stop || !this->tasks.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);
      |         ^
[15/162] Compiling random.cpp
BUILD FAILURE 6.2 wasm