-
Notifications
You must be signed in to change notification settings - Fork 3k
CMake: ninja reponse files disabled for ARMClang on Windows #13827
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
CMake: ninja reponse files disabled for ARMClang on Windows #13827
Conversation
7148f35
to
2e8d4fe
Compare
Wait a minute, I am still testing. It looks like this does not yet complete fixes the issue. Rebuilding the cache and entire tree takes time, so will need more than a minute to test the theory. |
@0xc0170, thank you for your changes. |
2e8d4fe
to
d3351ed
Compare
Tested on Windows and I don't see the error about the includes. However, there are two problems:
|
The linker error I also saw, I'll look at it today.
It must be something with the license, as I am testing now again and the time is good again. |
I found the culprit . We fixed the issue in CMake but has not been released until 3.19.0 (currently rc2). I downloaded it and it links without an error. I'll update now the version requirements. |
5d51a57
to
ac73e62
Compare
Pull request has been modified.
Rebased, squashed to two commits. Using 3.19.0-rc2 ARMClang links without error on Windows with Ninja. @MarceloSalazar @hugueskamba @rajkan01 Please review |
@@ -3,7 +3,7 @@ | |||
|
|||
# This is the boilerplate for Mbed OS | |||
|
|||
cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR) | |||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) |
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.
Travis will fail if it fetches from pip (this version not yet there unfortunately)
I can do:
# Fetch the 3.19.0
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://cmake.org/files/v3.19/cmake-3.19.0-rc2-Linux-x86_64.tar.gz
- tar -xvf cmake-3.19.0-rc2-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.19.0-rc2-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}
However this would be just partial fix for now. I'll talk to test team to include 3.19.0 in the jenkins and this can wait for CI update to land
I confirm the project compiles and links OK when using cmake 3.19.-rc2 |
This will wait for #13477 to land |
tools/cmake/README.md
Outdated
|
||
## How to build an application | ||
|
||
Prerequisities: | ||
- CMake >=3.18.2 | ||
- CMake >=3.19.0 | ||
- mbed-tools >=3.2.0 |
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.
mbed-tools
needs to be at least 3.4.0
.
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.
We haven't updated for a while. Updating now!
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.
fixed now
Issue https://gitlab.kitware.com/cmake/cmake/-/issues/21093 Until this is fixed, we should disable response files for ARMClang + ninja on Windows. Other toolchains and host systems should benefit from response files thus not disabling them completely. This fixes the issue with not finding includes. It's not trivial to find the root cause, it took me a while to figure out why ARMClang can't find the paths. I moved the check to Mbed OS main cmake. It should not be in the toolchain file as it is not related to the toolchain but to generator. We need toolchain properly set up first. Note, I had to protect setting CMAKE_NINJA_FORCE_RESPONSE_FILE. If I set it to 0, ninja would still use rsp files so I rather protected it and define that variable only when required, not always. Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
331cdc4
to
79329c5
Compare
Rebased, Travis should now pass and I'll run Jenkins CI test |
Pull request has been modified.
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Issue https://gitlab.kitware.com/cmake/cmake/-/issues/21093
Until this is fixed, we should disable response files for ARMClang + ninja on Windows.
Other toolchains and host systems should benefit from response files thus not disabling them
completely.
This fixes the issue with not finding includes. It's not trivial to find the root cause, it took me a while to figure out why ARMClang can't find the paths.
I hope using host system to check is the proper one. My initial approach was to use WIN32 but this is set to false in my enviroment (using windows with CMder).
Hopefully we won't hit the win path limit anytime soon, otherwise this bug can become a blocker, it should be fixed one day soon.
@MarceloSalazar Please test locally as well if this fixes the issue for you.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers