-
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
cmake: sometimes fails to parse implicit include dirs #13608
Comments
That might be related to msys2/MSYS2-packages#3259 |
It affects only UCRT64, so I don't think It's related. |
If someone knows a way to reproduce this locally (even if only in some cases), please let us know. I've only seen it in CI up until now. |
I have reproduced this issue once but forgot which package. The issue disappears after deleting pkg and src directories. I ran ninja multiple times before deleting the build directory and it fails with same compiler error. It would be helpful if you can provide what steps one should follow after catching this issue. For example, what files should be examined, what clues should be searched for ... |
All I know is what I wrote in the original post above. If my guess above is correct then adding |
I think experience this if I add Without:
(compiles but fails to link) With:
Full CMakeLists.txt:
I need to set
EDIT: I'm using MINGW64, not UCRT64. |
It looks like you are using a cygwin cmake with a mingw toolchain. try The issue is similar in that cmake fails to parse the implicit system include dirs from the compiler, and continues with a broken setup instead of erroring out. Though the cause is different in your case. |
It works! Didn't expect to get tech support, but thanks. |
I mentioned on 2024-01-25 in chat that I haven't seen this issue in CI for a while, and indeed it hasn't happened since as far as I'm aware of. So maybe something fixed it (in cmake, ninja, ucrt, ?) or it's still broken but we no longer hit it somehow. Let's close this. If this still happens for someone please let us know! |
I saw it today with boost.
|
I have seen that too. Deleting build directory solves the issue for all cases in my setup. |
It did not solve the error for me:
|
There's something dubious in CmakeConfigureLog.yaml; the first line seems corrupt:
|
Without However there shouldn't be any messages from GNU AS. It can happen if CMake attempts to compile something into a non-existent directory which fails; but is it expected? There is no g++ -pipe C:/MSYS64/ucrt64/share/cmake/Modules/CMakeCXXCompilerABI.cpp -v -c -o nonexistent/dummy.o
|
hm.
|
Description
This is a follow up from #10761
If cmake fails to parse the gcc output of implicit include dirs, it will add the system paths via
-isystem
, which is not supported by GCC and will result in something like:I've noted the packages for which this happened in CI recently:
so in all cases cmake+ninja.
I've had a similar issue happen due to a ninja issue, see #12262.
There you could see in "CMakeOutout.log"
you should find a warn: unable to parse implicit include dirs!
My guess is that cmake calls gcc via ninja, and stderr/stdout gets re-ordered sometimes.
Verification
Windows Version
MINGW64_NT-10.0-22621
MINGW environments affected
Expected behavior
It builds
Actual behavior
It fails, sometimes
Repro steps
unclear
Are you willing to submit a PR?
No response
The text was updated successfully, but these errors were encountered: