tensorflow / tflite-micro

Infrastructure to enable deployment of ML models to low-power resource-constrained embedded targets (including microcontrollers and digital signal processors).
Apache License 2.0
1.86k stars 806 forks source link

Some make errors when "make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test" #583

Closed RomanFoell closed 2 years ago

RomanFoell commented 2 years ago

Hi,

when i run

"make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test"

I get the following errors:

find: ‘../google/’: No such file or directory
tensorflow/lite/micro/tools/make/downloads/flatbuffers already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/pigweed already exists, skipping the download.
g++ -std=c++11 -fno-rtti -fno-exceptions -fno-threadsafe-statics -Werror -fno-unwind-tables -ffunction-sections -fdata-sections -fmessage-length=0 -DTF_LITE_STATIC_MEMORY -DTF_LITE_DISABLE_X86_NEON -Wsign-compare -Wdouble-promotion -Wshadow -Wunused-variable -Wmissing-field-initializers -Wunused-function -Wswitch -Wvla -Wall -Wextra -Wstrict-aliasing -Wno-unused-parameter  -DTF_LITE_USE_CTIME -I. -Itensorflow/lite/micro/tools/make/downloads/gemmlowp -Itensorflow/lite/micro/tools/make/downloads/flatbuffers/include -Itensorflow/lite/micro/tools/make/downloads/ruy -Itensorflow/lite/micro/tools/make/gen/linux_x86_64_default/genfiles/ -Itensorflow/lite/micro/tools/make/downloads/kissfft -o tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/bin/hello_world_test tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/obj/core/tensorflow/lite/micro/examples/hello_world/hello_world_test.o tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/lib/libtensorflow-microlite.a -Wl,--fatal-warnings -Wl,--gc-sections -lm
/usr/bin/ld: tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/obj/core/tensorflow/lite/micro/examples/hello_world/hello_world_test.o: in function `main':
hello_world_test.cc:(.text.startup.main+0x6c): undefined reference to `g_hello_world_model_data'
/usr/bin/ld: hello_world_test.cc:(.text.startup.main+0x7f): undefined reference to `g_hello_world_model_data'
collect2: error: ld returned 1 exit status
make: *** [tensorflow/lite/micro/examples/hello_world/Makefile.inc:39: tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/bin/hello_world_test] Error 1

I can not figure out what went wrong, can someone tell me, what i can do here?

I actually went through this post, to get in run under WSL:

https://forums.tinyml.org/t/make-doesnt-work-on-hello-world-test-from-tinyml-book/344/5

The mentioned error with problems of folders named the same looks quite similar, but is not exactly the same. Does this mean, there is conflict in the folder structure?

The mentioned file or folder: tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/bin/hello_world_test does not exist.

Actually I found some files which where created in:

"\wsl$\Ubuntu\home\flo9fe\tflite-micro\tensorflow\lite\micro\tools\make\gen\linux_x86_64_default\obj\core\tensorflow\lite\micro\examples"

and

"\wsl$\Ubuntu\home\flo9fe\tflite-micro\tensorflow\lite\micro\tools\make\gen\linux_x86_64_default\genfiles\tensorflow\lite\micro\examples"

This seems to be not right?

Thanks.

advaitjain commented 2 years ago

Windows builds are fully community supported. We would be happy to review PRs with fixes.

I'm going to close the current issue, and cross-linking https://github.com/tensorflow/tflite-micro/issues/170 for completeness.

The directory structure being the same within linux_x86_64_default\obj\core and linux_x86_64_default\genfiles\ is expected.