Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Library not loaded" error #13

Open
dwaltrip opened this issue Apr 16, 2023 · 0 comments
Open

"Library not loaded" error #13

dwaltrip opened this issue Apr 16, 2023 · 0 comments

Comments

@dwaltrip
Copy link

dwaltrip commented Apr 16, 2023

Hi, thank you for building and sharing this tool :)

I've encountered an error when I try to use runner, e.g. with simple example such as: runner -e 'String::from("Hello, World")'.

The error is:

dyld[36022]: Library not loaded: '@rpath/libstd-6d3bb15ae9e42a6c.dylib'
  Referenced from: '/Users/danielwaltrip/.cargo/.runner/bin/tmp'
  Reason: tried: '/usr/local/lib/libstd-6d3bb15ae9e42a6c.dylib' (no such file), '/usr/lib/libstd-6d3bb15ae9e42a6c.dylib' (no such file)

I was able to fix this by setting the ENV var DYLD_FALLBACK_LIBRARY_PATH like so:

export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$(rustc --print=sysroot)/lib"

I think I'll add this to my bash_rc or bash_profile... I'm good for now but just wanted to document the issue and what I've learned about it.

System / debug info

  • System Version: macOS 12.6 (21G115)
  • Kernel Version: Darwin 21.6.0
  • Chip: Apple M1 Max
  • rustc --version: rustc 1.68.2 (9eb3afe9e 2023-03-27)
  • cargo --version: cargo 1.68.2 (6feb7c9cf 2023-03-26)
  • rustup --version: rustup 1.25.2 (17db695f1 2023-02-01)
durbanlegend added a commit to durbanlegend/runner that referenced this issue Mar 11, 2024
1. Added *RUSTUP to env:DYLD_FALLBACK_LIBRARY_PATH for dynamic execution, as per dwaltrip's workaround. Test with Hello.rs before and after.
2. Updated serde/serde_json versions in Cargo.toml to remove on outdated syn crate that was causing a future hard error warning. Tested json.rs.
3. Amended examples/json.rs to bring it in line with readme.md
durbanlegend added a commit to durbanlegend/runner that referenced this issue Mar 11, 2024
…novan#13.

Some Clippy suggestions accepted, also Rustfmt imposed some formatting changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant