-
Notifications
You must be signed in to change notification settings - Fork 82
Long path names break Windows build (originally: MSVC Generator can break CMake builds) #1237
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
Comments
The error log is quite long, here is the beginning:
But I think the interesting part is here:
|
In VS Code, to make sure you are using ninja, you need to add a
Or set it as a user settings and you won't have to think about it anymore. |
Thank you, so as I remember it, the error is caused by the Cargo build script of cxx-qt-lib. Maybe this has something to do with the file synchronization issues that we have encountered previously on Windows? |
FWIW, I've just run into this issue today, and can reliably reproduce it on our (internal) GitLab CI (cxx-qt 0.7.1, msvc generator). Will try to switch to ninja.... |
Trying to replicate KDAB#1237. DO NOT MERGE, as this will likely break sccache!
Trying to replicate KDAB#1237. DO NOT MERGE, as this will likely break sccache!
Trying to replicate KDAB#1237. DO NOT MERGE, as this will likely break sccache!
Trying to replicate KDAB#1237. DO NOT MERGE, as this will likely break sccache!
Trying to replicate KDAB#1237. DO NOT MERGE, as this will likely break sccache!
Trying to replicate KDAB#1237. DO NOT MERGE, as this will likely break sccache!
I just encountered this issue while trying to debug #1234 , but while building with Ninja! What's even stranger, I was able to fix the issue by switching the build path from: C:\Projekte\sol-imageviewer-cxx-qt\build\Desktop_Qt_6_9_0_MSVC2022_64bit-Debug to: C:\Projekte\sol-imageviewer-cxx-qt\build-debug I have no idea why that seems to be an issue.. |
It turns out that this issue is caused by the limitation of 260 character long file paths. That means there are a few ways we can fix this issue:
We should ourselves work to reduce the folder nesting in the out-dir in cxx-qt-build, then we can close the issue. |
As described in KDAB#1237, on Windows we're sometimes hitting the 260 character limit for filepaths. This is mostly due to a lot of nesting by Qt Creator, Corrosion and Cargo who all include the target triple and other configuration information in the build path. However, we can at least reduce the character count a little bit on our part. For example, for qqmlengine.cxxqt.h, the path length is now reduced by ~40 characters from: out/cxx-qt-build/target/crates/cxx-qt-lib/include/cxx-qt-lib-internals/src/qml/qqmlengine.cxxqt.h to now: out/cxxqtbuild/include/private/src/qml/qqmlengine.cxxqt.h
As described in #1237, on Windows we're sometimes hitting the 260 character limit for filepaths. This is mostly due to a lot of nesting by Qt Creator, Corrosion and Cargo who all include the target triple and other configuration information in the build path. However, we can at least reduce the character count a little bit on our part. For example, for qqmlengine.cxxqt.h, the path length is now reduced by ~40 characters from: out/cxx-qt-build/target/crates/cxx-qt-lib/include/cxx-qt-lib-internals/src/qml/qqmlengine.cxxqt.h to now: out/cxxqtbuild/include/private/src/qml/qqmlengine.cxxqt.h
As described in KDAB#1237, on Windows we're sometimes hitting the 260 character limit for filepaths. This is mostly due to a lot of nesting by Qt Creator, Corrosion and Cargo who all include the target triple and other configuration information in the build path. However, we can at least reduce the character count a little bit on our part. For example, for qqmlengine.cxxqt.h, the path length is now reduced by ~40 characters from: out/cxx-qt-build/target/crates/cxx-qt-lib/include/cxx-qt-lib-internals/src/qml/qqmlengine.cxxqt.h to now: out/cxxqtbuild/include/private/src/qml/qqmlengine.cxxqt.h
As described in KDAB#1237, on Windows we're sometimes hitting the 260 character limit for filepaths. This is mostly due to a lot of nesting by Qt Creator, Corrosion and Cargo who all include the target triple and other configuration information in the build path. However, we can at least reduce the character count a little bit on our part. For example, for qqmlengine.cxxqt.h, the path length is now reduced by ~40 characters from: out/cxx-qt-build/target/crates/cxx-qt-lib/include/cxx-qt-lib-internals/src/qml/qqmlengine.cxxqt.h to now: out/cxxqtbuild/include/private/src/qml/qqmlengine.cxxqt.h
As described in KDAB#1237, on Windows we're sometimes hitting the 260 character limit for filepaths. This is mostly due to a lot of nesting by Qt Creator, Corrosion and Cargo who all include the target triple and other configuration information in the build path. However, we can at least reduce the character count a little bit on our part. For example, for qqmlengine.cxxqt.h, the path length is now reduced by ~40 characters from: out/cxx-qt-build/target/crates/cxx-qt-lib/include/cxx-qt-lib-internals/src/qml/qqmlengine.cxxqt.h to now: out/cxxqtbuild/include/private/src/qml/qqmlengine.cxxqt.h
As described in #1237, on Windows we're sometimes hitting the 260 character limit for filepaths. This is mostly due to a lot of nesting by Qt Creator, Corrosion and Cargo who all include the target triple and other configuration information in the build path. However, we can at least reduce the character count a little bit on our part. For example, for qqmlengine.cxxqt.h, the path length is now reduced by ~40 characters from: out/cxx-qt-build/target/crates/cxx-qt-lib/include/cxx-qt-lib-internals/src/qml/qqmlengine.cxxqt.h to now: out/cxxqtbuild/include/private/src/qml/qqmlengine.cxxqt.h
During yesterdays training @narnaud could only build with the Ninja generator, not the MSVC one.
We need to investigate whether we can reproduce this and how to fix it.
@narnaud can you reproduce the error and provide us with the error message please?
The text was updated successfully, but these errors were encountered: