Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile master branch on Linux #39901

Closed
mbrlabs opened this issue Jun 27, 2020 · 3 comments
Closed

Can't compile master branch on Linux #39901

mbrlabs opened this issue Jun 27, 2020 · 3 comments

Comments

@mbrlabs
Copy link
Contributor

mbrlabs commented Jun 27, 2020

Godot version:
2737852

OS/device including version:
Manjaro Linux; gcc 10.1.0

Issue description:
Compilation aborts because of uninitialized variable in drivers/vulkan/rendering_device_vulkan.cpp

[ 44%] Compiling ==> editor/audio_stream_preview.cpp
[ 44%] Compiling ==> editor/code_editor.cpp
In file included from ./core/ustring.h:35,
                 from ./core/string_name.h:36,
                 from ./core/node_path.h:34,
                 from ./core/hashfuncs.h:36,
                 from ./core/oa_hash_map.h:34,
                 from drivers/vulkan/rendering_device_vulkan.h:34,
                 from drivers/vulkan/rendering_device_vulkan.cpp:31:
./core/cowdata.h: In member function 'void RenderingDeviceVulkan::_draw_list_insert_clear_region(RenderingDeviceVulkan::DrawList*, RenderingDeviceVulkan::Framebuffer*, Point2i, Point2i, bool, const Vector<Color>&, bool, float, uint32_t)':
./core/cowdata.h:141:3: error: 'clear_at.VkClearAttachment::clearValue.VkClearValue::color.VkClearColorValue::float32[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  141 |   _get_data()[p_index] = p_elem;
      |   ^~~~~~~~~
drivers/vulkan/rendering_device_vulkan.cpp:5647:21: note: 'clear_at.VkClearAttachment::clearValue.VkClearValue::color.VkClearColorValue::float32[3]' was declared here
 5647 |   VkClearAttachment clear_at;
      |                     ^~~~~~~~
In file included from ./core/ustring.h:35,
                 from ./core/string_name.h:36,
                 from ./core/node_path.h:34,
                 from ./core/hashfuncs.h:36,
                 from ./core/oa_hash_map.h:34,
                 from drivers/vulkan/rendering_device_vulkan.h:34,
                 from drivers/vulkan/rendering_device_vulkan.cpp:31:
./core/cowdata.h:141:3: error: 'clear_at.VkClearAttachment::clearValue.VkClearValue::color.VkClearColorValue::float32[2]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  141 |   _get_data()[p_index] = p_elem;
      |   ^~~~~~~~~
drivers/vulkan/rendering_device_vulkan.cpp:5647:21: note: 'clear_at.VkClearAttachment::clearValue.VkClearValue::color.VkClearColorValue::float32[2]' was declared here
 5647 |   VkClearAttachment clear_at;
      |                     ^~~~~~~~
cc1plus: all warnings being treated as errors
scons: *** [drivers/vulkan/rendering_device_vulkan.linuxbsd.opt.tools.64.o] Error 1
scons: building terminated because of errors.
@Meriipu
Copy link
Contributor

Meriipu commented Jun 27, 2020

I have to add werror=no as a parameter to my scons command because of this

@mbrlabs
Copy link
Contributor Author

mbrlabs commented Jun 27, 2020

Yeah, this is actually just a warning, but the build system treats warnings as errors by default.

@madmiraal
Copy link
Contributor

Duplicate of #38829, which is fixed with #38835.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants