Run into a problem trying to build from source with Visual Studio. I may have committed a faux pas by asking for help in the mailing list before posting in the forum! But I’ll start the same post here too and post any solution if I get one before someone here works it out.
Firstly, I’m unfamiliar with Visual Studio (not used it since VS 6.0) and the various tools that go along with modern development using VS. So the chances are, there’s a problem here of my own making.
Anyway, I have followed the build process step-by-step as laid out in “Building using Visual Studio (2019, 2022)”, but have been tripped up by the Python package.
The first error is
“error: building wxpython:x64-windows failed with: BUILD_FAILED” in the CMake output window within Visual Studio. A little before this, the line “See logs for more information:” points me to the “D:\External_Gitlab_Projects\vcpkg\buildtrees\wxpython\get-pip-x64-windows-err.log” file. This logfile ends with:
"
File “C:\Users\PolyV\AppData\Local\Temp\tmp9hhvjdrc\pip.zip\pip_internal\locations_distutils.py”, line 9, in
ModuleNotFoundError: No module named ‘distutils’
"
One “solution” that I found suggested somewhere was was uninstall all python distributions from my machine and try again - this didn’t work. Everything else I’ve found related to these error messages has failed to provide me with any information I can use.
Ah - so it may be that I’ve just decided to look into developing at the wrong time! A similar suggestion was made on the mailing list, but I was a bit hazy on what I was being instructed to do, and whether I could do it correctly. I’ll see what I can figure out over the next few days if I get a chance… Busy couple of weeks, so I might not be able to look into this again for a wee bit.
So - I couldn’t resist a fiddle while I was drinking my coffee and preparing to dive into report writing!
I’m not great with GIT - I find it pretty confusing at the best of times, typically using the minimum of features to track my own projects, so I was unsure how to roll back to earlier vcpkg versions. I also use TortoiseGIT because my command line skills got rusty a long time ago!
Anyway - I deleted vcpkg and kicad folders to be sure I’m on a clean slate again (3rd time I’ve resorted to this now). I then cloned vcpkg again and in TortoiseGIT showed the log, and then right clicked on the last entry for 30/09/2024 and selected “Reset Master to this”. I think this has rolled me back to the end of last month?
I’m just about to set Visual Studio going to fetch and compile all the dependencies from scratch again… so I’ll report back some time later!
I have identified this as the problem from my googling too - but don’t know how to implement a fix that will work with the procedure to set-up a KiCAD build environment and not have any unwanted side effects that’ll bite me in the bum later (or immediately, as the case may be!)
After a fairly short time, I get “error: building wxpython:x64-windows failed with: BUILD_FAILED”
and in D:\External_Gitlab_Projects\vcpkg\buildtrees\wxpython\get-pip-x64-windows-err.log
“ModuleNotFoundError: No module named ‘distutils’”
@marekr - I saw your mailing list post: “I pinned vcpkg-get-python-packages in the kicad repo to the older version, might work” so tried again with the up to date vcpkg. I’m not sure if I’m using the right KiCAD repo to benefit from your pin though? ( [KiCad / KiCad Source Code / kicad] ).
Anyway, same result - problems with missing distutils. I see the following in the CMake output:
My post referencing 3.12.7 was using the up to date vcpkg to see if your pinning had worked. However, now you’ve told me where to look, I can verify that my method of trying to revert to an earlier version of vcpkg (preceding post) is incorrect: “in TortoiseGit: show log, right-click last entry for Sept '24, “reset master to this”.”
Clearly my git-fu is inferior - I’ll try and figure out how to revert properly.
You know - while I was fumbling about earlier, I tried that. But because it didn’t indicate changes to any files, I assumed it hadn’t done what I wanted it to! I can now verify that the Python version has changed to “program_version 3.11.8”.
Yay - that got me past the wxPython troubles. Now I have a different problem, but that’s not really appropriate to discuss in this thread. Thanks for the help : )