atomic14 / atomic14/platformio-tensorflow-lite

Error while compiling

Open
#5 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
31
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hello!
I've generated tfmicro lib and do all stuff from README but when compiling I got two errors

1. error with including "flatbuffers/flatbuffers.h" , I've fixed it by adding path "[PATH_TO_PROJECT]/lib/tfmicro/third_party/flatbuffers/include". I'm not sure why it's necessary but this line fix the problem. It should be done while copying the library.
2. While compiling I got an error
```
lib/tfmicro/tensorflow/lite/kernels/kernel_util.cc: In function 'std::__cxx11::string tflite::GetShapeDebugString(const TfLiteIntArray*)':
lib/tfmicro/tensorflow/lite/kernels/kernel_util.cc:421:19: error: 'to_string' is not a member of 'std'
str = "[" + std::to_string(shape->data[d]);
^
lib/tfmicro/tensorflow/lite/kernels/kernel_util.cc:423:21: error: 'to_string' is not a member of 'std'
str += ", " + std::to_string(shape->data[d]);
^
*** [.pio/build/esp32cam/libce4/tfmicro/tensorflow/lite/kernels/kernel_util.cc.o] Error 1

```
And this is my c_cpp_properties.json in VSCode project
```
"cStandard": "c99",
"cppStandard": "c++11",
"compilerPath": "/home/kuba/.platformio/packages/toolchain-xtensa32@2.50200.97/bin/xtensa-esp32-elf-gcc",
"compilerArgs": [
"-mfix-esp32-psram-cache-issue",
"-mlongcalls",
""
]
```

I've execute this command `docker build . -t tflite-generator --build-arg tensorflow_version=master` and than follow steps from README.md

Maybe you know how to solve this issue

Regards,

Jakub

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the README.md generation flow with the reported Docker command and inspect the generated lib/tfmicro include paths. Then trace the compilation failures in third_party/flatbuffers/include and tensorflow/lite/kernels/kernel_util.cc using the ESP32 toolchain and the shown c_cpp_properties.json. Done means the generated library builds without either reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, docker, tensorflow
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.