microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.26k stars 6.17k forks source link

[tomlplusplus] Build error on x64-windows #39035

Open Repflez opened 1 month ago

Repflez commented 1 month ago

Package: tomlplusplus:x64-windows@3.4.0

Host Environment

To Reproduce

vcpkg install Failure logs

-- Using cached marzer-tomlplusplus-v3.4.0.tar.gz.
-- Extracting source C:/Users/repfl/AppData/Local/vcpkg/downloads/marzer-tomlplusplus-v3.4.0.tar.gz
-- Applying patch fix-android-fileapi.patch
-- Using source at C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/vcpkg/blds/tomlplusplus/src/v3.4.0-52dc53a92a.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Configuring x64-windows-dbg
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1~2.1.0-1-any.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.
-- Using msys root at C:/Users/repfl/AppData/Local/vcpkg/downloads/tools/msys2/fdbea3694fb5c0d4
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: C:/Users/repfl/AppData/Local/Microsoft/WindowsApps/python.exe -I C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/x64-windows/tools/meson/meson.py -Dgenerate_cmake_config=false -Dbuild_tests=false -Dbuild_examples=false --backend ninja --wrap-mode nodownload -Dbuildtype=plain -Doptimization=plain --libdir lib --native C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/vcpkg/blds/tomlplusplus/meson-x64-windows-dbg.log -Ddebug=true --prefix C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/vcpkg/pkgs/tomlplusplus_x64-windows/debug --includedir ../include -Dcmake_prefix_path=['C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/x64-windows/debug','C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/x64-windows','C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/x64-windows/share'] C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/vcpkg/blds/tomlplusplus/src/v3.4.0-52dc53a92a.clean
    Working Directory: C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/vcpkg/blds/tomlplusplus/x64-windows-dbg
    Error code: 1
    See logs for more information:
      C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\config-x64-windows-dbg-meson-log.txt.log
      C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\config-x64-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_meson.cmake:436 (vcpkg_execute_required_process)
  C:/Users/repfl/AppData/Local/vcpkg/registries/git-trees/9866e66fa79aa1addd508e672062392313fc6085/portfile.cmake:11 (vcpkg_configure_meson)
  scripts/ports.cmake:175 (include)
C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\config-x64-windows-dbg-out.log ``` WARNING: Recommend using either -Dbuildtype or -Doptimization + -Ddebug. Using both is redundant since they override each other. See: https://mesonbuild.com/Builtin-options.html#build-type-options The Meson build system Version: 0.62.1 Source dir: C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\src\v3.4.0-52dc53a92a.clean Build dir: C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\x64-windows-dbg Build type: native build ..\src\v3.4.0-52dc53a92a.clean\meson.build:6:0: ERROR: Value "plain" (of type "string") for combo option "Optimization level" is not one of the choices. Possible choices are (as string): "0", "g", "1", "2", "3", "s". A full log can be found at C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\x64-windows-dbg\meson-logs\meson-log.txt ```
C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\config-x64-windows-dbg-meson-log.txt.log ``` Build started at 2024-05-30T00:09:35.650083 Main binary: C:\Users\repfl\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe Build Options: -Dgenerate_cmake_config=false -Dbuild_tests=false -Dbuild_examples=false -Dbuildtype=plain -Doptimization=plain -Ddebug=true '-Dcmake_prefix_path=['"'"'C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/x64-windows/debug'"'"','"'"'C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/x64-windows'"'"','"'"'C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/x64-windows/share'"'"']' -Dprefix=C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/vcpkg/pkgs/tomlplusplus_x64-windows/debug -Dincludedir=../include -Dlibdir=lib -Dbackend=ninja -Dwrap_mode=nodownload '--native-file C:/Users/repfl/source/repos/AzureFlare/vcpkg_installed/vcpkg/blds/tomlplusplus/meson-x64-windows-dbg.log' Python system: Windows The Meson build system Version: 0.62.1 Source dir: C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\src\v3.4.0-52dc53a92a.clean Build dir: C:\Users\repfl\source\repos\AzureFlare\vcpkg_installed\vcpkg\blds\tomlplusplus\x64-windows-dbg Build type: native build ..\src\v3.4.0-52dc53a92a.clean\meson.build:6:0: ERROR: Value "plain" (of type "string") for combo option "Optimization level" is not one of the choices. Possible choices are (as string): "0", "g", "1", "2", "3", "s". ```

Additional context

vcpkg.json ``` { "dependencies": [ "detours", "tomlplusplus" ] } ```
dg0yt commented 1 month ago

The Meson build system Version: 0.62.1

Outdated.

  • vcpkg-tool version: 2024-03-14-7d353e869753e5609a1f1a057df3db8fd356e49d vcpkg-readonly: true vcpkg-scripts version: 7f9f0e4

Outdated.

WangWeiLin-MV commented 1 month ago

Using the latest version of vcpkg for local installation does not reproduce the issue.

Please try with latest vcpkg.

raimund-schluessler commented 1 month ago

The Meson build system Version: 0.62.1

Outdated.

While this certainly is technically true, it doesn't necessarily help to intonate this as an accusation, since it is installed automatically by vcpkg, as far as I can tell. At least, I didn't specify meson 0.63 anywhere in my project or vcpkg config, but still ended up with it, automatically installed by vcpkg. Of course, I might be wrong, I am by far no vcpkg expert.

However, in my case, it kind of is a part of the puzzle, since meson 0.63 is not compatible with Python 3.12, which I recently had upgraded to globally on my system. The question to me is, why vcpkg uses (or interferes) with the global Python installation and doesn't use Python 3.11 which it ships itself (and would be compatible with meson 0.63).

So, for now, the workaround is to downgrade to Python 3.11 globally.

The real fix should probably make vcpkg use the Python interpreter it ships itself, and later include an upgrade to a recent meson version for whatever package requests this outdated version.

Edit: This was tested with the latest vcpkg release 2024.05.24.

dg0yt commented 1 month ago

While this certainly is technically true, it doesn't necessarily help to intonate this as an accusation

As a quick response, I'm only elaborating facts which are easily overlooked, to shortcut the way through the puzzle. There is no need to take this as accusation. But there shouldn't be high expectations about getting fixes for a combination of old versions.

Edit: This was tested with the latest vcpkg release 2024.05.24.

Releases. They make it easy to pin, but make it hard to get bug fixes quickly. Microsoft on vcpkg releases: https://github.com/microsoft/vcpkg/discussions/38964#discussioncomment-9609051

raimund-schluessler commented 1 month ago

While this certainly is technically true, it doesn't necessarily help to intonate this as an accusation

As a quick response, I'm only elaborating facts which are easily overlooked, to shortcut the way through the puzzle. There is no need to take this as accusation. But there shouldn't be high expectations about getting fixes for a combination of old versions.

Sorry, if I interpreted this the wrong way. Is there any possibility to upgrade this dependency as a user?

Edit: This was tested with the latest vcpkg release 2024.05.24.

Releases. They make it easy to pin, but make it hard to get bug fixes quickly. Microsoft on vcpkg releases: #38964 (reply in thread)

I also tested it with latest master, which gives the same result for me.

dg0yt commented 1 month ago

Is there any possibility to upgrade this dependency as a user?

These are the steps to the upgrade a classic mode installation:

  1. Get the latest head of master via git. It doesn't get less testing than any release. Actually it has been tested more often and more recently. (There can be regessions, but usually these will be fixed in master quickly.) From an existing clone dir:
    git checkout master
    git pull
  2. Update the tool(s).
    .\bootstrap-vcpkg.bat

    This step would update the reported "vcpkg-tool version".

  3. Update the installed ports.
    vcpkg upgrade [-no-dry-run]

    This step is crucial to not continue using outdated tools and scripts (such as meson) which live in the installed tree. (However it is not transactional. It will first remove all packages which need updates and then build them again. A network or build error can stop the process.)

For reporting errors, it might be more safe and simple to try the process in a fresh checkout from git.

Manifest mode depends on the versions determined by baseline and constraineds. Here you might need to update the baseline.

And to add more complications for updates, there is a variant of vcpkg bundled with some versions of Visual Studio. (Can't say more, I'm not using VS. Maybe that's the background of the reported "vcpkg-readonly: true".)

github-actions[bot] commented 5 days ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.