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

[corrade] Fix build error on vs2019 #20655

Merged

Conversation

NancyLi1013
Copy link
Contributor

Describe the pull request

  • What does your PR fix?

    On our unstable test, corrade failed with the following error:
FAILED: src/Corrade/Utility/CMakeFiles/CorradeUtilityObjects.dir/TweakableParser.cpp.obj 
"E:\Visual Studio\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"   /TP -DCORRADE_IS_DEBUG_BUILD -DCorradeUtilityObjects_EXPORTS -DNOMINMAX -DUNICODE -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -IC:\vcpkg_1011\vcpkg\buildtrees\corrade\src\v2020.06-2e11614b58\src -IC:\vcpkg_1011\vcpkg\buildtrees\corrade\x64-windows-dbg\src /nologo /DWIN32 /D_WINDOWS  /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  /W4 /wd4251 /wd4244 /wd4267 /wd4351 /wd4373 /wd4510 /wd4610 /wd4512 /wd4661 /wd4702 /wd4706 /wd4800 /wd4910 /showIncludes /Fosrc\Corrade\Utility\CMakeFiles\CorradeUtilityObjects.dir\TweakableParser.cpp.obj /Fdsrc\Corrade\Utility\CMakeFiles\CorradeUtilityObjects.dir\ /FS -c C:\vcpkg_1011\vcpkg\buildtrees\corrade\src\v2020.06-2e11614b58\src\Corrade\Utility\TweakableParser.cpp
C:\vcpkg_1011\vcpkg\buildtrees\corrade\src\v2020.06-2e11614b58\src\Corrade\Utility\TweakableParser.cpp(40): error C2666: '+': 2 overloads have similar conversions
C:\vcpkg_1011\vcpkg\buildtrees\corrade\src\v2020.06-2e11614b58\src\Corrade\Utility\TweakableParser.cpp(40): note: could be 'built-in C++ operator+(bool, int)'
C:\vcpkg_1011\vcpkg\buildtrees\corrade\src\v2020.06-2e11614b58\src\Corrade\Utility\TweakableParser.cpp(40): note: or       'built-in C++ operator+(const T, __int64)'
        with
        [
            T=const char
        ]

This is caused by the value of CMAKE_CXX_COMPILER_VERSION is greater than 19.30.

In order to make sure corrade can work normally on vs2019, I update the patch to fix this problem temporarily.

This patch should be removed if upstream can support vs2022.

Upstream issue mosra/corrade#124

@NancyLi1013 NancyLi1013 added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Oct 11, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have modified or added at least one portfile where deprecated functions are used.

If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake -> vcpkg_cmake_install (from port vcpkg-cmake)
vcpkg_build_cmake -> vcpkg_cmake_build (from port vcpkg-cmake)
vcpkg_configure_cmake -> vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)
vcpkg_fixup_cmake_targets -> vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)

In the ports that use the new function, you have to add the corresponding dependencies:

{
  "name": "vcpkg-cmake",
  "host": true
},
{
  "name": "vcpkg-cmake-config",
  "host": true
}

The following files are affected:

  • ports/corrade/portfile.cmake

@Cheney-W Cheney-W added the info:reviewed Pull Request changes follow basic guidelines label Oct 11, 2021
@BillyONeal BillyONeal merged commit 9deacd9 into microsoft:master Oct 12, 2021
@BillyONeal
Copy link
Member

Thanks for the bugfix for VS2022!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants