Closed autoantwort closed 4 months ago
Package: magnum[core,vk]:arm64-osx -> 2020.06#18
Host Environment
To Reproduce
vcpkg x-set-installed --enforce-port-checks --allow-unsupported magnum[core,vk]
Failure logs
-- Using cached mosra-magnum-v2020.06.tar.gz.
-- Extracting source /Users/leanderSchulten/git_projekte/vcpkg/downloads/mosra-magnum-v2020.06.tar.gz
-- Applying patch 002-sdl-includes.patch
-- Applying patch 003-fix-FindGLFW.patch
-- Applying patch 004-fix-FindOpenAL.patch
-- Applying patch 005-fix-find-sdl2.patch
-- Using source at /Users/leanderSchulten/git_projekte/vcpkg/buildtrees/magnum/src/v2020.06-4ccec3ac49.clean
-- Found external ninja('1.12.1').
-- Configuring arm64-osx
-- Building arm64-osx-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: /Users/leanderSchulten/git_projekte/vcpkg/downloads/tools/cmake-3.29.2-osx/cmake-3.29.2-macos-universal/CMake.app/Contents/bin/cmake --build . --config Debug --target install -- -v -j11
Working Directory: /Users/leanderSchulten/git_projekte/vcpkg/buildtrees/magnum/arm64-osx-dbg
See logs for more information:
/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/magnum/install-arm64-osx-dbg-out.log
Call Stack (most recent call first):
vcpkg_installed/arm64-osx/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
vcpkg_installed/arm64-osx/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
ports/magnum/portfile.cmake:59 (vcpkg_cmake_install)
scripts/ports.cmake:192 (include)
Interesting, thank you -- learned something new from this warning. As far as I understand this from the discussion at e.g. https://github.com/llvm/llvm-project/issues/59036, this warning only happens for "classical" type-unrestricted enums, which is what all the builtin Vulkan enums are.
The Vulkan backend changed quite significantly since the last v2020.06
tag, so the offending code is not there anymore, and all Magnum enums are with an explicit underlying type to prevent this. If you install the --head
version (which I recommend in any case), it should work. Note that vcpkg is a bit finicky when it comes to upgrades and dependencies of --head
installs, in particular you have to explicitly install Corrade with --head
as well. Complete (and hopefully bulletproof) instructions are in the building documentation.
If you have to stay on version 2020.06 for whatever reason, I think this would be a patch that makes the code valid (i.e., something to put alongside other patches Vcpkg is doing):
diff --git a/src/Magnum/Vk/Enums.cpp b/src/Magnum/Vk/Enums.cpp
index ad8b6d063..b7dffb74f 100644
--- a/src/Magnum/Vk/Enums.cpp
+++ b/src/Magnum/Vk/Enums.cpp
@@ -36,17 +36,17 @@ namespace Magnum { namespace Vk {
namespace {
-constexpr VkPrimitiveTopology PrimitiveTopologyMapping[]{
+constexpr UnsignedInt PrimitiveTopologyMapping[]{
VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
VK_PRIMITIVE_TOPOLOGY_LINE_LIST,
- VkPrimitiveTopology(~UnsignedInt{}),
+ ~UnsignedInt{},
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN,
- VkPrimitiveTopology(~UnsignedInt{}), /* Instances */
- VkPrimitiveTopology(~UnsignedInt{}), /* Faces */
- VkPrimitiveTopology(~UnsignedInt{}) /* Edges */
+ ~UnsignedInt{}, /* Instances */
+ ~UnsignedInt{}, /* Faces */
+ ~UnsignedInt{} /* Edges */
};
constexpr VkIndexType IndexTypeMapping[]{
@@ -94,12 +94,12 @@ constexpr VkSamplerMipmapMode SamplerMipmapModeMapping[]{
VK_SAMPLER_MIPMAP_MODE_LINEAR
};
-constexpr VkSamplerAddressMode SamplerAddressModeMapping[]{
+constexpr UnsignedInt SamplerAddressModeMapping[]{
VK_SAMPLER_ADDRESS_MODE_REPEAT,
VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
- VkSamplerAddressMode(~UnsignedInt{}),
+ ~UnsignedInt{},
};
}
@@ -119,10 +119,10 @@ VkPrimitiveTopology vkPrimitiveTopology(const Magnum::MeshPrimitive primitive) {
CORRADE_ASSERT(UnsignedInt(primitive) - 1 < Containers::arraySize(PrimitiveTopologyMapping),
"Vk::vkPrimitiveTopology(): invalid primitive" << primitive, {});
- const VkPrimitiveTopology out = PrimitiveTopologyMapping[UnsignedInt(primitive) - 1];
- CORRADE_ASSERT(out != VkPrimitiveTopology(~UnsignedInt{}),
+ const UnsignedInt out = PrimitiveTopologyMapping[UnsignedInt(primitive) - 1];
+ CORRADE_ASSERT(out != ~UnsignedInt{},
"Vk::vkPrimitiveTopology(): unsupported primitive" << primitive, {});
- return out;
+ return VkPrimitiveTopology(out);
}
bool hasVkIndexType(const Magnum::MeshIndexType type) {
@@ -224,10 +224,10 @@ bool hasVkSamplerAddressMode(const Magnum::SamplerWrapping wrapping) {
VkSamplerAddressMode vkSamplerAddressMode(const Magnum::SamplerWrapping wrapping) {
CORRADE_ASSERT(UnsignedInt(wrapping) < Containers::arraySize(SamplerAddressModeMapping),
"Vk::vkSamplerAddressMode(): invalid wrapping" << wrapping, {});
- const VkSamplerAddressMode out = SamplerAddressModeMapping[UnsignedInt(wrapping)];
- CORRADE_ASSERT(out != VkSamplerAddressMode(~UnsignedInt{}),
+ const UnsignedInt out = SamplerAddressModeMapping[UnsignedInt(wrapping)];
+ CORRADE_ASSERT(out != ~UnsignedInt{},
"Vk::vkSamplerAddressMode(): unsupported wrapping" << wrapping, {});
- return out;
+ return VkSamplerAddressMode(out);
}
}}
Also, apologies for the lack of tagged releases, I'm doing what I can to finally tag something this year.
Thank you for providing a patch for the current version! I have created a PR in vcpkg to fix the current available version there.
Thanks for the Vcpkg PR! I suppose that's all to be done here, right? Besides me trying harder to tag the next release.
Happens with the latest release (2020.06)