New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tflite-micro is breaking complex.h #9516
Comments
I messed up with the version info: of cause it is 3.0.0-rc1 |
The CPP STD header name is This will compile without any issue:
|
|
For the indicated example it would work, but I filed the issue because some sketches which are using c libraries (some audio codecs and fft) are not compiling any more and it was too tedious to demo the issue in c. I wanted proof the point that complex.h is broken in C! e.g. |
If you think that complex.h is broken, maybe file an issue in the toolchain repository: https://github.com/espressif/crosstool-NG/issues |
So it is the toolchain and not arduino-esp32 that decides to include and make available tflite-micro ? |
@pschatzmann we did resolve your original issue. For the others it's too tedious for you to properly report. I am still trying to offer you a way to resolve the problem, for which I only know that it has to do with complex.h. |
I can create an additional simple example (on top of the mentioned libraries that give compile errors) if that helps you to understand the issue. Please let me know! |
Yes it will. thanks! |
In Arduino, create a new tab: test.c with the following lines: #include <complex.h>
double complex z = 3.2 + 4.1 * I; This gives the following error:
Deleting the file ~/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f312/esp32/include/espressif__esp-tflite-micro/signal/src/complex.h is correcting the issue! So this is the root cause of the issue! and any Arduino library using complex.h in a c file will not work any more. This example is working properly in prior versions |
I cross posted the issue in tflite-micro as well, since it could be resolved easily there |
Just for my better understanding: am I correct in the assumption that it was the decision of the arduino-esp32 project to include tflite-micro into the basic functionality instead of relying on an Arduino library ? From my point of view an Arduino library would be a better fit and would provide much more flexibility. |
differences is that this "version" of tflite is written to support the hardware accelerators in some of our chips, so on S3 you would get better results. I do not see how external Arduino library would help in this case. The header comes from tflite itself. |
Also tflite is precompiled, so you only need to link against it and not compile the whole thing (it's a lot) |
Board
Any
Device Description
The issue is with all boards: I tried with the ESP32 and a C6
Hardware Configuration
n/a
Version
latest development Release Candidate (RC-X)
IDE Name
Arduino IDE
Operating System
Linux Mint
Flash frequency
n/a
PSRAM enabled
no
Upload speed
n/a
Description
The new version (4.0.0) contains espressif__esp-tflite-micro which has a complex.h in the src directory:
~/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f312/esp32/include/espressif__esp-tflite-micro/signal/src/complex.h
This is preventing that the regular complex.h from the c and c++ library can be used!
So all libraries containing complex.h are broken and will produce compile errors.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: