Build Information
Failed to build hnswlib.swift, reference v1.0.0 (28b75c), with Swift 6.3 for Wasm on 15 Apr 2026 20:46:48 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/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.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/MegaPortal/hnswlib.swift.git
Reference: v1.0.0
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/MegaPortal/hnswlib.swift
* tag v1.0.0 -> FETCH_HEAD
HEAD is now at 28b75c5 Initial commit of hnswlib.swift package
Cloned https://github.com/MegaPortal/hnswlib.swift.git
Revision (git rev-parse @):
28b75c52c3af1440cb51b44cc177db85c8cba9a8
SUCCESS checkout https://github.com/MegaPortal/hnswlib.swift.git at v1.0.0
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.3
Building package at path: $PWD
https://github.com/MegaPortal/hnswlib.swift.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/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.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:d69f4e7582c319245442d62a08b2d7c7fd5a0c0c69f5d2ef11d1530cd8d3329b
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest
Building for debugging...
[0/3] Write sources
[1/3] Write swift-version-24593BA9C3E375BF.txt
In file included from /host/spi-builder-workspace/Sources/CppSources/HNSWLibWrapper.cpp:2:
In file included from /host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswlib.h:227:
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/bruteforce.h:20:10: error: no type named 'mutex' in namespace 'std'
20 | std::mutex index_lock;
| ~~~~~^
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/bruteforce.h:67:35: error: no member named 'mutex' in namespace 'std'
67 | std::unique_lock<std::mutex> lock(index_lock);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/bruteforce.h:87:31: error: no member named 'mutex' in namespace 'std'
87 | std::unique_lock<std::mutex> lock(index_lock);
| ^~~~~
In file included from /host/spi-builder-workspace/Sources/CppSources/HNSWLibWrapper.cpp:2:
In file included from /host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswlib.h:228:
In file included from /host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:3:
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/visited_list_pool.h:40:10: error: no type named 'mutex' in namespace 'std'
40 | std::mutex poolguard;
| ~~~~~^
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/visited_list_pool.h:53:36: error: no member named 'mutex' in namespace 'std'
53 | std::unique_lock <std::mutex> lock(poolguard);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/visited_list_pool.h:66:32: error: no member named 'mutex' in namespace 'std'
66 | std::unique_lock <std::mutex> lock(poolguard);
| ^~~~~
In file included from /host/spi-builder-workspace/Sources/CppSources/HNSWLibWrapper.cpp:2:
In file included from /host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswlib.h:228:
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:40:30: error: no member named 'mutex' in namespace 'std'
40 | mutable std::vector<std::mutex> label_op_locks_;
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:42:10: error: no type named 'mutex' in namespace 'std'
42 | std::mutex global;
| ~~~~~^
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:43:22: error: no member named 'mutex' in namespace 'std'
43 | std::vector<std::mutex> link_list_locks_;
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:59:18: error: no type named 'mutex' in namespace 'std'
59 | mutable std::mutex label_lookup_lock; // lock for label_lookup_
| ~~~~~^
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:70:10: error: no type named 'mutex' in namespace 'std'
70 | std::mutex deleted_elements_lock; // lock for deleted_elements
| ~~~~~^
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:178:17: error: no type named 'mutex' in namespace 'std'
178 | inline std::mutex& getLabelOpMutex(labeltype label) const {
| ~~~~~^
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:255:36: error: no member named 'mutex' in namespace 'std'
255 | std::unique_lock <std::mutex> lock(link_list_locks_[curNodeNum]);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:529:36: error: no member named 'mutex' in namespace 'std'
529 | std::unique_lock <std::mutex> lock(link_list_locks_[cur_c], std::defer_lock);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:555:36: error: no member named 'mutex' in namespace 'std'
555 | std::unique_lock <std::mutex> lock(link_list_locks_[selectedNeighbors[idx]]);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:641:26: error: no member named 'mutex' in namespace 'std'
641 | std::vector<std::mutex>(new_max_elements).swap(link_list_locks_);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:785:26: error: no member named 'mutex' in namespace 'std'
785 | std::vector<std::mutex>(max_elements).swap(link_list_locks_);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:786:26: error: no member named 'mutex' in namespace 'std'
786 | std::vector<std::mutex>(MAX_LABEL_OPERATION_LOCKS).swap(label_op_locks_);
| ^~~~~
/host/spi-builder-workspace/Sources/CppSources/../hnswlib.cpp/hnswalg.h:828:32: error: no member named 'mutex' in namespace 'std'
828 | std::unique_lock <std::mutex> lock_label(getLabelOpMutex(label));
| ^~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[2/3] Compiling hnswlib_cpp HNSWLibWrapper.cpp
BUILD FAILURE 6.3 wasm