Latest MBED build not compiling

Hi Team, I am unable to compile MBED Build. which is cloned TFLite latest version from GitHub - tensorflow/tflite-micro: TensorFlow Lite for Microcontrollers.

I am using Disco Mbed board and using below command for compilation
mbed compile -m DISCO_L496AG -t GCC_ARM.

Build is compiling fine if I download TFlite 2.6.2 version but with latest version getting some issues. Not sure if I have to pass any specific macros while compilation?

I was getting below to begin with. Then I renamed the mbed_lib.json file in /home/chaitanya/Chaitanya/VWW_May24_2_8_0/tiny/benchmark/reference_submissions/person_detection/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Tests/UnitTest/Mbed/mbed-os/platform/mbed_lib.json to some other name to fix the issue.

This issue went away but similar issue was seen for two more instances. I renamed those files also which are under …/Tests/UnitTest/Mbed/mbed-os/ path itself.

tools.config.ConfigException: Library name ‘platform’ is not unique (defined in ‘/home/chaitanya/Chaitanya/VWW_May24_2_8_0/tiny/benchmark/reference_submissions/person_detection/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/NN/Tests/UnitTest/Mbed/mbed-os/platform/mbed_lib.json’ and ‘/home/chaitanya/Chaitanya/VWW_May24_2_8_0/tiny/benchmark/reference_submissions/person_detection/mbed-os/platform/mbed_lib.json’)
[mbed] ERROR: “/home/chaitanya/.conda/envs/cbeeram_tfl_3_9/bin/python” returned error.

After fixing above issue I started seeing below error and it have lot of other errors too but adding only few here. any quick help is greatly appreciated.

Compile [ 0.1%]: internally_implemented.cpp
[Error] cstring@26,9: ‘::memchr’ has not been declared
[Error] cstring@27,9: ‘::memcmp’ has not been declared
[Error] cstring@28,9: ‘::memcpy’ has not been declared
[Error] cstring@29,9: ‘::memmove’ has not been declared
[Error] cstring@30,9: ‘::memset’ has not been declared
[Error] cstring@32,9: ‘::strcat’ has not been declared
[Error] cstring@33,9: ‘::strcpy’ has not been declared
[Error] cstring@34,9: ‘::strncpy’ has not been declared
[Error] cstring@36,9: ‘::strcmp’ has not been declared
[Error] cstring@37,9: ‘::strlen’ has not been declared
[Error] cstring@38,9: ‘::strncmp’ has not been declared
[Warning] type_traits@67,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@80,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@104,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@145,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@152,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@163,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@172,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@181,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@197,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@203,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@209,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@215,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@427,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@442,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Warning] type_traits@450,1: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
[Error] move.h@87,27: ‘is_lvalue_reference’ is not a member of ‘std’; did you mean ‘add_lvalue_reference’?

As you are adding a library to Mbed Os, you need to make sure the build configuration is compatible.

From errors above, I would assume type_traits.h requires newer C++ standard that Mbed Os defines. I am not familiar with the TF lite, so can’t provide further help.

It might help others if you provide more details what’s your setup and how to reproduce it locally.