Skip to content

Conversation

@xuxin930
Copy link
Contributor

Summary

CI in the msys2 environment, the CMake ninja generator will have a problem with parameters being too long

Impact

Msys2

Testing

Ci build

CI in the msys2 environment, the CMake ninja generator
will have a problem with parameters being too long

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
@github-actions github-actions bot added Area: CI Size: XS The size of the change in this PR is very small labels Oct 10, 2024
@anchao
Copy link
Contributor

anchao commented Oct 10, 2024

Why not fix this issue directly? Ninja will be much faster than Makefile backend(CMake)

@simbit18
Copy link
Contributor

simbit18 commented Oct 10, 2024

Hi, before we disable -N on Msys2, let's try to solve the error.

I cannot help you now, I will be able to look for a solution on Thursday of next week.

I don't know if this way can help

CMake variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON.

https://cosylab.com/technology/a-compact-and-fast-build-system-fit-for-a-ninja/

https://gitlab.kitware.com/cmake/cmake/-/issues/21104

@xuxin930
Copy link
Contributor Author

CMake variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON.

thanks @simbit18

I tried to create an Msys2 environment
and set CMAKE_NINJA_FORCE_RESPONSE_FILE

The result is that the rsp file seems to be generated and the length of the compilation command is indeed shortened.
But it seems that the compiler cannot recognize it. Is this because we are using mingw compilation?

image

@xuxin930
Copy link
Contributor Author

CMake variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON.

thanks @simbit18

I tried to create an Msys2 environment and set CMAKE_NINJA_FORCE_RESPONSE_FILE

The result is that the rsp file seems to be generated and the length of the compilation command is indeed shortened. But it seems that the compiler cannot recognize it. Is this because we are using mingw compilation?

I may be right. In Ubuntu, gnu_gcc can correctly identify the rsp file, but mingw_gcc fails to do so. :-(

@xiaoxiang781216
Copy link
Contributor

@simbit18 @anchao before you can provide a method to support ninja on msys2, it's better to disable ninja to unblock Windows Native CI. Patch breaks Windows Native build frequently, so it's important to enable the check as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants