Closed brian-liu1 closed 3 years ago
Your log mentions SQLite version 3.7.13. Moonfire NVR's SQL schema uses without rowid
, which was apparently added in version 3.14.0 (2016-08-08). I should add a version check to improve the error message, but the root cause is that your SQLite version is too old.
What Linux distribution are you using? I didn't think any were using versions that old anymore.
You can try compiling with --features=bundled
, which will statically link in a more recent SQLite version. Also, when you're compiling yourself (rather than using the Docker images), I recommend running the test suite so you can catch problems ahead of time.
cargo test --features=bundled
cargo build --release --features=bundled
My bananapi installed with linux3.10. I think it is very old but i have no choices. and i compiled the sqlite by myself and i have no idea about the version that nvr is needed.
Your log mentions SQLite version 3.7.13. Moonfire NVR's SQL schema uses
without rowid
, which was apparently added in version 3.14.0 (2016-08-08). I should add a version check to improve the error message, but the root cause is that your SQLite version is too old.What Linux distribution are you using? I didn't think any were using versions that old anymore.
You can try compiling with
--features=bundled
, which will statically link in a more recent SQLite version. Also, when you're compiling yourself (rather than using the Docker images), I recommend running the test suite so you can catch problems ahead of time.cargo test --features=bundled cargo build --release --features=bundled
when i build the nvr ,i got an error
error: failed to run custom build command for
ncurses v5.101.0`
Caused by:
process didn't exit successfully: /home/brian/bpi/nvr/moonfire-nvr-master_/server/target/release/build/ncurses-297321b7ae671536/build-script-build
(exit status: 101)
--- stdout
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=NCURSESW5_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=NCURSESW5_STATIC
cargo:rerun-if-env-changed=NCURSESW5_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_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=NCURSESW_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=NCURSESW_STATIC
cargo:rerun-if-env-changed=NCURSESW_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_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_arm_unknown_linux_gnueabihf
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rustc-link-lib=ncursesw
OPT_LEVEL = Some("3")
TARGET = Some("arm-unknown-linux-gnueabihf")
HOST = Some("x86_64-unknown-linux-gnu")
CC_arm-unknown-linux-gnueabihf = None
CC_arm_unknown_linux_gnueabihf = None
TARGET_CC = None
CC = None
CROSS_COMPILE = None
CFLAGS_arm-unknown-linux-gnueabihf = None
CFLAGS_arm_unknown_linux_gnueabihf = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = None
--- stderr
thread 'main' panicked at '/home/brian/bpi/nvr/moonfire-nvr-master_/server/target/arm-unknown-linux-gnueabihf/release/build/ncurses-48b2e1943d8447a3/out/chtype_size failed: Os { code: 8, kind: Other, message: "Exec format error" }', /home/brian/.cargo/registry/src/github.com-1ecc6299db9ec823/ncurses-5.101.0/build.rs:107:10
stack backtrace:
0: rust_begin_unwind
at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:493:5
1: core::panicking::panic_fmt
at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:92:14
2: core::result::unwrap_failed
at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/result.rs:1355:5
3: core::result::Result<T,E>::expect
at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/result.rs:997:23
4: build_script_build::check_chtype_size
at ./build.rs:106:20
5: build_script_build::main
at ./build.rs:59:5
6: core::ops::function::FnOnce::call_once
at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with RUST_BACKTRACE=full
for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed`
i just modify the build.rs to fix it in order to finish compile.
It looks like you're hitting an error while cross-compiling ncurses. https://github.com/jeaye/ncurses-rs/issues/184 looks related. But you must have gotten a build to go through before (to get far enough for nvr init
to fail) so hopefully you can get it to work again.
I'm about to close this issue because the reason nvr init
failed is understood, and I'll shortly submit a change that makes that more clear. But feel free to open another issue if you need more help.
I have finished compiling the moonfir for armv7, but when i run nvr init , it failed with the log:
i am not well known about rust and i can not find way to finish the error.