graphql-rust / graphql-client

Typed, correct GraphQL requests and responses in Rust
Apache License 2.0
1.14k stars 155 forks source link

CLI: error while loading shared libraries: libproc_macro: cannot open shared object file #185

Open Avi-D-coder opened 5 years ago

Avi-D-coder commented 5 years ago

rustc 1.32.0-nightly (9fefb6766 2018-11-13)

Steps to reproduce:

git clone --depth 1 https://github.com/graphql-rust/graphql-client.git
cargo build && cargo build --release # Just to cover the bases
cd graphql_client_cli
cargo install # --debug makes no difference
graphql-client --help

Output:

graphql-client: error while loading shared libraries: libproc_macro-6c2e946fbc2e5b5e.so: cannot open shared object file: No such file or directory
tomhoule commented 5 years ago

Temporarily, you can run it with cargo run from the source directory, that works for me. I haven't used the CLI a lot so I don't have a cleaner solution. This will be permanently solved by this PR: https://github.com/rust-lang/rust/pull/49219#issuecomment-438379259

Maybe @h-michael has a better solution?

h-michael commented 5 years ago

This should occur only nightly build. So you should build cli with stable rust until that PR merged.

h-michael commented 5 years ago

merged: https://github.com/rust-lang/rust/pull/49219

h-michael commented 5 years ago

I build graphql-client-cli with nightly. This problem does not occur.

tomhoule commented 5 years ago

Great news!

theduke commented 5 years ago

I just ran into this.

Maybe the README should mention that the CLI only supports nightly right now.

theduke commented 5 years ago

Oh, actually I just noticed: even on nightly the built binary does not work!

It only works with cargo run. Executing target/debug/graphql-client still gives the same error.

h-michael commented 5 years ago

@theduke Thank you for your report. I 'll try it later.

mathstuf commented 4 years ago

Is this still an issue?

tomhoule commented 4 years ago

I haven't tried in a very long time! It would be nice to clarify this.