tenacityteam / tenacity-legacy

THIS REPO IS NOT MAINTAINED ANYMORE. Please see https://codeberg.org/tenacityteam/tenacity for Tenacity, which is maintained.
https://tenacityaudio.org
Other
6.8k stars 262 forks source link

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

Open ProactiveServices opened 2 years ago

ProactiveServices commented 2 years ago

Guidelines

Version/Commit hash

40d57bcf6237768b30be3c1ae9769e7753652843

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 40d57bcf6237768b30be3c1ae9769e7753652843 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

Be-ing commented 2 years ago

Windows CI builds are working.

AnotherFoxGuy commented 2 years ago

Windows CI builds are working.

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

n0toose commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.