Mesa fails to build after recent ANV changes: [ 165s] vulkan/anv_device.c:697:4: error: (near initialization for 'anv_queue_family_properties.minImageTransferGranularity') [ 165s] CC vulkan/vulkan_libvulkan_common_la-anv_dump.lo [ 165s] Makefile:3134: recipe for target 'vulkan/vulkan_libvulkan_common_la-anv_device.lo' failed [ 165s] make[4]: *** [vulkan/vulkan_libvulkan_common_la-anv_device.lo] Error 1 [ 165s] make[4]: *** Waiting for unfinished jobs.... [ 165s] make[4]: Leaving directory '/home/abuild/rpmbuild/BUILD/mesa/src/intel' [ 165s] Makefile:1905: recipe for target 'all' failed [ 165s] make[3]: *** [all] Error 2 [ 165s] make[3]: Leaving directory '/home/abuild/rpmbuild/BUILD/mesa/src/intel' [ 165s] Makefile:841: recipe for target 'all-recursive' failed [ 165s] make[2]: *** [all-recursive] Error 1 [ 165s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/mesa/src' [ 165s] Makefile:631: recipe for target 'all' failed [ 165s] make[1]: *** [all] Error 2 [ 165s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/mesa/src' [ 165s] Makefile:633: recipe for target 'all-recursive' failed [ 165s] make: *** [all-recursive] Error 1 [ 165s] error: Bad exit status from /var/tmp/rpm-tmp.ZzMi39 (%build) I didn't bisect, but the change to anv_queue_family_properties was introduced by commit c5a0829e1f56f6bb728ee2d200918ffa0f8842a6
Sorry, didn't copy first 4 lines: [ 165s] vulkan/anv_device.c: At top level: [ 165s] vulkan/anv_device.c:697:4: error: initializer element is not constant [ 165s] .minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 }, [ 165s] ^
Created attachment 130264 [details] [review] Patch to try I've attached a patch for you to try. Also, what version of GCC are you using? It builds fine with modern versions.
Ok, I'll try to apply the patch and tell if that helps. I believe that the default gcc version for openSUSE 42.2 is 4.8. But gcc5 and gcc6 are also available as an alternative.
(In reply to Jason Ekstrand from comment #2) > Created attachment 130264 [details] [review] [review] > Patch to try Build finished successfully with you patch.
Created attachment 130293 [details] [review] Alternate (possibly better) patch I just attached a slightly different patch for you to try. If this patch works, then I think it's a better solution because the type is still nicely declared.
New patch does not work, same error: [ 146s] vulkan/anv_device.c: At top level: [ 146s] vulkan/anv_device.c:697:4: error: initializer element is not constant [ 146s] .minImageTransferGranularity = (const VkExtent3D) { 1, 1, 1 }, [ 146s] ^ [ 146s] vulkan/anv_device.c:697:4: error: (near initialization for 'anv_queue_family_properties.minImageTransferGranularity') [ 146s] CC vulkan/vulkan_libvulkan_common_la-anv_dump.lo [ 146s] Makefile:3134: recipe for target 'vulkan/vulkan_libvulkan_common_la-anv_device.lo' failed
(In reply to network723 from comment #6) > New patch does not work, same error: > > [ 146s] vulkan/anv_device.c: At top level: > [ 146s] vulkan/anv_device.c:697:4: error: initializer element is not > constant > [ 146s] .minImageTransferGranularity = (const VkExtent3D) { 1, 1, 1 }, > [ 146s] ^ > [ 146s] vulkan/anv_device.c:697:4: error: (near initialization for > 'anv_queue_family_properties.minImageTransferGranularity') > [ 146s] CC vulkan/vulkan_libvulkan_common_la-anv_dump.lo > [ 146s] Makefile:3134: recipe for target > 'vulkan/vulkan_libvulkan_common_la-anv_device.lo' failed Bummer. We'll go with the first patch then.
Fixed by the following commit: commit 28b134c75c1fa3b2aaa00dc168f0eca35ccd346d Author: Jason Ekstrand <jason.ekstrand@intel.com> Date: Thu Mar 16 08:50:36 2017 -0700 anv/device: Remove a use of a compound literal Older versions of GCC don't like compound literals in static const variable declarations because they don't think it's an actual constant value. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.