vsg-dev / VulkanSceneGraph

Vulkan & C++17 based Scene Graph Project
http://www.vulkanscenegraph.org
MIT License
1.32k stars 212 forks source link

Error while building on Debian 10 #204

Closed eventhorizon5 closed 4 years ago

eventhorizon5 commented 4 years ago

Getting this error while building on Debian 10, which has GCC 8.3. Works fine on Debian Testing which currently has GCC 9.3.

ryan@t420:/data/src/VulkanSceneGraph$ make [ 1%] Building CXX object src/vsg/CMakeFiles/vsg.dir/viewer/Viewer.cpp.o /data/src/VulkanSceneGraph/src/vsg/viewer/Viewer.cpp: In member function ‘virtual bool vsg::Viewer::acquireNextFrame()’: /data/src/VulkanSceneGraph/src/vsg/viewer/Viewer.cpp:168:27: error: ‘VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT’ was not declared in this scope result == VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT) ^~~~~~~~~~~~ make[2]: [src/vsg/CMakeFiles/vsg.dir/build.make:1051: src/vsg/CMakeFiles/vsg.dir/viewer/Viewer.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:251: src/vsg/CMakeFiles/vsg.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

Everything else appears to build fine at the moment.

robertosfield commented 4 years ago

Which version Vulkan/VulkanSDK are you using? How did you install Vulkan?

FYI, I'm currently using VulkanSDK/1.2.141.0 bit have developed the VSG with previous versions of the VulkanSDK. Potentially I can try one of the older SDK's to see what breaks, but need more info about how far back will be required.

eventhorizon5 commented 4 years ago

The libvulkan-dev version is 1.1.97-2 (Debian Stable), while the Debian Testing one is 1.2.141.0-1.

robertosfield commented 4 years ago

On Tue, 21 Jul 2020 at 12:08, Ryan Thoryk notifications@github.com wrote:

The libvulkan-dev version is 1.1.97-2 (Debian Stable), while the Debian Testing one is 1.2.141.0-1.

I have VulkanSDK 1.1.97.0 on my system and a search for the problem VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT shows it's not included. VulkanSDK 1.1.106.0 does have it so from this version and later should be fine and so Debian Testing should be OK.

I will have a look at the code to see if we can refactor it to allow compiling with earlier versions of Vulkan.

robertosfield commented 4 years ago

I have checked out https://github.com/KhronosGroup/Vulkan-Headers and found the Vulkan version that adds the problem enum, for versions prior to this I've added a fallback definition of the problem enum thus:

if VK_HEADER_VERSION < 106

#define VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT VkResult(-1000255000)

endif

This is checked into VSG master. The commit is:

https://github.com/vsg-dev/VulkanSceneGraph/commit/602365628bf10ac59cc5f890ce7e49996e2b4e56

With this change I'm able to build against VulkanSDK 1.1.97.0. Could you check out master and see if that address the build issue.

eventhorizon5 commented 4 years ago

I just tried it, and it's building fine now. Thanks.