GreptimeTeam/greptimedb

cargo nextest fails

Closed this issue · 4 comments

What type of bug is this?

User Experience

What subsystems are affected?

Other

Minimal reproduce step

$ git log -1
commit 0b6d78a527eb87fcb7adf6b008062736eeeee5ae (HEAD -> main, upstream/main, feat/write-bulk)
Author: Lin Yihai <1161813899@qq.com>
Date:   Tue Nov 12 17:57:41 2024 +0800

    refactor: consolidate `DatanodeClientOptions` (#4966)

    refactor!: consolidate `DatanodeClientOptions`

$ rustc -V
rustc 1.84.0-nightly (e92993dbb 2024-10-18)

$ cargo nextest run --no-fail-fast
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.63s
error: creating test list failed

Caused by:
  for `common-macro::proc-macro/common_macro`, command `/Users/lei/Workspace/greptimedb/target/debug/deps/common_macro-b64f3f0852d63234 --list --format terse` exited with signal 6 (SIGABRT)
--- stdout:

--- stderr:
dyld[90891]: Library not loaded: @rpath/libstd-7c07b3de3fa4c74b.dylib
  Referenced from: <299A7E98-BCBE-39B2-80C7-467ECEF91DFD> /Users/lei/Workspace/greptimedb/target/debug/deps/common_macro-b64f3f0852d63234
  Reason: tried: '/Users/lei/Workspace/greptimedb/target/debug/build/blake3-237470c0af5a8dfc/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/hydroflow_datalog_core-1651cad6bebddfc4/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/libfuzzer-sys-5e32c666b79a86da/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/libsqlite3-sys-37cb24b1660e57be/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/lz4-sys-1aea66bf0547c60e/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/lzma-sys-1ac82f25beaf9037/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/ring-11dfa95c6cc73108/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/ring-5a7f48a4bf25ee33/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/tikv-jemalloc-sys-a91f71bc57ff78e6/out/build/lib/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/tree-sitter-e3d0b383f59812e8/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/build/zstd-sys-d297559e3e227f0d/out/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/deps/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/Workspace/greptimedb/target/debug/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/Users/lei/lib/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/usr/local/lib/libstd-7c07b3de3fa4c74b.dylib' (no such file), '/usr/lib/libstd-7c07b3de3fa4c74b.dylib' (no such file, not in dyld cache)

---

What did you expect to see?

Sucessfully run all unit tests.

What did you see instead?

Failed due to cannot find libstd

What operating system did you use?

macOS 14.6.1 (23G93)

What version of GreptimeDB did you use?

latest

Relevant log output and stack trace

No response

Looks like libstd-7c07b3de3fa4c74b.dylib resides in $(rustc --print sysroot)/lib/rustlib/aarch64-apple-darwin/lib/ but cargo nextest does not inject that path to DYLD_LIBRARY_PATH environment variable.

As a workaround, manually setting DYLD_LIBRARY_PATH does work,

export DYLD_LIBRARY_PATH="`rustc --print sysroot`/lib/rustlib/aarch64-apple-darwin/lib:$DYLD_LIBRARY_PATH"

but not sure what causes this.

I encountered the same error.

I encountered the same error.

Try if updating cargo-nextest by cargo install cargo-nextest fixes that for you.

Close as resolved