rust-cross / rust-musl-cross

Docker images for compiling static Rust binaries using musl-cross
MIT License
639 stars 70 forks source link

Build rocksdb with error #45

Closed ipconfiger closed 2 years ago

ipconfiger commented 2 years ago
Downloaded 134 crates (15.9 MB) in 4.37s (largest was `librocksdb-sys` at 6.1 MB)
   Compiling librocksdb-sys v0.6.1+6.28.2
error: failed to run custom build command for `librocksdb-sys v0.6.1+6.28.2`

Caused by:
  process didn't exit successfully: `/home/rust/src/target/release/build/librocksdb-sys-575f1be645469399/build-script-build` (exit status: 101)
  --- stderr
  /usr/include/stdint.h:26:10: fatal error: 'bits/libc-header-start.h' file not found
  /usr/include/stdint.h:26:10: fatal error: 'bits/libc-header-start.h' file not found, err: true
  thread 'main' panicked at 'unable to generate rocksdb bindings: ()', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/librocksdb-sys-0.6.1+6.28.2/build.rs:43:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
messense commented 2 years ago

Please provide a step-by-step reproduction of the issue.

ipconfiger commented 2 years ago

step1 cargo new proj

step2 add dependencies [dependencies] rocksdb = "0.18.0"

step3 docker pull messense/rust-musl-cross:x86_64-musl

step4 alias rust-musl-builder='docker run --rm -it -v "$(pwd)":/home/rust/src messense/rust-musl-cross:x86_64-musl' rust-musl-builder cargo build --release

then boom!

messense commented 2 years ago

There is little point in trying this since that project doesn't build on musl: https://github.com/rust-rocksdb/rust-rocksdb/issues/174