Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcpkg now requires a builtin-baseline entry in vcpkg.json (or a separate vcpkg-configuration.json file) #446

Open
cube1us opened this issue Feb 2, 2025 · 3 comments

Comments

@cube1us
Copy link

cube1us commented Feb 2, 2025

After installing vcpkg and running the .bat inside to haul down vcpkg.exe, and setting VCPKG_ROOT, I cloned the project from Github per the instructions

But when I try to process CMakeLists.txt I get the following error (see after the dashes, below), and the log file contains the same reference.

Earlier, after getting this the first time, I also tried running the PDP11.vcxproj, which worked for a "Debug" target, but failed with what seems to be a typical libpng error for a "Release" target. I then removed everthing, installed vcpkg set VCPKG_ROOT, and got the same error -- vcpkg seems to be installed as part of VS 2022 as well, in my case at C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg.

So, then I tried pointing VCPKG_ROOT at C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg , and got the same error.

The sometimes helpful Google AI suggests:

Add "builtin-baseline" to your manifest file:

   Open your vcpkg.json manifest file. 

Add a line like this within the JSON object: "builtin-baseline": "".
Replace with the appropriate commit hash from the vcpkg repository.

I found a workaround for this. vcpkg has an EXPERIMENTAL command to add the necessary baseline identification:

vcpkg x-update-baseline --add-initial-baseline
updated registry 'https://github.com/microsoft/vcpkg': baseline '' -> '0ca64b4e1c70fa6d9f53b369b8f3f0843797c20c'

It added this to the vcpkg.json file, at the end, replacing the last lines with ] and } with the following:

  ],
  "builtin-baseline": "0ca64b4e1c70fa6d9f53b369b8f3f0843797c20c"
}

The possible issue I see with this is that particular commit of the modules used by open simh was of couse not tested by the open simh developers.

JRJ


1> CMake generation started for default configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="D:\Users\jay\VisualStudioProjects\simh\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\Users\jay\VisualStudioProjects\simh" 2>&1"
1> Working directory: D:\Users\jay\VisualStudioProjects\simh\out\build\x64-Debug
1> [CMake] -- CMAKE_MODULE_PATH: D:/Users/jay/VisualStudioProjects/simh/cmake;D:/Users/jay/VisualStudioProjects/simh/cmake/installer-customizations
1> [CMake] -- SIMH_CMAKE_TOOLCHAIN_FILE is C:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake
1> [CMake] -- Executing deferred vcpkg toolchain initialization.
1> [CMake] .. VCPKG target triplet is x64-windows-static
1> [CMake] .. VCPKG_CRT_LINKAGE is static
1> [CMake] -- Running vcpkg install

*** ERROR HERE ***
1> [CMake] error: this vcpkg instance requires a manifest with a specified baseline in order to interact with ports. Please add 'builtin-baseline' to the manifest or add a 'vcpkg-configuration.json' that redefines the default registry.
1> [CMake] -- Running vcpkg install - failed
1> [CMake] CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:904 (message):
1> [CMake] vcpkg install failed. See logs for more information:
1> [CMake] D:\Users\jay\VisualStudioProjects\simh\out\build\x64-Debug\vcpkg-manifest-install.log
1> [CMake] Call Stack (most recent call first):
1> [CMake] cmake/vcpkg-setup.cmake:88 (include)
1> [CMake] CMakeLists.txt:85 (include)
1> [CMake] -- Configuring incomplete, errors occurred!
1> 'C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="D:\Users\jay\VisualStudioProjects\simh\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\Users\jay\VisualStudioProjects\simh" 2>&1"' execution failed with error: ''C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="D:\Users\jay\VisualStudioProjects\simh\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\Users\jay\VisualStudioProjects\simh" 2>&1"' returned with exit code: 1'.

@LegalizeAdulthood
Copy link

LegalizeAdulthood commented Feb 3, 2025

IMO, this is why it's better to use vcpkg as a submodule instead of putting the onus on the user to download and configure it.

With a submodule, the project gets to control the version of vcpkg and the expected behavior.

If the user doesn't want to use vcpkg, then they don't need to initialize and update the submodule.

@cube1us
Copy link
Author

cube1us commented Feb 3, 2025

Well said - I had the same thought - it would give the project better control, and remove one variable making it harder to reproduce a given problem, besides removing a "trap for young players" as EEVBLOG puts it. If it turns out a dependency being updated, then all the project wouild need to do is update the appropriate .json file.

JRJ

@LegalizeAdulthood
Copy link

@cube1us Yeah, I forgot about that as well -- when you control vcpkg via a submodule you're also controlling the version of the recipes used to obtain dependencies. Users get a consistent experience with CI builds too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants