Skip to content

Argument list too long compile error [ESP32} #17666

@kdschlosser

Description

@kdschlosser

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy