nem0 / LumixEngine

3D C++ Game Engine - yet another open source game engine
MIT License
3.53k stars 398 forks source link

stb_image is outdated and fails to compile on Linux #1459

Closed WickedSmoke closed 1 year ago

WickedSmoke commented 1 year ago

The external/stb/stb_image_resize.h header does not compile on Linux using gcc 12. A work-around is to redefine STBIR__DEBUG_ASSERT, but that macro was removed back in 2016 from the nothings/stb repository. Please update the Lumix version of stb_image so it will compile on Linux.

nem0 commented 1 year ago

what's the error? it does build on linux fine https://github.com/nem0/LumixEngine/actions/runs/4612043917/jobs/8152489547

WickedSmoke commented 1 year ago

One of these two errors occurs on each use of the macro:

In file included from ../../../src/renderer/editor/stb.cpp:9:
../../../external/stb/stb_image_resize.h: In function ‘float stbir__filter_trapezoid(float, float)’:
../../../external/stb/stb_image_resize.h:761:31: error: statement has no effect [-Werror=unused-value]
  761 |     STBIR__DEBUG_ASSERT(scale <= 1);
nem0 commented 1 year ago

I don't see any issue updating stbir, done. Thanks for the report.