Trying to setup KiCad Build Environment on Win11: vcpkg install failed

Hi,
I am trying to setup a build environment for KiCad according to the official build documentation on a new Win11 pro computer. Basically a clean install. There is no (other) version of python installed on the machine. Locale is German.

Kicad Source is cloned from git to ``O:\src`.

Vcpkg resides in O:\src\vcpkg by cloning from github (as in description).

O:\src\CMakeSettings.json has path to vcpkg:

{
 ...
        {
            "environment": "vcpkg",
            "VcPkgDir": "O:/src/vcpkg/"
        }

CMake is giving me these two errors upon configuring the build environment:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
1> [CMake]     Command failed: O:/src/vcpkg/downloads/tools/python/python-3.12.7-x64-1/python.exe O:/src/vcpkg/buildtrees/wxpython/src/8854625dd8-861bd167bd.clean/public/get-pip.py --no-warn-script-location
1> [CMake]     Working Directory: O:/src/vcpkg/buildtrees/wxpython
1> [CMake]     Error code: 1
1> [CMake]     See logs for more information:
1> [CMake]       O:\src\vcpkg\buildtrees\wxpython\get-pip-x64-windows-err.log
1> [CMake] 
1> [CMake] Call Stack (most recent call first):
1> [CMake]   O:/src/build/x64-Debug/vcpkg_installed/x64-windows/share/vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake:48 (vcpkg_execute_required_process)
1> [CMake]   C:/Users/Me/AppData/Local/vcpkg/registries/git-trees/feabd68376664732bb0ae763c33daaf3a2427ac5/portfile.cmake:35 (x_vcpkg_get_python_packages)
1> [CMake]   scripts/ports.cmake:196 (include)
1> [CMake] error: building wxpython:x64-windows failed with: BUILD_FAILED
1> [CMake] See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
1> [CMake] Elapsed time to handle wxpython:x64-windows: 1.3 min
1> [CMake] Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
1> [CMake] Then check for known issues at:
1> [CMake]   https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+wxpython
1> [CMake] You can submit a new issue at:
1> [CMake]   https://github.com/microsoft/vcpkg/issues/new?title=[wxpython]+Build+error+on+x64-windows&body=Copy%20issue%20body%20from%20O%3A%2Fsrc%2Fbuild%2Fx64-Debug%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md
1> [CMake] 
1> [CMake] -- Running vcpkg install - failed
1> [CMake] CMake Error at vcpkg/scripts/buildsystems/vcpkg.cmake:904 (message):
1> [CMake]   vcpkg install failed.  See logs for more information:
1> [CMake]   O:\src\build\x64-Debug\vcpkg-manifest-install.log
1> [CMake] Call Stack (most recent call first):
1> [CMake]   C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/CMakeDetermineSystem.cmake:146 (include)
1> [CMake]   CMakeLists.txt:47 (project)
1> [CMake] -- Configuring incomplete, errors occurred!

Vcpkg was checked out from github, so it should be the latest version. This doesn’t give me any clues:

O:\src\vcpkg>git pull
Already up to date.

O:\src\vcpkg>vcpkg update
the update command does not currently support manifest mode. Instead, modify your vcpkg.json and run install.
note: updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.

Have also tried to run bootstrap-vcpkg again. But that doesn’t help either.

The two log files mentioned above look like this:
O:\src\vcpkg\buildtrees\wxpython\get-pip-x64-windows-err.log :

Traceback (most recent call last):
  File "O:\src\vcpkg\buildtrees\wxpython\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 33324, in <module>
    main()
  File "O:\src\vcpkg\buildtrees\wxpython\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 135, in main
    bootstrap(tmpdir=tmpdir)
  File "O:\src\vcpkg\buildtrees\wxpython\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 111, in bootstrap
    monkeypatch_for_cert(tmpdir)
  File "O:\src\vcpkg\buildtrees\wxpython\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 92, in monkeypatch_for_cert
    from pip._internal.commands.install import InstallCommand
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\commands\__init__.py", line 9, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\cli\base_command.py", line 15, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\cli\cmdoptions.py", line 23, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\cli\parser.py", line 12, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\configuration.py", line 26, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\utils\logging.py", line 27, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\utils\misc.py", line 39, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\locations\__init__.py", line 14, in <module>
  File "C:\Users\Me\AppData\Local\Temp\tmpneu4gmkd\pip.zip\pip\_internal\locations\_distutils.py", line 9, in <module>
ModuleNotFoundError: No module named 'distutils'

The file O:\src\build\x64-Debug\vcpkg-manifest-install.log contains the following error:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: O:/src/vcpkg/downloads/tools/python/python-3.12.7-x64-1/python.exe O:/src/vcpkg/buildtrees/wxpython/src/8854625dd8-861bd167bd.clean/public/get-pip.py --no-warn-script-location
    Working Directory: O:/src/vcpkg/buildtrees/wxpython
    Error code: 1
    See logs for more information:
      O:\src\vcpkg\buildtrees\wxpython\get-pip-x64-windows-err.log

Call Stack (most recent call first):
  O:/src/build/x64-Debug/vcpkg_installed/x64-windows/share/vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake:48 (vcpkg_execute_required_process)
  C:/Users/Me/AppData/Local/vcpkg/registries/git-trees/feabd68376664732bb0ae763c33daaf3a2427ac5/portfile.cmake:35 (x_vcpkg_get_python_packages)
  scripts/ports.cmake:196 (include)

error: building wxpython:x64-windows failed with: BUILD_FAILED

Anybody experience the same issue?

O yea, you can’t use the latest vcpkg currently because of the shitshow known as python support.

Checkout a version of vcpkg from August.

I have pushed a ducktape solution to avoid the conflict with a newer vcpkg root. Eventually this will be less of a problem when we drop python support.

As far as I can tell git checkout 2024.09.30 of the vcpkg repository will get you the newest working version. I am successfully compiling with that version.

I think I misunderstood @marekr . It looks like the latest update to the
kicad-vcpkg-registry
implements a workaround. So, now we can use the newest version of vcpkg again?

Is there an alternative replacement planned?

Dear @marekr,
I have removed the vcpkg- Folder and started off again with a git clone --tag 2024.08.23 ...
CMake finished successfully with configuration this morning. :slightly_smiling_face: :upside_down_face:

Have to continue with modifying my launch.vs.json later tonight…

Thanks a lot for your advice ! :+1: :+1:

Yes

1 Like