realitix / pyvma

Python Wrapper for VulkanMemoryAllocator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Latest vk_mem_alloc.h doesn't parse correctly

NaNraptor opened this issue · comments

So switched to linux since last issue I posted and got the library to work with the default vk_mem_alloc.h file. This file however is very outdated so I grabbed the newest one from https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/tree/master/include. I replaced the one in pyvma/pyvma/_pyvma_build/include with the one I just copied and ran the command from that directory as per the README file.

Everything up to here is fine but once I run python3.10 setup.py build I get met with this error:

/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.command.build import build
Traceback (most recent call last):
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/cparser.py", line 336, in _parse
    ast = _get_parser().parse(fullcsource)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/pycparser-2.21-py3.10.egg/pycparser/c_parser.py", line 147, in parse
    return self.cparser.parse(
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/pycparser-2.21-py3.10.egg/pycparser/ply/yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/pycparser-2.21-py3.10.egg/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/pycparser-2.21-py3.10.egg/pycparser/ply/yacc.py", line 193, in call_errorfunc
    r = errorfunc(token)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/pycparser-2.21-py3.10.egg/pycparser/c_parser.py", line 1931, in p_error
    self._parse_error(
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/pycparser-2.21-py3.10.egg/pycparser/plyparser.py", line 67, in _parse_error
    raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: <cdef source string>:1106:5: before: PFN_vkGetInstanceProcAddr

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/setup.py", line 53, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 432, in __init__
    _Distribution.__init__(self, {
  File "/usr/lib/python3.10/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 708, in finalize_options
    ep(self)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 715, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 219, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
    exec(code, glob, glob)
  File "pyvma/pyvma_build/pyvma_build.py", line 21, in <module>
    ffibuilder.cdef(cdef)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/api.py", line 112, in cdef
    self._cdef(csource, override=override, packed=packed, pack=pack)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/api.py", line 126, in _cdef
    self._parser.parse(csource, override=override, **options)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/cparser.py", line 389, in parse
    self._internal_parse(csource)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/cparser.py", line 394, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/cparser.py", line 338, in _parse
    self.convert_pycparser_error(e, csource)
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/.eggs/cffi-1.15.0-py3.10-linux-x86_64.egg/cffi/cparser.py", line 367, in convert_pycparser_error
    raise CDefError(msg)
cffi.CDefError: cannot parse "PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;"
<cdef source string>:1106:5: before: PFN_vkGetInstanceProcAddr

I have a pretty good guess as to why that is happening. When we run vk_mem_alloc.h through the c pre-processor on lines 129-131 of the latest of rn version of the file we have this:

#ifndef VULKAN_H_
    #include <vulkan/vulkan.h>
#endif

And for some reason that file cannot be found - as to why, I have no idea

So it was that as I suspected. The way I fixed it was to change the command to cpp -std=c99 -P -I/usr/include -o cdef/vk_mem_alloc.cdef.h vk_mem_alloc.h since /usr/include is where the vulkan/vulkan.h file is installed when you install the LunarG vulkan sdk

Next there were a bunch of files that still specify the include dir as the one with this old vulkan.h file, so i went ahead and made sure that they point to /usr/include instead. Once that was done and I ran py setup.py build I was greeted with the following:

py setup.py build
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.command.build import build
running build
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h: In member function ‘void VmaBlockVector::SortByFreeSize()’:
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:12: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
12752 |         [](auto* b1, auto* b2)
      |            ^~~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:22: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
12752 |         [](auto* b1, auto* b2)
      |                      ^~~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h: In lambda function:
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12754:24: error: request for member ‘m_pMetadata’ in ‘* b1’, which is of non-class type ‘int’
12754 |             return b1->m_pMetadata->GetSumFreeSize() < b2->m_pMetadata->GetSumFreeSize();
      |                        ^~~~~~~~~~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12754:60: error: request for member ‘m_pMetadata’ in ‘* b2’, which is of non-class type ‘int’
12754 |             return b1->m_pMetadata->GetSumFreeSize() < b2->m_pMetadata->GetSumFreeSize();
      |                                                            ^~~~~~~~~~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/algorithm:61,
                 from /home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2613:
/usr/include/c++/11/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = VmaDeviceMemoryBlock**; _Iterator2 = VmaDeviceMemoryBlock**; _Compare = VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>]’:
/usr/include/c++/11/bits/stl_algo.h:1826:14:   required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1866:25:   required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1957:31:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:4875:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = VmaDeviceMemoryBlock**; _Compare = VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>]’
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12751:5:   required from here
/usr/include/c++/11/bits/predefined_ops.h:158:30: error: no match for call to ‘(VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>) (VmaDeviceMemoryBlock*&, VmaDeviceMemoryBlock*&)’
  158 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:9: note: candidate: ‘VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>’
12752 |         [](auto* b1, auto* b2)
      |         ^
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:9: note:   no known conversion for argument 1 from ‘VmaDeviceMemoryBlock*’ to ‘int*’
12752 |         [](auto* b1, auto* b2)
      |         ^
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/algorithm:61,
                 from /home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2613:
/usr/include/c++/11/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = VmaDeviceMemoryBlock*; _Iterator = VmaDeviceMemoryBlock**; _Compare = VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>]’:
/usr/include/c++/11/bits/stl_algo.h:1806:20:   required from ‘void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Val_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1834:36:   required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1866:25:   required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1957:31:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:4875:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = VmaDeviceMemoryBlock**; _Compare = VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>]’
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12751:5:   required from here
/usr/include/c++/11/bits/predefined_ops.h:240:30: error: no match for call to ‘(VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>) (VmaDeviceMemoryBlock*&, VmaDeviceMemoryBlock*&)’
  240 |         { return bool(_M_comp(__val, *__it)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:9: note: candidate: ‘VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>’
12752 |         [](auto* b1, auto* b2)
      |         ^
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:9: note:   no known conversion for argument 1 from ‘VmaDeviceMemoryBlock*’ to ‘int*’
12752 |         [](auto* b1, auto* b2)
      |         ^
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/algorithm:61,
                 from /home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2613:
/usr/include/c++/11/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = VmaDeviceMemoryBlock**; _Value = VmaDeviceMemoryBlock*; _Compare = VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>]’:
/usr/include/c++/11/bits/stl_heap.h:139:48:   required from ‘void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Distance = long int; _Tp = VmaDeviceMemoryBlock*; _Compare = __gnu_cxx::__ops::_Iter_comp_val<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_heap.h:246:23:   required from ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Distance = long int; _Tp = VmaDeviceMemoryBlock*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_heap.h:355:22:   required from ‘void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1646:23:   required from ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1917:25:   required from ‘void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1933:27:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:1954:25:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = VmaDeviceMemoryBlock**; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)> >]’
/usr/include/c++/11/bits/stl_algo.h:4875:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = VmaDeviceMemoryBlock**; _Compare = VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>]’
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12751:5:   required from here
/usr/include/c++/11/bits/predefined_ops.h:196:30: error: no match for call to ‘(VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>) (VmaDeviceMemoryBlock*&, VmaDeviceMemoryBlock*&)’
  196 |         { return bool(_M_comp(*__it, __val)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:9: note: candidate: ‘VmaBlockVector::SortByFreeSize()::<lambda(int*, int*)>’
12752 |         [](auto* b1, auto* b2)
      |         ^
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:12752:9: note:   no known conversion for argument 1 from ‘VmaDeviceMemoryBlock*’ to ‘int*’
12752 |         [](auto* b1, auto* b2)
      |         ^
/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.h:2764:57: note: in definition of macro ‘VMA_SORT’
 2764 |    #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)
      |                                                         ^~~
ar: creating /home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/libvk_mem_alloc.a
ar: /home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build/vk_mem_alloc.o: No such file or directory
running build_py
running egg_info
writing pyvma.egg-info/PKG-INFO
writing dependency_links to pyvma.egg-info/dependency_links.txt
writing requirements to pyvma.egg-info/requires.txt
writing top-level names to pyvma.egg-info/top_level.txt
reading manifest file 'pyvma.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyvma.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.10/_pyvma.c'
already up-to-date
building '_pyvma' extension
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c build/temp.linux-x86_64-3.10/_pyvma.c -o build/temp.linux-x86_64-3.10/build/temp.linux-x86_64-3.10/_pyvma.o -I/usr/include
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/build/temp.linux-x86_64-3.10/_pyvma.o -L/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build -lvk_mem_alloc -lstdc++ -o build/lib.linux-x86_64-3.10/pyvma/_pyvma.abi3.so
/usr/bin/ld: cannot find -lvk_mem_alloc
collect2: error: ld returned 1 exit status
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

So it seems like the newest VMA build are now using at least C++ standard 14. In the setup.py file the compiler flag is set to C++ 11 so I went ahead and changed it. Voila! It worked, after which I was able to install it

I still need to test it but at elast I have something :)

After immediate testing I get met with this:

Traceback (most recent call last):
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/src/vulkan/constants.py", line 14, in <module>
    import pyvma as vma
  File "/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/lib/python3.10/site-packages/pyvma/__init__.py", line 3, in <module>
    from pyvma._pyvma import ffi, lib
ImportError: /home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/lib/python3.10/site-packages/pyvma/_pyvma.abi3.so: undefined symbol: vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR

And here I am lost, I do not understand enough of .so files to be able to debug/reverse engineer why this isn't working, if maybe @realitix would be kind enough to shed some light on this I would be very very grateful

EDIT: A potentially relevant stackoverflow post https://stackoverflow.com/questions/11643666/python-importerror-undefined-symbol-for-custom-c-module

I currently have no idea how to tell cffi to re-arrange the compile command so that the -o .... comes before any -l .... Here is the command I think is responsible:

x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/build/temp.linux-x86_64-3.10/_pyvma.o -L/home/nanyo/Documents/ProgrammingEnvs/PythonEnvs/pyVulkan/pyvma/pyvma/pyvma_build -lvk_mem_alloc -lstdc++ -o build/lib.linux-x86_64-3.10/pyvma/_pyvma.abi3.so

This gets outputted on screen last, when running py setup.py build

@realitix I really hope you can find some time for this issue as I am losing my mind :(

In that case it might be worth archiving this repo as it isn't actively being maintained, just to let people like me know not to waste time trying to get it to work. A note in the README might also be helpful