mardi 27 septembre 2022

Can't install the Vulkan SDK from tarball on Fedora Linux

I tried to install the Vulkan SDK from the tarball from the LunarG website (version 1.3.224.1) on Fedora 37 beta (I also tried it on Nobara Linux 36) and kept getting these errors.

In function ‘std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = Json::Value::ValueHolder]’,
    inlined from ‘void Json::Value::swapPayload(Json::Value&)’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:2967:12,
    inlined from ‘bool Json::Reader::readValue()’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:433:31:
/usr/include/c++/12/bits/move.h:205:7: error: ‘v.Json::Value::value_’ may be used uninitialized [-Werror=maybe-uninitialized]
  205 |       __a = _GLIBCXX_MOVE(__b);
      |       ^~~
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp: In member function ‘bool Json::Reader::readValue()’:
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:432:11: note: ‘v’ declared here
  432 |     Value v;
      |           ^
In function ‘std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = Json::Value::ValueHolder]’,
    inlined from ‘void Json::Value::swapPayload(Json::Value&)’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:2967:12,
    inlined from ‘bool Json::Reader::readValue()’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:446:33:
/usr/include/c++/12/bits/move.h:205:7: error: ‘v.Json::Value::value_’ may be used uninitialized [-Werror=maybe-uninitialized]
  205 |       __a = _GLIBCXX_MOVE(__b);
      |       ^~~
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp: In member function ‘bool Json::Reader::readValue()’:
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:445:13: note: ‘v’ declared here
  445 |       Value v;
      |             ^
In function ‘std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = Json::Value::ValueHolder]’,
    inlined from ‘void Json::Value::swapPayload(Json::Value&)’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:2967:12,
    inlined from ‘bool Json::OurReader::readValue()’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:1355:31:
/usr/include/c++/12/bits/move.h:205:7: error: ‘v.Json::Value::value_’ may be used uninitialized [-Werror=maybe-uninitialized]
  205 |       __a = _GLIBCXX_MOVE(__b);
      |       ^~~
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp: In member function ‘bool Json::OurReader::readValue()’:
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:1354:11: note: ‘v’ declared here
 1354 |     Value v;
      |           ^
In function ‘std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = Json::Value::ValueHolder]’,
    inlined from ‘void Json::Value::swapPayload(Json::Value&)’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:2967:12,
    inlined from ‘bool Json::OurReader::readValue()’ at /home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:1392:33:
/usr/include/c++/12/bits/move.h:205:7: error: ‘v.Json::Value::value_’ may be used uninitialized [-Werror=maybe-uninitialized]
  205 |       __a = _GLIBCXX_MOVE(__b);
      |       ^~~
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp: In member function ‘bool Json::OurReader::readValue()’:
/home/said/vulkan/1.3.224.1/source/VulkanTools/submodules/jsoncpp/dist/jsoncpp.cpp:1391:13: note: ‘v’ declared here
 1391 |       Value v;
      |             ^

I tried going through the CMake files to try to disable the -Werror=maybe-uninitialized option but I'm not familiar with CMake so couldn't find a way to do that. I also tried going through the C++ source code itself and trying to fix it that way but still could not fix the issue.

Thank you very much.

Aucun commentaire:

Enregistrer un commentaire