nextest-rs / nextest

A next-generation test runner for Rust.
https://nexte.st
Apache License 2.0
2.19k stars 97 forks source link

dyld[22729]: Library not loaded: @rpath/libtest-43e07d00fab233d0.dylib #1183

Closed chirag-bgh closed 10 months ago

chirag-bgh commented 10 months ago

When I run this: cargo nextest run

This errors into:

 Finished test [unoptimized + debuginfo] target(s) in 0.23s
error: creating test list failed

Caused by:
  for `testmacros`, command `/Users/chirag-bgh/<REDACTED>/target/debug/deps/testmacros-72a9576073cff04f --list --format terse` exited with signal 6 (SIGABRT)
--- stdout:

--- stderr:
dyld[22729]: Library not loaded: @rpath/libtest-43e07d00fab233d0.dylib
  Referenced from: <E50A2CC7-18F7-3A3E-B5FF-62032BBBE4B2> /Users/chirag-bgh/<REDACTED>/target/debug/deps/testmacros-72a9576073cff04f
  Reason: tried: '/Users/chirag-bgh/<REDACTED>/target/debug/build/ring-99789583cadca0c0/out/libtest-43e07d00fab233d0.dylib' (no such file), '/Users/chirag-bgh/<REDACTED>/target/debug/build/ring-b2ef9080d05dabcd/out/libtest-43e07d00fab233d0.dylib' (no such file), '/Users/chirag-bgh/<REDACTED>/target/debug/build/secp256k1-sys-90c8f2a649408b3c/out/libtest-43e07d00fab233d0.dylib' (no such file), '/Users/chirag-bgh/<REDACTED>/target/debug/deps/libtest-43e07d00fab233d0.dylib' (no such file), '/Users/chirag-bgh/<REDACTED>/target/debug/libtest-43e07d00fab233d0.dylib' (no such file), '/usr/local/lib/libtest-43e07d00fab233d0.dylib' (no such file)

--- 

Update: was able to fix this by setting env variable export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/<path> where path is given by rustc --print target-libdir

sunshowers commented 10 months ago

I believe this is https://github.com/nextest-rs/nextest/issues/267 -- some help in fixing this would be greatly appreciated.