Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Bundling locales with VS2022 fails because of missing Python instance #697

Open
2 tasks done
ProactiveServices opened this issue Jan 27, 2022 · 9 comments
Open
2 tasks done
Labels
bug Some kind of fixable problem was encountered

Comments

@ProactiveServices
Copy link

Guidelines

  • I have read the guidelines.

Version/Commit hash

40d57bc

Describe the bug.

Windows builds are broken as per your Fediverse account at https://fosstodon.org/@tenacity/107686680219726213

Both PR https://github.com/tenacityteam/tenacity/pull/656 and the recent master commit as above aren't compiling on Windows.

I'm not a developer but know the basics well enough to have set myself up a fresh development environment. Keep in mind I'm not familiar with a build process that is this complex so my analysis may not be accurate. At the very least my build environment is fresh, which may be useful.

Building from PR #656 results in the following CMake output:
PR_656_build_failure.txt

The first "Run Build Command" line fails with LINK : fatal error LNK1104: cannot open file 'm.lib' ninja: build stopped: subcommand failed. I notice that the command has this parameter passed to it: /subsystem:console m.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

I believe the parameters to /subsystem should be enclosed in double quotes, and the omission of the quotes is causing m.lib to be interpreted as an argument to the linker.

In addition, the Visual Studio build process results in the following command failing:
cmd.exe /C "cd /D C:\Users\aD\Desktop\tenacity\out\build\x64-Debug\locale && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory C:/Users/aD/Desktop/tenacity/out/build/x64-Debug/bin/Debug//Languages/bs && C:\Users\aD\Desktop\tenacity\out\build\x64-Debug\packages\python3\3.7.7\tools\python.exe C:/Users/aD/Desktop/tenacity/locale/msgfmt.py -o C:/Users/aD/Desktop/tenacity/out/build/x64-Debug/bin/Debug//Languages/bs/tenacity.mo C:/Users/aD/Desktop/tenacity/locale/bs.po" The system cannot find the path specified.

This seems to attempt to use python to compile the locales, but the build process downloaded a zero-byte file at out\build\x64-Debug\packages\python3\3.7.7\package.zip, with no other files at that location.

Building from commit 40d57bc Jan 26 05:41:32 2022 +0200 results in a different error, but also python-related. The Visual Studio output, and relevant directory listing:
Commit_40d57bcf6237768b30be3c1ae9769e7753652843_build_failure.txt
This is trying to run python from C:\Users\aD\Desktop\tenacity\out\build\x64-Debug\packages\python3\3.9.7\tools\python.exe but there is no 3.9.7 folder, however there is a python.3.9.7 directory which suggests there may be a typo somewhere, with a . instead of a \ in the path name. In this directory looks to be a properly-extracted python install, with python.exe in tools.

Expected behavior

Building on Windows completes successfully.

OS

Windows 10 x64 21H1, Visual Studio 17.0.5 incl. sccache

Additional context

No response

This issue is not a duplicate

  • I have confirmed this issue isn't a duplicate.
@ProactiveServices ProactiveServices added the bug Some kind of fixable problem was encountered label Jan 27, 2022
@Be-ing
Copy link
Contributor

Be-ing commented Jan 27, 2022

Windows CI builds are working.

@AnotherFoxGuy
Copy link
Contributor

Windows CI builds are working.

But we don't run any ci builds on VS 2022

@n0toose
Copy link
Member

n0toose commented Jan 28, 2022

Clarification: Builds aren't broken as per the message I communicated on the Fosstodon account -- the pull request in particular was, due to DLL linking reasons and not because of the Python problem you brought up, which honestly kind of boggles me.

@n0toose
Copy link
Member

n0toose commented Jan 28, 2022

The CI Windows builds that you may have seen fail as of late were mostly because of a temporary inability to... download 7-Zip.

@n0toose n0toose changed the title Windows builds broken Bundling locales with VS2022 fails because of missing Python instance Jan 28, 2022
@n0toose
Copy link
Member

n0toose commented Jan 28, 2022

The reason why I asked whether this error also happens on the master tree is, because, as @Be-ing said, "Windows builds are working", which indicates that there is some sort of problem with your development environment. Apologies for not clarifying everything I've said here earlier while talking to you in private, it's just that I was also extremely confused by what you were describing to me and you laying it all out over here also made it clear what the problem is, more or less.

@Be-ing
Copy link
Contributor

Be-ing commented Jan 28, 2022

there is some sort of problem with your development environment

Perhaps, but it's also plausible that there's something different about @ProactiveServices's environment that Tenacity's build system should be able to handle.

@ProactiveServices
Copy link
Author

I've only set up the environment and tried building to help out @n0toose - happy to provide any more information or try out any suggestions. It's not preventing me from doing anything. The python fault doesn't seem like the sort of thing I could have caused through inexperience with setting up this sort of build environment, though, so is at least a curiosity :-)

@n0toose
Copy link
Member

n0toose commented Jan 30, 2022

but it's also plausible that there's something different about @ProactiveServices's environment that Tenacity's build system should be able to handle.

Agreed, I'm just really unsure as to how I can actually reproduce this.

@n0toose
Copy link
Member

n0toose commented Jan 30, 2022

The python fault doesn't seem like the sort of thing I could have caused through inexperience with setting up this sort of build environment, though, so is at least a curiosity :-)

Sorry, didn't mean to come across like that. Thanks for reporting this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Some kind of fixable problem was encountered
Projects
None yet
Development

No branches or pull requests

4 participants