I'm trying to run a program using rust-bert crate but unfortunately I'm getting this error.
The error appears when I try to import from rust-bert crate, if I don't import it compiles well.
You can see in the error log that it fails when creating the binary.
I think there is something wrong with my system as the error appeared right after I updated it about 2-3 weeks ago.
Compiling torch-sys v0.7.2 Compiling tokio-native-tls v0.3.0 Compiling hyper-tls v0.5.0 Compiling bstr v0.2.17 Compiling serde_urlencoded v0.7.1 Compiling reqwest v0.11.11 Compiling csv v1.1.6 Compiling cached-path v0.5.3 Compiling tch v0.7.2 Compiling rust-bert v0.18.0 Compiling ai2 v0.1.0 (/home/r/projects/rust/ai2)
Rustc 1.62.1 nightly OS: Arch linux Rust-bert version: 0.18.0 Libtorch instalation: manual Libtorch version: 126.96.36.199+cu113
error: linking with `cc` failed: exit status: 1 | = note: "cc" "-m64" "/tmp/rustcADHbss/symbols.o" "/home/r/projects ... long error collect2: error: ld returned 1 exit status = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the `-l` flag to specify native libraries to link = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
env | grep -e LIBTORCH -e LD_LIBRARY_PATH LD_LIBRARY_PATH=/home/r/libtorch/lib LIBTORCH=/home/r/libtorch
I've tried to change libtorch versions but no luck.
This error appeared right after I updated my system about 2-3 weeks ago.
Also I opened an issue related to rust-bert, some errors I could fix but this is still here