Failed to run custom build command for `librocksdb-sys - rust

Does anybody know what should I install to fulfill librocksdb-sys dependency? I was trying to solve it with apt install clang but does not solve the issue. My best guess is that it is some error connected with linking and/or versioning.
Appreciate any hints.
error: failed to run custom build command for librocksdb-sys v0.8.0+7.4.4
Caused by: process didn't exit successfully:
/home/tomek/ssd/workspaces/substrate/target/release/build/librocksdb-sys-dcab8f317e6498cb/build-script-build
(exit status: 101) --- stderr thread 'main' panicked at
'"enum_(unnamed_at_rocksdb/include/rocksdb/c_h_981_1)" is not a valid
Ident',
/home/tomek/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.46/src/fallback.rs:756:9
note: run with RUST_BACKTRACE=1 environment variable to display a
backtrace warning: build failed, waiting for other jobs to finish...
The error occurs on Debian.

Related

Error while building function with KNative

I was trying to build a Serverless application with Knative while using Rust. The program run well locally after calling cargo build. However before deploying the project, I keep ending with the error below.
Installing function v0.1.0 (/workspace)
error: failed to get `actix-http` as a dependency of package `function v0.1.0 (/workspace)`
Caused by:
failed to load source for dependency `actix-http`
Caused by:
Unable to update registry `crates-io`
Caused by:
usage of sparse registries requires `-Z sparse-registry`
unable to invoke layer creator
unable to contribute application layer
unable to install single
unable to build
exit status 101
ERROR: failed to build: exit status 1
Error: failed to build the function: executing lifecycle: failed with status code: 51
Error: exit status 1
I've been looking for solutions to solve this without any luck. Can someone help me figure out how to resolve this issue?

How to build system76 keyboard configurator with cargo on void?

I've been trying to build the system 76 keyboard configurator (https://github.com/pop-os/keyboard-configurator) with cargo, but I keep getting the following error:
error: failed to run custom build command for 'system76-keyboard-configurator v1.3.0 (/home/myuser/source/keyboard-configurator)'
Caused by: process didn't exit successfully: '/home/myuser/source/keyboard-configurator/target/release/build/system76-keyboard-configurator-fcba57b6e3fa23d8/build-script-build' (exit status: 101) --- stderr thread 'main' panicked at 'called 'Result::unwrap()' on an 'Err' value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/gio-0.15.10/src/resource.rs:56:10 note: run with 'RUST_BACKTRACE=1' environment variable to display a backtrace warning: build failed, waiting for other jobs to finish...
I'm using void linux(GNU), so I installed the xbps equivalent packages of the dependencies (cargo gtk+3-devel hidapi-devel eudev-libudev-devel). I also have the necessary pkgconfig package. I've also tried to build the previous commit for release 1.3.0, to no success. I was expecting this to build, but I'm not sure what's going wrong. Does anyone know what could be wrong here?
the problem is on the 56th line of resource.rs as per the error message.
here is the panicking code in question
49 let status = Command::new("glib-compile-resources")
50 .arg("--sourcedir")
51 .arg(source_dir.as_ref())
52 .arg("--target")
53 .arg(&format!("{}/{}", out_dir, target))
54 .arg(gresource)
55 .status()
56 .unwrap();
this code builds a "glib-compile-resources" command, which is provided by glib-devel. this package is a dependency of libgtk-3-dev on debian as libglib2.0-dev, but not of gtk+3-devel on void, which explains why it isn't listed as a dependency.
the build should complete after installing glib-devel

Rust flo_draw graphics library is not building

The issue I'm having are regarding a copy-pasted flo_draw example program. I am using vscode and the rust-anylizer extension. It tells me failed to run build scripts, check server logs for more information apon copying the code in. I don't know how to check these or what they are. Using cargo run from the terminal yields no better results.
I tried to copy in the code below:
// src.main.rs
use flo_draw::*;
use flo_draw::canvas::*;
fn main() {
with_2d_graphics(|| {
let canvas = create_canvas_window("Hello, world");
});
}
$ cargo run
Compiling futures v0.3.25
Compiling semver v0.11.0
Compiling flo_render_gl_offscreen v0.3.0
Compiling allsorts v0.5.1
Compiling winit v0.24.0
error: failed to run custom build command for `flo_render_gl_offscreen v0.3.0`
Caused by:
process didn't exit successfully: `/<path to program>/target/debug/build/flo_render_gl_offscreen-9d539a79f1cb257c/build-script-build` (exit status: 101)
\--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: \['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'\], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: \[\])"', /<path to home>/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.54.0/src/lib.rs:1959:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
flo_draw, or, more specifically, one of its dependencies, links to the external C library and therefore have to generate the matching API. This is done using bindgen, which requires clang to be installed in your system.
Installation instructions from the linked page:
Debian-based Linuxes
# apt install llvm-dev libclang-dev clang
Ubuntu 18.04 provides the necessary packages directly.
Arch
# pacman -S clang
Fedora
# dnf install clang-devel

trying to use the gstreamer-player rust crate, I get this pkg-config error

This is the full log
error: failed to run custom build command for `glib-sys v0.10.1`
Caused by:
process didn't exit successfully: `C:\Users\Wu\Documents\RustProjects\mechanical\target\debug\build\glib-sys-b6b5049ea9ffd484\build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=GLIB_2.0_STATIC
cargo:rerun-if-env-changed=GLIB_2.0_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
Failed to run `"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.42"`: The system cannot find the file specified. (os error 2)
warning: build failed, waiting for other jobs to finish...
error: build failed
I have this error when I try to build my project (it's empty but it's using the gstreamer-player crate
I was told to install pkg-config (I'm on windows) so I used MSYS2 to install it with pacman -S mingw-w64-x86_64-pkg-config
The error persisted so I added the environment variable PKG_CONFIG_PATH = H:\MSYS2\usr\lib\pkgconfig, and I added H:\MSYS2\usr\lib\pkgconfig to the path variable
The error still persists, anyone has any idea of what I could do or what am I doing wrong? Any help appreciated

Error Installing MPI for Rust: failed to run custom build command

Please assist, i am trying to install MPI for Rust and i am getting the follwing error :
error: failed to run custom build command for `mpi-sys v0.2.0 (https://github.com/rsmpi/rsmpi#055d5036)`
Caused by:
process didn't exit successfully..
added the [dependency] as follows: mpi = { git = "https://github.com/rsmpi/rsmpi" } .I tried following the documentation in github adding the [dependency] as follows : mpi = "0.5" but I received the following error :
error: failed to run custom build command for `libffi-sys v0.6.3`
Caused by:
process didn't exit successfully:

Resources