openMSX
openMSX copied to clipboard
Impossible to build OpenMSX
Following the OpenMSX Compilation Guide available here, it is impossible to build OpenMSX on Windows using both MSYS2 or Visual Studio for different reasons: some dependency packages are not available online at the specified download address anymore, impossible to find Python even though it is installed and added to PATH... Could we get a clear step by step instruction guide on how to build OpenMSX?
Hi,
Can you be more specific on what is going wrong?
The thing is, none of the developers are Windows users. But we got the Windows build to work on GitHub Actions. So, if you are able to perform the steps from that, you should be able to do it. And with these steps and your experiences, we can improve the documentation. So, please be very concrete about what you're running into and what it is that is different from the steps on the GitHub Actions. See https://github.com/openMSX/openMSX/blob/master/.github/actions/build/action.yml There is both a MinGW build and a Visual Studio based build done in there.
I build the nightlies for openMSX - I will share my compiler script with you based on the latest visual studio On Dec 21, 2023, at 19:10, Steven M @.***> wrote: Following the OpenMSX Compilation Guide available here, it is impossible to build OpenMSX on Windows using both MSYS2 or Visual Studio for different reasons: some dependency packages are not available online at the specified download address anymore, impossible to find Python even though it is installed and added to PATH... Could we get a clear step by step instruction guide on how to build OpenMSX?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
@MBilderbeek Sorry, I should have shared my environment details earlier. I'm running Visual Studio 2023 / MSYS2 20231026 on Windows 11 Build 22631.2861. I did Google a bit the issue and found that I needed to install Qt as well to build on Windows with Visual Studio? I haven't installed Qt yet though, just cleaned up my PC a couple of days ago. Looking into the Github actions now.
@Vampier that would be much appreciated. Thank you.
I assumed that you were talking about openMSX, not another application like Catapult or the separate debugger. In that case, you do not need Qt.
Are you building the latest git code?
Yes, I was trying to build OpenMSX only from the latest Git codebase.
Good, then no Qt needed at all. Just tell us what exactly you are running into and we can try to help. As we are building for windows automatically, I still think that method must be working also for you.
@MBilderbeek Looking at the Github Actions, I have no issue downloading Windows dependencies and building them but running msbuild /m /p:Configuration=Release /p:Platform=x64 build\msvc\openmsx.sln /m
will throw this error:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for '..\..\src\openmsx.hh' exited with code 9009
Looking at the file in question:
<CustomBuild Condition ="'@(_CustomBuild)' != ''"
Sources ="@(_CustomBuild)"
BuildSuffix ="$(_BuildSuffix)"
MinimalRebuildFromTracking ="false"
AcceptableNonZeroExitCodes ="%(_CustomBuild.AcceptableNonZeroExitCodes)"
StdOutEncoding = "%(_CustomBuild.StdOutEncoding)"
StdErrEncoding = "%(_CustomBuild.StdErrEncoding)"
>
</CustomBuild>
Using MinGW to build OpenMSX failed when downloading the package pkg-config-0.29.2.tar.gz
with error: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006 error
Downloading the package manually and placing it in the proper directory fixed this issue but later in the process I get:
make -C derived/x86_64-mingw-w64-opt-3rd/3rdparty/build/pkg-config-0.29.2
make[3]: Entering directory '/c/Users/Steven/source/repos/openmsx/derived/x86_64-mingw-w64-opt-3rd/3rdparty/build/pkg-config-0.29.2'
Makefile:312: *** missing separator. Stop.
make[3]: Leaving directory '/c/Users/Steven/source/repos/openmsx/derived/x86_64-mingw-w64-opt-3rd/3rdparty/build/pkg-config-0.29.2'
make[2]: *** [build/3rdparty.mk:156: derived/x86_64-mingw-w64-opt-3rd/3rdparty/timestamps/build-pkg-config-0.29.2] Error 2
make[2]: Leaving directory '/c/Users/Steven/source/repos/openmsx'
make[1]: *** [build/main.mk:624: run-3rdparty] Error 2
make[1]: Leaving directory '/c/Users/Steven/source/repos/openmsx'
make: *** [build/main.mk:614: 3rdparty] Error 2
@MBilderbeek Looking at the Github Actions, I have no issue downloading Windows dependencies and building them but running
msbuild /m /p:Configuration=Release /p:Platform=x64 build\msvc\openmsx.sln /m
will throw this error:C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for '..\..\src\openmsx.hh' exited with code 9009
Looking at the file in question:
<CustomBuild Condition ="'@(_CustomBuild)' != ''" Sources ="@(_CustomBuild)" BuildSuffix ="$(_BuildSuffix)" MinimalRebuildFromTracking ="false" AcceptableNonZeroExitCodes ="%(_CustomBuild.AcceptableNonZeroExitCodes)" StdOutEncoding = "%(_CustomBuild.StdOutEncoding)" StdErrEncoding = "%(_CustomBuild.StdErrEncoding)" > </CustomBuild>
What can I say? It works on GitHub Actions, so I'm not sure what's going wrong. That error code seems to be a 'file not found' but I can't see which command was running and which file was not found. I'm not running Windows myself, so I can't try it (hence my pointing to GitHub Actions).
Using MinGW to build OpenMSX failed when downloading the package
pkg-config-0.29.2.tar.gz
with error:urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006 error
Downloading the package manually and placing it in the proper directory fixed this issue but later in the process I get:
make -C derived/x86_64-mingw-w64-opt-3rd/3rdparty/build/pkg-config-0.29.2 make[3]: Entering directory '/c/Users/Steven/source/repos/openmsx/derived/x86_64-mingw-w64-opt-3rd/3rdparty/build/pkg-config-0.29.2' Makefile:312: *** missing separator. Stop. make[3]: Leaving directory '/c/Users/Steven/source/repos/openmsx/derived/x86_64-mingw-w64-opt-3rd/3rdparty/build/pkg-config-0.29.2' make[2]: *** [build/3rdparty.mk:156: derived/x86_64-mingw-w64-opt-3rd/3rdparty/timestamps/build-pkg-config-0.29.2] Error 2 make[2]: Leaving directory '/c/Users/Steven/source/repos/openmsx' make[1]: *** [build/main.mk:624: run-3rdparty] Error 2 make[1]: Leaving directory '/c/Users/Steven/source/repos/openmsx' make: *** [build/main.mk:614: 3rdparty] Error 2
Also strange. The same file is downloaded from Linux just fine. We cross-compile on Linux to Windows on GitHub Actions.
Yes, when building from WSL (Windows Subsystem for Linux), I had no issue downloading dependencies. The reason I don't run WSL anymore (or at least right now) is because it disables overclocking and hurt performance in some games I run on my PC.
I used the Github Actions to build with MSBuild but still got the same errors. Could be that OpenMSX uses a previous version of VC++ that I'm missing in my VS install? I will investigate further to find out.
You can see which version is used on the GitHub Actions runners overview: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md Looks like it's Visual Studio Enterprise 2022 (we use windows-latest).
Any news?
I haven't looked into it lately. Will try to build again later tonight and update my comment.
Any results?
Sorry for the late reply, I finally got around testing it. Using the latest code base I don't have any issue building dependencies with python build\thirdparty_download.py windows
but MSBuild still throws its temper with Python.
EDIT 1: After some investigation the solution about "Python not found" was to disable its application execution aliases in Settings. Now still running into another Python related issue.
EDIT 2: IT IS BUILDING! The issue preventing the build was that the MSVC related files referenced the Python executable as "python3" in command line instead of "python" (there is no python3.exe on Windows). Maybe using "py" instead to be version agnostic would fix this?
So just to recap running msbuild /m /p:Configuration=Release /p:Platform=x64 build\3rdparty\3rdparty.sln /m
and msbuild /m /p:Configuration=Release /p:Platform=x64 build\msvc\openmsx.sln /m
works in the Developper Command Prompt on Windows now.
Apparently on the GitHub runners there is python3.exe
....
Yeah I don't know what that might be. The official Python installer on Windows creates a Python3 folder with a Python.exe file in it but no Python3.exe to be found
If you have any suggestions on how to improve the documentation (or other parts of openMSX), feel free to submit a pull request.
Considering this closed. But documentation improvement suggestions are still most welcome. (Especially in the form of a Pull Request.)
Been a bit busy lately but I will definitely add to the documentation as soon as possible