The Swift Package Index logo.Swift Package Index

Build Information

Failed to build hnswlib.swift, reference v1.0.0 (28b75c), with Swift 6.2 for Wasm on 23 Jun 2025 07:18:40 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.64.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.2
Building package at path:  $PWD
https://github.com/MegaPortal/hnswlib.swift.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:44384f43f933eaa0f42803e9ef7c3d8388c5841ccc831a15a5edf63d8c273423
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.2-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:18: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   67 |             std::unique_lock<std::mutex> lock(index_lock);
      |             ~~~~~^~~~~~~~~~~
      |                  unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm/wasm32-unknown-wasi/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/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: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:14: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   87 |         std::unique_lock<std::mutex> lock(index_lock);
      |         ~~~~~^~~~~~~~~~~
      |              unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm/wasm32-unknown-wasi/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/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: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:18: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   53 |             std::unique_lock <std::mutex> lock(poolguard);
      |             ~~~~~^~~~~~~~~~~
      |                  unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm/wasm32-unknown-wasi/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/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: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:14: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
   66 |         std::unique_lock <std::mutex> lock(poolguard);
      |         ~~~~~^~~~~~~~~~~
      |              unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm/wasm32-unknown-wasi/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/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: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:18: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  255 |             std::unique_lock <std::mutex> lock(link_list_locks_[curNodeNum]);
      |             ~~~~~^~~~~~~~~~~
      |                  unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm/wasm32-unknown-wasi/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/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: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:18: error: no template named 'unique_lock' in namespace 'std'; did you mean 'unique_copy'?
  529 |             std::unique_lock <std::mutex> lock(link_list_locks_[cur_c], std::defer_lock);
      |             ~~~~~^~~~~~~~~~~
      |                  unique_copy
/root/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-30-a_wasm/wasm32-unknown-wasi/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.
[2/3] Compiling hnswlib_cpp HNSWLibWrapper.cpp
BUILD FAILURE 6.2 wasm