-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
shared library error when using indoc #15
Comments
I have not been able to reproduce this yet. Could you provide some more details? Are you using indoc from a no_std crate? Is your crate a library or binary? What is the date of the nightly you are using? Does it work with the stable compiler? What platform are you on? Do other procedural macro crates work? Can you share a minimal piece of code that reproduces this? |
So I have a library I developed and some tests that use this library. In my Cargo.toml I have included indoc = "0.2" when I include the lib in lib.rs with #[macro_use] I get ./target/release/lasso: error while loading shared libraries: libstd-9f780c2031976271.so: cannot open shared object file: No such file or directory My compiler is nightly-x86_64-unknown-linux-gnu Trying with the crate quote = "0.3" things seem to work. I can't try stable as I depend on cron crate that does not work on stable. If you still can't replicate I can start trying to remove code. Thanks |
Also on nightly-x86_64-unknown-linux-gnu, this script succeeds for me. Any idea what is different in your setup? #!/bin/bash
cargo new repro
cat >> repro/Cargo.toml <<-'EOF'
indoc = "0.2"
EOF
cat > repro/src/lib.rs <<-'EOF'
#[macro_use]
extern crate indoc;
pub fn f() -> &'static str {
indoc!("1
2")
}
#[test]
fn test_indoc() {
assert_eq!(f(), "1\n2");
}
EOF
rustc +nightly-2017-08-03 --version
cargo +nightly-2017-08-03 build --manifest-path repro/Cargo.toml
cargo +nightly-2017-08-03 test --manifest-path repro/Cargo.toml |
Ok Change Cargo.toml to [package] [dependencies] [lib] [[bin]] test/test.rs extern crate libtest; fn main() { } cargo build --release --bin test |
I also tested this on stable with the same result |
Thanks, I was able to reproduce this. I reported it in rust-lang/cargo#4651 as a Cargo bug. |
I implemented a workaround in ac5c069. Could you confirm that you are able to run binaries depending on indoc 0.2.2? |
Yep that seems like it is fixed. Thanks |
I am using a nightly compiler and when I use indow I get the error
./target/debug/lasso: error while loading shared libraries: libstd-9f780c2031976271.so: cannot open shared object file: No such file or directory
When running my executable directly.
The text was updated successfully, but these errors were encountered: