mkaczanowski/pastebin

Build process fails on aarch64

Closed this issue · 2 comments

The build process (cargo +nightly build) fails with this message

   Compiling librocksdb-sys v6.11.4
error: failed to run custom build command for `librocksdb-sys v6.11.4`

Caused by:
  process didn't exit successfully: `/home/ferry/apps/pastebin/target/debug/build/librocksdb-sys-a85dc79a0dccba47/build-script-build` (exit code: 101)
  --- stderr
  rocksdb/include/rocksdb/c.h:65:10: fatal error: 'stdarg.h' file not found
  rocksdb/include/rocksdb/c.h:65:10: fatal error: 'stdarg.h' file not found, err: true
  thread 'main' panicked at 'unable to generate rocksdb bindings: ()', /home/ferry/.cargo/registry/src/github.com-1ecc6299db9ec823/librocksdb-sys-6.11.4/build.rs:44:10
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/b2025326088b54fb3f083bebeba14e0a15bf00d3/library/std/src/panicking.rs:495:5
     1: core::panicking::panic_fmt
               at /rustc/b2025326088b54fb3f083bebeba14e0a15bf00d3/library/core/src/panicking.rs:92:14
     2: core::option::expect_none_failed
               at /rustc/b2025326088b54fb3f083bebeba14e0a15bf00d3/library/core/src/option.rs:1268:5
     3: core::result::Result<T,E>::expect
               at /rustc/b2025326088b54fb3f083bebeba14e0a15bf00d3/library/core/src/result.rs:933:23
     4: build_script_build::bindgen_rocksdb
               at ./build.rs:37:20
     5: build_script_build::main
               at ./build.rs:328:5
     6: core::ops::function::FnOnce::call_once
               at /rustc/b2025326088b54fb3f083bebeba14e0a15bf00d3/library/core/src/ops/function.rs:227:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

This is on an nvidia jetson nano (quad core ARM57)

Likely you're missing some C lib... Since I don't want to troubleshoot platform (nvidia jetson nano) specific issues I've set up CI/CD image for armv7 & armv8/aarch64:

docker run --network host mkaczanowski/pastebin:armv8 --address localhost --port 8000
docker run --network host mkaczanowski/pastebin:armv7 --address localhost --port 8000

The above will also run on your x86 machine assuming you have qemu-static installed & binfmt_misc

Thanks this works perfectly!