You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing a build error when I run CMake and make on it.
The error is as follows:
[1/2] Building CXX object src/CMakeFiles/kompute.dir/Manager.cpp.o
FAILED: src/CMakeFiles/kompute.dir/Manager.cpp.o
/usr/bin/c++ -DFMT_LOCALE -I/home/jesse/kompute/kompute/src/include -I/home/jesse/kompute/kompute/single_include -O3 -DNDEBUG -DRELEASE=1 -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/Manager.cpp.o -MF src/CMakeFiles/kompute.dir/Manager.cpp.o.d -o src/CMakeFiles/kompute.dir/Manager.cpp.o -c /home/jesse/kompute/kompute/src/Manager.cpp
In file included from /usr/include/c++/11/vector:67,
from /usr/include/vulkan/vulkan.hpp:51,
from /home/jesse/kompute/kompute/src/include/kompute/Core.hpp:14,
from /home/jesse/kompute/kompute/src/include/kompute/Manager.hpp:7,
from /home/jesse/kompute/kompute/src/Manager.cpp:8:
/usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘struct std::_Vector_base<vk::PhysicalDevice, unsigned int*>’:
/usr/include/c++/11/bits/stl_vector.h:389:11: required from ‘class std::vector<vk::PhysicalDevice, unsigned int*>’
/home/jesse/kompute/kompute/src/Manager.cpp:294:46: required from here
/usr/include/c++/11/bits/stl_vector.h:87:28: error: ‘unsigned int*’ is not a class, struct, or union type
87 | rebind<_Tp>::other _Tp_alloc_type;
| ^~~~~~~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:89:9: error: ‘unsigned int*’ is not a class, struct, or union type
89 | pointer;
| ^~~~~~~
/usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘class std::vector<vk::PhysicalDevice, unsigned int*>’:
/home/jesse/kompute/kompute/src/Manager.cpp:294:46: required from here
/usr/include/c++/11/bits/stl_vector.h:474:20: error: ‘_M_allocate’ has not been declared in ‘std::vector<vk::PhysicalDevice, unsigned int*>::_Base’
474 | using _Base::_M_allocate;
| ^~~~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:475:20: error: ‘_M_deallocate’ has not been declared in ‘std::vector<vk::PhysicalDevice, unsigned int*>::_Base’
475 | using _Base::_M_deallocate;
| ^~~~~~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:477:20: error: ‘_M_get_Tp_allocator’ has not been declared in ‘std::vector<vk::PhysicalDevice, unsigned int*>::_Base’
477 | using _Base::_M_get_Tp_allocator;
| ^~~~~~~~~~~~~~~~~~~
In file included from /home/jesse/kompute/kompute/src/include/kompute/Core.hpp:14,
from /home/jesse/kompute/kompute/src/include/kompute/Manager.hpp:7,
from /home/jesse/kompute/kompute/src/Manager.cpp:8:
/usr/include/vulkan/vulkan.hpp: In instantiation of ‘typename vk::ResultValueType<std::vector<vk::PhysicalDevice, Allocator> >::type vk::Instance::enumeratePhysicalDevices(const Allocator&, const Dispatch&) const [with Allocator = unsigned int*; Dispatch = std::nullptr_t; typename vk::ResultValueType<std::vector<vk::PhysicalDevice, Allocator> >::type = std::vector<vk::PhysicalDevice, unsigned int*>]’:
/home/jesse/kompute/kompute/src/Manager.cpp:294:46: required from here
/usr/include/vulkan/vulkan.hpp:67583:39: error: request for member ‘vkEnumeratePhysicalDevices’ in ‘d’, which is of non-class type ‘std::nullptr_t’
67583 | result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vulkan/vulkan.hpp:67587:41: error: request for member ‘vkEnumeratePhysicalDevices’ in ‘d’, which is of non-class type ‘std::nullptr_t’
67587 | result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( physicalDevices.data() ) ) );
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from /usr/include/vulkan/vulkan.hpp:51,
from /home/jesse/kompute/kompute/src/include/kompute/Core.hpp:14,
from /home/jesse/kompute/kompute/src/include/kompute/Manager.hpp:7,
from /home/jesse/kompute/kompute/src/Manager.cpp:8:
/usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = vk::PhysicalDevice; _Alloc = unsigned int*]’:
/home/jesse/kompute/kompute/src/Manager.cpp:294:46: required from here
/usr/include/c++/11/bits/stl_vector.h:680:37: error: ‘struct std::_Vector_base<vk::PhysicalDevice, unsigned int*>::_Vector_impl’ has no member named ‘_M_start’
680 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
| ~~~~~~~~~~~~~~^~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:680:61: error: ‘struct std::_Vector_base<vk::PhysicalDevice, unsigned int*>::_Vector_impl’ has no member named ‘_M_finish’
680 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
| ~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:681:42: error: ‘_M_get_Tp_allocator’ was not declared in this scope; did you mean ‘get_allocator’?
681 | _M_get_Tp_allocator());
| ~~~~~~~~~~~~~~~~~~~^~
| get_allocator
/usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<_Tp, _Alloc>::_Vector_base(const allocator_type&) [with _Tp = vk::PhysicalDevice; _Alloc = unsigned int*; std::_Vector_base<_Tp, _Alloc>::allocator_type = unsigned int*]’:
/usr/include/c++/11/bits/stl_vector.h:498:18: required from ‘std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = vk::PhysicalDevice; _Alloc = unsigned int*; std::vector<_Tp, _Alloc>::allocator_type = unsigned int*]’
/usr/include/vulkan/vulkan.hpp:67578:43: required from ‘typename vk::ResultValueType<std::vector<vk::PhysicalDevice, Allocator> >::type vk::Instance::enumeratePhysicalDevices(const Allocator&, const Dispatch&) const [with Allocator = unsigned int*; Dispatch = std::nullptr_t; typename vk::ResultValueType<std::vector<vk::PhysicalDevice, Allocator> >::type = std::vector<vk::PhysicalDevice, unsigned int*>]’
/home/jesse/kompute/kompute/src/Manager.cpp:294:46: required from here
/usr/include/c++/11/bits/stl_vector.h:294:9: error: no matching function for call to ‘std::_Vector_base<vk::PhysicalDevice, unsigned int*>::_Vector_impl::_Vector_impl(unsigned int* const&)’
294 | : _M_impl(__a) { }
| ^~~~~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:143:9: note: candidate: ‘std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl(std::_Vector_base<_Tp, _Alloc>::_Vector_impl&&) [with _Tp = vk::PhysicalDevice; _Alloc = unsigned int*]’
143 | _Vector_impl(_Vector_impl&& __x) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:143:37: note: no known conversion for argument 1 from ‘const allocator_type’ {aka ‘unsigned int* const’} to ‘std::_Vector_base<vk::PhysicalDevice, unsigned int*>::_Vector_impl&&’
143 | _Vector_impl(_Vector_impl&& __x) noexcept
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:131:9: note: candidate: ‘std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = vk::PhysicalDevice; _Alloc = unsigned int*]’
131 | _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
| ^~~~~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:131:9: note: candidate expects 0 arguments, 1 provided
ninja: build stopped: subcommand failed.
The problem lies in Manager.cpp at the following line:
My autocomplete shows both the first and the last function as a possible invocation, perhaps because both arguments are template types.
When I force the use of the first function by adding the 3rd default argument, this->mInstance->enumeratePhysicalDevices(&deviceCount, nullptr, VULKAN_HPP_DEFAULT_DISPATCHER);
the build succeeds.
I am wondering myself if this is because of my compiler, or maybe I have a different vulkan header.
My vulkan header version is: 131
compiler: g++ 9.3
I also tried adding add_definitions(-DVULKAN_HPP_DISABLE_ENHANCED_MODE) to the CMakeLists.txt, but then I get even more errors elsewhere.
I put this up as an issue, because I'm not sure what the cause is yet, and perhaps you guys know more..
if the vulkan header version is relevant, than I am not sure from which header version this fix is required..
The text was updated successfully, but these errors were encountered:
We currently don't have a "minimum supported version" in the docs, but we may need to introduce it as it indeed seems like an older version results in potential errors.
Would you be able to upgrade your version? We could look at adding backwards compatibility to older versions of Vulkan, but normally the best practice would be to upgrade to a latter version
Hi
I am experiencing a build error when I run CMake and make on it.
The error is as follows:
The problem lies in Manager.cpp at the following line:
of which there are 3 definitions in my vulkan.hpp:
My autocomplete shows both the first and the last function as a possible invocation, perhaps because both arguments are template types.
When I force the use of the first function by adding the 3rd default argument,
this->mInstance->enumeratePhysicalDevices(&deviceCount, nullptr, VULKAN_HPP_DEFAULT_DISPATCHER);
the build succeeds.
I am wondering myself if this is because of my compiler, or maybe I have a different vulkan header.
My vulkan header version is: 131
compiler: g++ 9.3
I also tried adding
add_definitions(-DVULKAN_HPP_DISABLE_ENHANCED_MODE)
to the CMakeLists.txt, but then I get even more errors elsewhere.I put this up as an issue, because I'm not sure what the cause is yet, and perhaps you guys know more..
if the vulkan header version is relevant, than I am not sure from which header version this fix is required..
The text was updated successfully, but these errors were encountered: