tanakamasayuki / Arduino_TensorFlowLite_ESP32

Allows you to run machine learning models locally on your ESP32 device.
Apache License 2.0
237 stars 49 forks source link

Compiler error in newly created project #2

Open BorisBrock opened 4 years ago

BorisBrock commented 4 years ago

I created a new project in PlatformIO using these settings:

Then I added this library using:

lib_deps = TensorFlowLite_ESP32

This adds TensorFlowLite_ESP32 in version 0.9.0 to the project.

When I compile this project I get the following error:

Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\logical.cpp.o In file included from .pio\libdeps\lolin32\TensorFlowLite_ESP32\src\tensorflow\lite\experimental\micro\kernels\floor.cpp:19:0: .pio\libdeps\lolin32\TensorFlowLite_ESP32\src/tensorflow/lite/kernels/kernel_util.h:22:47: fatal error: tensorflow/lite/c/builtin_op_data.h: No such file or directory

Here's the full build output:

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin32.html PLATFORM: Espressif 32 1.12.4 > WEMOS LOLIN32 HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:

Unpacking [###########################---------] 75% Unpacking [###########################---------] 76% Unpacking [###########################---------] 77% Unpacking [############################--------] 77% Unpacking [############################--------] 78% Unpacking [############################--------] 79% Unpacking [############################--------] 80% Unpacking [#############################-------] 80% Unpacking [#############################-------] 81% Unpacking [#############################-------] 82% Unpacking [#############################-------] 83% Unpacking [##############################------] 83% Unpacking [##############################------] 84% Unpacking [##############################------] 85% Unpacking [###############################-----] 86% Unpacking [###############################-----] 87% Unpacking [###############################-----] 88% Unpacking [################################----] 89% Unpacking [################################----] 90% Unpacking [################################----] 91% Unpacking [#################################---] 91% Unpacking [#################################---] 92% Unpacking [#################################---] 93% Unpacking [#################################---] 94% Unpacking [##################################--] 94% Unpacking [##################################--] 95% Unpacking [##################################--] 96% Unpacking [##################################--] 97% Unpacking [###################################-] 97% Unpacking [###################################-] 98% Unpacking [###################################-] 99% Unpacking [####################################] 100% TensorFlowLite_ESP32 @ 0.9.0 has been successfully installed! Found 27 compatible libraries Scanning dependencies... Dependency Graph |-- 0.9.0 Building in release mode Compiling .pio\build\lolin32\src\main.cpp.o Generating partitions .pio\build\lolin32\partitions.bin Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\c\c_api_internal.c.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\core\api\error_reporter.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\core\api\flatbuffer_conversions.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\core\api\op_resolver.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\core\api\tensor_utils.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\debug_log.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\debug_log_numbers.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\activations.cpp.o .pio\libdeps\lolin32\TensorFlowLite_ESP32\src\tensorflow\lite\experimental\micro\debug_log_numbers.cpp: In function 'char {anonymous}::FastFloatToBufferLeft(float, char)': .pio\libdeps\lolin32\TensorFlowLite_ESP32\src\tensorflow\lite\experimental\micro\debug_log_numbers.cpp:117:53: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] const uint32_t u = reinterpret_cast<uint32_t>(&f); ^ Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\add.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\all_ops_resolver.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\arg_min_max.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\ceil.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\comparisons.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\conv.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\depthwise_conv.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\dequantize.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\elementwise.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\floor.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\fully_connected.cpp.o Compiling .pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\logical.cpp.o In file included from .pio\libdeps\lolin32\TensorFlowLite_ESP32\src\tensorflow\lite\experimental\micro\kernels\floor.cpp:19:0: .pio\libdeps\lolin32\TensorFlowLite_ESP32\src/tensorflow/lite/kernels/kernel_util.h:22:47: fatal error: tensorflow/lite/c/builtin_op_data.h: No such file or directory compilation terminated. [.pio\libdeps\lolin32\TensorFlowLite_ESP32\src\tensorflow\lite\experimental\micro\kernels\logistic.cpp] TypeError : unsupported operand type(s) for -: 'float' and 'NoneType' [.pio\build\lolin32\lib9b1\TensorFlowLite_ESP32\tensorflow\lite\experimental\micro\kernels\floor.cpp.o] Error 1 =================================================================================== [FAILED] Took 10.92 seconds =================================================================================== The terminal process "C:\Users\visbbr.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

tanakamasayuki commented 4 years ago

I'm sorry, please give me a little more time. It works with Arduino IDE.