Closed gracicot closed 2 years ago
@gracicot could you please enable debug logging and run your workflow again? Both for runner and steps should help to understand the root cause of this problem.
@lukka I added the debug logs in my repository, you should be able to download them. Here's the latest output of the actions.
@gracicot thanks for providing additional info! It looks like vcpkg.exe
fails while executing the command vcpkg env
, which is spawned by run-cmake
action in order to obtain the right environment for the MSVC toolset.
I cannot spot what the potential cause of this error is. I'd suggest to use the most recent version of the action (e.g. run-vcpkg@v7
) and try again, but it should not make a difference. The reason may be buries in the environment the command is spawned with, but I could not spot any suspicious.
Updating it to v7
didn't helped. I'll try to use egor-tensin/vs-shell@v2
and see if it helps.
Also, I took the v6
first since that was the version in your examples in your readme, maybe changing it would prevent new users to pick an outdated version?
@lukka I added the egor-tensin/vs-shell
but it didn't helped. As you can see in this action,I added the Print cl.exe
and this is the log:
Run cl.exe
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30040 for x86
usage: cl [ option... ] filename... [ /link linkoption... ]
Copyright (C) Microsoft Corporation. All rights reserved.
The windows version is still failing. I wonder if this is more of a run-vcpkg
problem? Should I open an issue there instead? I would really love to use those for my windows builds too, those actions are super convenient, but this problem is blocking me. If you find any workaround please let me know.
@gracicot the process vcpkg.exe
exits with code 1
, it should be a problem in vcpkg.exe
itself. The code that is failing is located here: https://github.com/microsoft/vcpkg-tool/blob/main/src/vcpkg/commands.env.cpp#L71
Note: have you tried to reproduce the same problem on your local dev box? I think that is the way I would approach this problem. In the logs you provided (i.e. these ones) could see what is the environment, the current directory, and the argument of the spawn vcpkg.exe process. Let me know if you need more info on how to tackle this problem down.
@lukka I could try to reproduce the problem, I'll just need to setup a windows dev box. I will also try to reach the vcpkg devs about this problem too. I will let you know how it goes
@gracicot it may be that you caught an actual problem with vcpkg
, and here I add few considerations by reading briefly the code at https://github.com/microsoft/vcpkg-tool/blame/main/src/vcpkg/commands.env.cpp#L70:
fs.get_directories_non_recursive()
call that is triggering the error is what has been added. path
? This looks like it is, because the path you show in the error is non existent: D:\a\kangaru\kangaru\vcpkg_installed\x64-windows\tools
. I see how it is constructed in here:
auto tools_dir = paths.installed / triplet.to_string() / "tools"
,
where the triplet makes sense, but I do not see where the vcpkg_installed
comes from. I would expect vcpkg
instead, as this is the cwd
when the vcpkg env
command is launched: D:\a\kangaru\kangaru\vcpkg
add_tools
flag, it should work around the problem (as it would not execute the failing code). Of course, to do this in the action, you need to fix its code, so tihs suggestion is whether you want to repro the problem and the workaround locally.@gracicot yes, vcpkg env
command is broken on Windows. Just to let you know, on Linux and on macOS it does nothing, that is the reason it is not broken in there :)
PS D:\\vcpkg> .\vcpkg.exe env --bin --tools --python set
get_directories_non_recursive(D:\vcpkg\installed\x86-windows\tools): The system cannot find the path specified.
Now if you create that directory (e.g. mkdir installed\x86-windows\tools
), then it works fine.
@gracicot reported here: https://github.com/microsoft/vcpkg/issues/19552
Oh thank you very much for your work and research on the problem! I'm sorry the problem ended up here, as it is not yours. I'll try as soon as I can and I'll let you know!
@lukka The workaround worked! I created the directory before running vcpkg and everything is working now. I'm gonna close the issue now, since the problem is actually on the vcpkg side and reported. Thank you very much for your support.
The linux and apple builds works with my configuration, but not the windows one. I'm not sure I understand the error, so I r don't know if it's a bug from run-cmake or a problem in my configurations.
Here' s the error:
Here's my configuration:
Here's the live error. As you can see from that page ubuntu and macos are working correctly.