neolem
July 30, 2015, 8:20pm
1
I am trying to build SolidOak(GitHub - oakes/SolidOak: An IDE for Rust ) but keep getting the error message below,
error: could not find native static library nvim
, perhaps an -L flag is missing?
Could not compile neovim-rs
.
Is there a way to pass the -L
flag using cargo build
. Is there a way to list the directories that Cargo looks for static libs?
Hi neolem,
Maybe a Build-Script for Cargo could help you in such situations?
http://doc.crates.io/build-script.html
Regards,
Harris
Also, there's a possibility to run "cargo rustc" which allows you putting extra options/flags.
Here's an example from a reddit-thread with a similar question:
1 Like
This probably means you don't have the library installed.
neolem
July 30, 2015, 11:13pm
5
@brakmic I have tried the following,
cargo rustc -- -l /usr/lib/x86_64-linux-gnu/libuv.a
and
cargo rustc -- -L /usr/lib/x86_64-linux-gnu/
and
cargo rustc --verbose -- -L dependency=/usr/lib/x86_64-linux-gnu/
None of these command seems to help. rustc
still doesn't look for the static lib in the given path.
neolem
July 30, 2015, 11:14pm
6
I suppose I could, but the crate that I am trying to build is an external one.
neolem
July 30, 2015, 11:17pm
7
@steveklabnik I even copied the static libs in the usual system folders /usr/lib
but alas rustc is not picking it up. Calling cargo build
with --verbose
lists the -L
paths used but I am unable to see /usr/lib
listed. -L
option doesn't seem to work too.
neolem
July 30, 2015, 11:27pm
8
I changed rustc
to stable, it is building okay now. I was getting the above errors on nightly.
Thanks @brakmic @steveklabnik .
1 Like