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 with gcc 14.2 due to nothings/stb#1642 #545

Open
footballhead opened this issue Jan 27, 2025 · 0 comments
Open

Can't compile with gcc 14.2 due to nothings/stb#1642 #545

footballhead opened this issue Jan 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@footballhead
Copy link
Collaborator

[98/421] Building CXX object src/CMakeFiles/ppx.dir/ppx/bitmap.cpp.o
FAILED: src/CMakeFiles/ppx.dir/ppx/bitmap.cpp.o 
/usr/bin/c++ -DGLFW_INCLUDE_NONE -DPPX_LINUX -DPPX_LINUX_XCB -DPPX_VULKAN -DRELATIVE_PATH_TO_PROJECT_ROOT=\"..\" -DSTACK_LINE_READER_BUFFER_SIZE=1024 -I/usr/local/google/home/hitchens/git/bigwheels/src -I/usr/local/google/home/hitchens/git/bigwheels/include -I/usr/local/google/home/hitchens/git/bigwheels/third_party/glfw/include -I/usr/local/google/home/hitchens/git/bigwheels/third_party/glm -I/usr/local/google/home/hitchens/git/bigwheels/third_party/gli -I/usr/local/google/home/hitchens/git/bigwheels/third_party/stb -I/usr/local/google/home/hitchens/git/bigwheels/third_party/imgui -I/usr/local/google/home/hitchens/git/bigwheels/third_party/tinyobjloader -I/usr/local/google/home/hitchens/git/bigwheels/third_party/pcg32 -I/usr/local/google/home/hitchens/git/bigwheels/third_party/cgltf -I/usr/local/google/home/hitchens/git/bigwheels/third_party/xxHash -I/usr/local/google/home/hitchens/git/bigwheels/third_party/utfcpp/source -I/usr/local/google/home/hitchens/git/bigwheels/third_party/json/single_include -I/usr/local/google/home/hitchens/git/bigwheels/third_party/VulkanMemoryAllocator/include -I/usr/local/google/home/hitchens/git/bigwheels/third_party/VulkanMemoryAllocator/src -I/usr/local/google/home/hitchens/vulkan_sdk/1.3.275.0/x86_64/include -I/usr/local/google/home/hitchens/git/bigwheels/third_party/cpu_features/include -Werror         -std=c++17         -fdiagnostics-color=always         -Wno-nullability-completeness         -Wno-deprecated-anon-enum-enum-conversion         -Wno-missing-field-initializers         -Wno-unused-parameter         -Wno-ignored-qualifiers         -Wno-deprecated-copy         -Wno-deprecated-enum-enum-conversion         -Wno-pointer-bool-conversion      -O3 -DNDEBUG -std=gnu++17 -MD -MT src/CMakeFiles/ppx.dir/ppx/bitmap.cpp.o -MF src/CMakeFiles/ppx.dir/ppx/bitmap.cpp.o.d -o src/CMakeFiles/ppx.dir/ppx/bitmap.cpp.o -c /usr/local/google/home/hitchens/git/bigwheels/src/ppx/bitmap.cpp
In file included from /usr/local/google/home/hitchens/git/bigwheels/src/ppx/bitmap.cpp:18:
/usr/local/google/home/hitchens/git/bigwheels/third_party/stb/stb_image.h: In function ‘int stbi__parse_png_file(stbi__png*, int, int)’:
/usr/local/google/home/hitchens/git/bigwheels/third_party/stb/stb_image.h:5109:56: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 5109 |                   for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
      |                                                  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/google/home/hitchens/git/bigwheels/third_party/stb/stb_image.h:5026:25: note: at offset 3 into destination object ‘tc’ of size 3
 5026 |    stbi_uc has_trans=0, tc[3]={0};
      |                         ^~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-pointer-bool-conversion’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-deprecated-anon-enum-enum-conversion’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-nullability-completeness’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors

Works fine with clang

@footballhead footballhead added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant