-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Port, board and/or hardware
ESP32-S3
MicroPython version
1.25.0
Reproduction
compile Micropython for the ESP32-S3 generic and once it is done compiling navigate to ports/esp32/build_ESP32_GENERIC_S3/esp-idf/main/CMakeFiles
and edit the qstr.i.last-*.sh
script in that folder. CMake builds this file and calls it as part of the build system. What is in this file is the shell command to run makeqstrdefs.py
. If you look you will see repeated parameters, ones that start with -I
When compiling MicroPython it will compile fine but if you add a few user_c_modules is when the error happens. The error is because of the added includes from the user c modules.
Expected behaviour
to compile without any errors
Observed behaviour
make[3]: /bin/sh: Argument list too long
make[3]: *** [esp-idf/main/CMakeFiles/BUILD_FROZEN_CONTENT.dir/build.make:799: genhdr/qstr.i.last] Error 127
Additional Information
The fix should be pretty simple. adding list(REMOVE_DUPLICATES MICROPY_CPP_FLAGS)
to the py/mkrules.cmake
file right above where it says # Generate qstrs
in the file.
That will remove all of the duplicate entries.
I do also suggest possibly adding some code that will turn all of the include paths into relative paths instead of absolute ones. It will trim down the length of the arguments as well.
Code of Conduct
Yes, I agree