-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[MSYS2] CMake+Ninja Fix arm-none-eabi-ar: Argument list too long #14892
Conversation
[Experimental Bot, please feedback here] This PR appears to mostly meet the NuttX requirements, but there are some areas that could be improved for clarity and completeness. Strengths:
Areas for Improvement:
Revised Impact Section Example (Illustrative):
By addressing these points, the PR will be more comprehensive and easier for reviewers to understand and approve. Providing clear "before" and "after" examples, explaining the why behind the change, and providing more detail about the testing environment will significantly improve the quality of the PR. |
04b52e7
to
fa689c6
Compare
This issue is related to the Arm toolchain for Windows which is available for x86 host architecture only (compatible with x86_64) Windows (mingw-w64-i686) hosted cross toolchains AArch32 bare-metal target (arm-none-eabi) Issue /bin/sh: line 1: /home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-ar: Argument list too long On Windows, arm-none-eabi-ar can only accept strings up to a maximum length of 32,768 characters. We could suppress the 32K include string limitation by setting the CMake variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON. This is unfortunately not enough!!! ): In the build phase this error comes out $ cmake --build build [2/1025] Building ASM object arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj FAILED: arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj /home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-gcc.exe @arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.rsp -MD -MT arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -MF arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.d -o arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -c /home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S C:/msys64/home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S:42:10: fatal error: nuttx/config.h: No such file or directory 42 | #include <nuttx/config.h> | ^~~~~~~~~~~~~~~~ compilation terminated. The Workround I found to solve this problem is to overwrite the responsible file flag CMAKE_${lang}_RESPONSE_FILE_FLAG with $DEFINES $INCLUDES $FLAGS Maybe there is a better solution but this one it works. :)
fa689c6
to
7390709
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! (I wonder if there's a command line length limit on Unix?)
Summary
This issue is related to the Arm toolchain for Windows which is available for x86 host architecture only (compatible with x86_64)
Issue
/bin/sh: line 1: /home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-ar: Argument list too long
On Windows, arm-none-eabi-ar can only accept strings up to a maximum length of 32,768 characters.
We could suppress the 32K include string limitation by setting the CMake variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON.
This is unfortunately not enough!!! ):
In the build phase this error comes out
The Workround I found to solve this problem is to overwrite the responsible file flag CMAKE_${lang}_RESPONSE_FILE_FLAG with $DEFINES $INCLUDES $FLAGS
workflows/build.yml
Enable CMake+Ninja for Msys2
#14014
apache/nuttx-apps#2672
Impact
Impact on user: No changes to user-facing functionality
Impact on build: Build process remains the same
Testing
Github linux and msys2
local msys2