Vcpkg x64 packages installation

In the instructions on how to compile KiCad in Windows using MSVC it’s stated that if one sets the environment variable VCPKG_DEFAULT_TRIPLET to “x64-windows” one shouldn’t need to specify that every package shall be installed with the x64 option.

This did not work for me. I have double checked and there are no blank spaces or such in the variable name or value.

I ran the command:
./vcpkg install boost cairo curl glew gettext glm icu libxslt ngspice opencascade opengl openssl python3 wxpython wxwidgets zlib

But the x86 versions was installed anyway. Going back to the output of the vcpkg install command I can see that it did indeed choose the x86 versions:
$ ./vcpkg install boost cairo curl glew gettext glm icu libxslt ngspice opencascade opengl openssl python3 wxpython wxwidgets zlib
Computing installation plan…
A suitable version of cmake was not found (required v3.20.0). Downloading portable cmake v3.20.0…
Downloading cmake…
https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2-windows-i386.zip -> C:\git\other-repos\vcpkg\downloads\cmake-3.20.2-windows-i386.zip
Extracting cmake…
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0…
Downloading 7zip…
https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> C:\git\other-repos\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip…
A suitable version of nuget was not found (required v5.5.0). Downloading portable nuget v5.5.0…
Downloading nuget…
https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe -> C:\git\other-repos\vcpkg\downloads\22ea847d-nuget.exe
The following packages will be built and installed:
boost[core]:x86-windows -> 1.75.0

  • boost-accumulators[core]:x86-windows -> 1.75.0
  • boost-algorithm[core]:x86-windows -> 1.75.0
  • boost-align[core]:x86-windows -> 1.75.0
  • boost-any[core]:x86-windows -> 1.75.0
  • boost-array[core]:x86-windows -> 1.75.0
  • boost-asio[core]:x86-windows -> 1.75.0#1
  • boost-assert[core]:x86-windows -> 1.75.0
  • boost-assign[core]:x86-windows -> 1.75.0
  • boost-atomic[core]:x86-windows -> 1.75.0#1
  • boost-beast[core]:x86-windows -> 1.75.0
  • boost-bimap[core]:x86-windows -> 1.75.0
  • boost-bind[core]:x86-windows -> 1.75.0
  • boost-build[core]:x64-windows -> 1.75.0
  • boost-callable-traits[core]:x86-windows -> 1.75.0
  • boost-chrono[core]:x86-windows -> 1.75.0#1

I’m now solving this by instead running the command:
./vcpkg install boost:x64-windows cairo:x64-windows curl:x64-windows glew:x64-windows gettext:x64-windows glm:x64-windows icu:x64-windows libxslt:x64-windows ngspice:x64-windows opencascade:x64-windows opengl:x64-windows python3:x64-windows wxpython:x64-windows wxwidgets:x64-windows zlib:x64-windows

Just thought this was worth to mention to others, since the installation took over three hours.

I used a MINGW64 shell when I ran this command. Just double checked and it seems to find the environment variable just fine:
Albin@LAPTOP-3ROM0OTF MINGW64 /c/git
$ printenv.exe VCPKG_DEFAULT_TRIPLET
x64-windows

Vcpkg_environment_variable

IIRC I had to restart my pc for vcpkg to pick up the variable. Even though the shell it was running from saw it, vcpkg itself didnt.

vcpkg is meant to be used with Windows normally. Mixing the mingw shell can actually break vcpkg builds which use a copy of mingw internally for a small number of ports that need bash to preprocess compilation. (MSVC is always used for building)

In either case I am sitting on the edge of switching kicad to vcpkg manifest mode that’ll simplify things a fair bit.

I’m not one to compile such a program but I am curious; what is the benefit of compiling your own?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.