Cannot build
thargy opened this issue ¡ comments
Sorry, I'm returning to C++ after >20 years đ´đť, so this is probably my own dumb fault đ¤ˇđťââď¸ .
I've included your repo as a submodule to my own project, which is being built with gcc-11 (c++20) on Ubuntu. I'm trying to get my CMake build system, build magma, as necessary. However, navigating to the root of your repo and running make
gives:
g++ -std=c++14 -m64 -msse4 -pthread -ftemplate-depth=2048 -fconstexpr-depth=2048 -Wno-enum-compare -Werror -DVK_USE_PLATFORM_XCB_KHR -I/include -Icore -O0 -g -D_DEBUG -c allocator/deviceMemoryAllocator.cpp -o allocator/deviceMemoryAllocator.o
In file included from allocator/../objects/object.h:66,
from allocator/../objects/nondispatchable.h:19,
from allocator/../objects/deviceMemory.h:19,
from allocator/deviceMemoryAllocator.cpp:21:
allocator/../objects/object.inl: In member function âvoid magma::Object<Type>::setObjectName(const char*)â:
allocator/../objects/object.inl:50:41: error: no match for call to â(magma::DeviceExtension<VkResult (*)(VkDevice_T*, const VkDebugUtilsObjectNameInfoEXT*)>) (std::__shared_ptr_access<magma::Device, __gnu_cxx::_S_atomic, false, false>::element_type&, VkDebugUtilsObjectNameInfoEXT*)â
50 | vkSetDebugUtilsObjectNameEXT(MAGMA_HANDLE(device), &info);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/object.inl:50:41: note: candidate: âVkResult (*)(VkDevice_T*, const VkDebugUtilsObjectNameInfoEXT*)â (conversion)
allocator/../objects/object.inl:50:41: note: candidate expects 3 arguments, 3 provided
allocator/../objects/object.inl: In member function âvoid magma::Object<Type>::setObjectTag(uint64_t, std::size_t, const void*)â:
allocator/../objects/object.inl:93:40: error: no match for call to â(magma::DeviceExtension<VkResult (*)(VkDevice_T*, const VkDebugUtilsObjectTagInfoEXT*)>) (std::__shared_ptr_access<magma::Device, __gnu_cxx::_S_atomic, false, false>::element_type&, VkDebugUtilsObjectTagInfoEXT*)â
93 | vkSetDebugUtilsObjectTagEXT(MAGMA_HANDLE(device), &info);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/object.inl:93:40: note: candidate: âVkResult (*)(VkDevice_T*, const VkDebugUtilsObjectTagInfoEXT*)â (conversion)
allocator/../objects/object.inl:93:40: note: candidate expects 3 arguments, 3 provided
In file included from core/pch.h:48,
from allocator/deviceMemoryAllocator.cpp:18:
allocator/../objects/commandBuffer.h: At global scope:
core/core.h:100:25: error: expected identifier before â*â token
100 | #define MAGMA_HANDLE(p) *(this->p)
| ^
allocator/../objects/../misc/deviceExtension.h:43:45: note: in expansion of macro âMAGMA_HANDLEâ
43 | magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
| ^~~~~~~~~~~~
allocator/../objects/commandBuffer.h:524:9: note: in expansion of macro âMAGMA_OPTIONAL_DEVICE_EXTENSIONâ
524 | MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/core.h:100:26: error: expected â,â or â...â before â(â token
100 | #define MAGMA_HANDLE(p) *(this->p)
| ^
allocator/../objects/../misc/deviceExtension.h:43:45: note: in expansion of macro âMAGMA_HANDLEâ
43 | magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
| ^~~~~~~~~~~~
allocator/../objects/commandBuffer.h:524:9: note: in expansion of macro âMAGMA_OPTIONAL_DEVICE_EXTENSIONâ
524 | MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from allocator/../objects/commandBuffer.h:565,
from allocator/deviceMemoryAllocator.cpp:25:
allocator/../objects/commandBuffer.inl: In member function âvoid magma::CommandBuffer::drawMultiIndexed(const std::vector<VkMultiDrawIndexedInfoEXT>&, uint32_t, const std::vector<int>&) constâ:
allocator/../objects/commandBuffer.inl:184:29: error: no matching function for call to âmagma::CommandBuffer::vkCmdDrawMultiIndexedEXT(VkCommandBuffer_T* const&, uint32_t, const VkMultiDrawIndexedInfoEXT*, int, int, uint32_t&, const int*) constâ
184 | vkCmdDrawMultiIndexedEXT(handle, MAGMA_COUNT(indexInfo), indexInfo.data(), 1, 0, stride, vertexOffsets.data());
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from allocator/../objects/object.h:22,
from allocator/../objects/nondispatchable.h:19,
from allocator/../objects/deviceMemory.h:19,
from allocator/deviceMemoryAllocator.cpp:21:
allocator/../objects/commandBuffer.h:524:41: note: candidate: âmagma::DeviceExtension<void (*)(VkCommandBuffer_T*, unsigned int, const VkMultiDrawIndexedInfoEXT*, unsigned int, unsigned int, unsigned int, const int*)> magma::CommandBuffer::vkCmdDrawMultiIndexedEXT(int*)â
524 | MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
| ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro âMAGMA_OPTIONAL_DEVICE_EXTENSIONâ
43 | magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
| ^~~~
allocator/../objects/commandBuffer.h:524:41: note: candidate expects 1 argument, 7 provided
524 | MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
| ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro âMAGMA_OPTIONAL_DEVICE_EXTENSIONâ
43 | magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
| ^~~~
In file included from allocator/../objects/commandBuffer.h:565,
from allocator/deviceMemoryAllocator.cpp:25:
allocator/../objects/commandBuffer.inl: In member function âvoid magma::CommandBuffer::drawMultiIndexedInstanced(const std::vector<VkMultiDrawIndexedInfoEXT>&, uint32_t, uint32_t, uint32_t, const std::vector<int>&) constâ:
allocator/../objects/commandBuffer.inl:190:29: error: no matching function for call to âmagma::CommandBuffer::vkCmdDrawMultiIndexedEXT(VkCommandBuffer_T* const&, uint32_t, const VkMultiDrawIndexedInfoEXT*, uint32_t&, uint32_t&, uint32_t&, const int*) constâ
190 | vkCmdDrawMultiIndexedEXT(handle, MAGMA_COUNT(indexInfo), indexInfo.data(), instanceCount, firstInstance, stride, vertexOffsets.data());
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from allocator/../objects/object.h:22,
from allocator/../objects/nondispatchable.h:19,
from allocator/../objects/deviceMemory.h:19,
from allocator/deviceMemoryAllocator.cpp:21:
allocator/../objects/commandBuffer.h:524:41: note: candidate: âmagma::DeviceExtension<void (*)(VkCommandBuffer_T*, unsigned int, const VkMultiDrawIndexedInfoEXT*, unsigned int, unsigned int, unsigned int, const int*)> magma::CommandBuffer::vkCmdDrawMultiIndexedEXT(int*)â
524 | MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
| ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro âMAGMA_OPTIONAL_DEVICE_EXTENSIONâ
43 | magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
| ^~~~
allocator/../objects/commandBuffer.h:524:41: note: candidate expects 1 argument, 7 provided
524 | MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
| ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro âMAGMA_OPTIONAL_DEVICE_EXTENSIONâ
43 | magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
| ^~~~
make: *** [Makefile:144: allocator/deviceMemoryAllocator.o] Error 1
Have moved on, closing for lack of response.