boncheolgu / tflite-rs

Apache License 2.0
115 stars 54 forks source link

csrc/tflite_wrapper.hpp:1:10: fatal error: 'tensorflow/lite/interpreter.h' file not found #54

Open javadoors opened 3 years ago

javadoors commented 3 years ago

when I run the 'cargo build',the console output the error,I'm a new Rust developer,can you help me,thank you.

Compiling tflite v0.9.6 (/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs) warning: panic message is not a string literal --> build.rs:156:24 156 panic!(format!("Unable to copy libtensorflow-lite.a to {}", tf_lib_name.display())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(non_fmt_panic)]` on by default
= note: this is no longer accepted in Rust 2021
= note: the panic!() macro supports formatting, so there's no need for the format!() macro here
help: remove the format!(..) macro call 156 panic!("Unable to copy libtensorflow-lite.a to {}", tf_lib_name.display())

warning: 1 warning emitted

error: failed to run custom build command for tflite v0.9.6 (/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs)

Caused by: process didn't exit successfully: /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/target/debug/build/tflite-6f77aab17005c2de/build-script-build (exit status: 101) --- stderr csrc/tflite_wrapper.hpp:1:10: fatal error: 'tensorflow/lite/interpreter.h' file not found csrc/tflite_wrapper.hpp:1:10: fatal error: 'tensorflow/lite/interpreter.h' file not found, err: true thread 'main' panicked at 'Unable to generate bindings: ()', build.rs:237:40 stack backtrace: 0: 0x556f82b0d7c0 - std::backtrace_rs::backtrace::libunwind::trace::h34055254b57d8e79 at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5 1: 0x556f82b0d7c0 - std::backtrace_rs::backtrace::trace_unsynchronized::h8f1e3fbd9afff6ec at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x556f82b0d7c0 - std::sys_common::backtrace::_print_fmt::h3a99a796b770c360

boncheolgu commented 3 years ago

Did you clone this repo? Then, update submodules before cargo build. Otherwise, cargo clean and build again. Be careful not to interrupt building tflite-rs.

javadoors commented 3 years ago

I clone this repo,in the submodles dir I run the command: root@developer-edge-zhaangbeiyaun:/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules# ./update-downloads.sh ./update-downloads.sh: 7: ./update-downloads.sh: /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/tools/make/download_dependencies.sh: not found mv: cannot stat '/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/tools/make/downloads/*': No such file or directory Skipped patch 'flatbuffers/include/flatbuffers/flatbuffers.h'.

I can't find the tensorflow repo code,then I run in the submodules,this is right or not ?: root@developer-edge-zhaangbeiyaun:/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules# git clone https://github.com/boncheolgu/tflite-rs-downloads.git root@developer-edge-zhaangbeiyaun:/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules# git clone https://github.com/tensorflow/tensorflow.git

and I cp tflite-rs-download dir then rename downloads.

the submodules dir list is below: root@developer-edge-zhaangbeiyaun:/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules# ls downloads make-NativeTable-configurable-as-polymorphic.patch tensorflow tflite-rs-downloads update-downloads.sh


the I run cargo clean and cargo build,then the error is :

Compiling tflite v0.9.6 (/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs) warning: panic message is not a string literal --> build.rs:156:24 156 panic!(format!("Unable to copy libtensorflow-lite.a to {}", tf_lib_name.display())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(non_fmt_panic)]` on by default
= note: this is no longer accepted in Rust 2021
= note: the panic!() macro supports formatting, so there's no need for the format!() macro here
help: remove the format!(..) macro call 156 panic!("Unable to copy libtensorflow-lite.a to {}", tf_lib_name.display())

warning: 1 warning emitted

error: failed to run custom build command for tflite v0.9.6 (/opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs)

Caused by: process didn't exit successfully: /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/target/debug/build/tflite-6f77aab17005c2de/build-script-build (exit status: 101) --- stderr /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:479:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:509:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:592:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:628:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:1167:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:1533:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:2960:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3002:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3035:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3065:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3095:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3128:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3158:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3185:20: error: no member named 'IsOutRange' in namespace 'flatbuffers' /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:479:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:509:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:592:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:628:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:1167:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:1533:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:2960:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3002:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3035:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3065:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3095:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3128:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3158:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true /opt/paul/ubuntu/workspace/app/wasm/wasmedge-nodejs/tflite-rs/submodules/tensorflow/tensorflow/lite/schema/schema_generated.h:3185:20: error: no member named 'IsOutRange' in namespace 'flatbuffers', err: true thread 'main' panicked at 'Unable to generate bindings: ()', build.rs:237:40 stack backtrace: 0: 0x55e00c8627c0 - std::backtrace_rs::backtrace::libunwind::trace::h34055254b57d8e79 at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5