sanpii / lxc-rs

Linux Containers API for rustaceans
MIT License
20 stars 5 forks source link

Unable to compile version '0.7.0' #31

Closed Red3nzo closed 11 months ago

Red3nzo commented 11 months ago

During a fresh install & new rust project running cargo build, results in the following error message.

error: failed to run custom build command for `lxc-sys v0.5.0`

Caused by:
  process didn't exit successfully: `/target/debug/build/lxc-sys-75c5558466c134fa/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-link-lib=lxc

  --- stderr
  /usr/include/malloc.h:24:10: fatal error: 'stddef.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("/usr/include/malloc.h:24:10: fatal error: 'stddef.h' file not found\n")', /.cargo/registry/src/index.crates.io-6f17d22bba15001f/lxc-sys-0.5.0/build.rs:7:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

All LXC related packages are installed & working.

What am I missing here? C Library, although gcc is installed on my machine?

Red3nzo commented 11 months ago

It appears my system didn't have clang & llvm installed. Compiles successful after these two packages are added to my linux machine.

sanpii commented 11 months ago

Readme updates, thank you.