GDH icon indicating copy to clipboard operation
GDH copied to clipboard

GDH not building

Open Gamer069 opened this issue 5 months ago • 4 comments

I wanna contribute to this project. But obviously to do that, i need to at least BUILD it... The errors i'm getting are

/home/<user>/gdh/libs/imgui/imgui_draw.cpp:390:19: error: static assertion expression is not an integral constant expression
  390 |         IM_STATIC_ASSERT(offsetof(ImDrawCmd, ClipRect) == 0);
      |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/<user>/.local/share/Geode/cross-tools/splat/sdk/include/ucrt/stddef.h:38:31: note: expanded from macro 'offsetof'
   38 |         #define offsetof(s,m) ((size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
      |                               ^
/home/<user>/gdh/libs/imgui/imgui_internal.h:242:55: note: expanded from macro 'IM_STATIC_ASSERT'
  242 | #define IM_STATIC_ASSERT(_COND)         static_assert(_COND, "")
      |                                                       ^~~~~
/home/<user>/gdh/libs/imgui/imgui_draw.cpp:390:19: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
  390 |         IM_STATIC_ASSERT(offsetof(ImDrawCmd, ClipRect) == 0);
      |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/<user>/.local/share/Geode/cross-tools/splat/sdk/include/ucrt/stddef.h:38:32: note: expanded from macro 'offsetof'
   38 |         #define offsetof(s,m) ((size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
      |                                ^
/home/<user>/gdh/libs/imgui/imgui_internal.h:242:55: note: expanded from macro 'IM_STATIC_ASSERT'
  242 | #define IM_STATIC_ASSERT(_COND)         static_assert(_COND, "")
      |                                                       ^~~~~
/home/<user>/gdh/libs/imgui/imgui_draw.cpp:391:22: error: static assertion expression is not an integral constant expression
  391 |     IM_STATIC_ASSERT(offsetof(ImDrawCmd, TextureId) == sizeof(ImVec4));
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/<user>/.local/share/Geode/cross-tools/splat/sdk/include/ucrt/stddef.h:38:31: note: expanded from macro 'offsetof'
   38 |         #define offsetof(s,m) ((size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
      |                               ^
/home/<user>/gdh/libs/imgui/imgui_internal.h:242:55: note: expanded from macro 'IM_STATIC_ASSERT'
  242 | #define IM_STATIC_ASSERT(_COND)         static_assert(_COND, "")
      |                                                       ^~~~~

(i use arch btw) ...

and i don't wanna just comment these lines bc like they're static asserts. and if i do, then i get an even nastier error (this time linker error):

lld-link: error: undefined symbol: _mm_set_ss
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:949
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddPolyline(struct ImVec2 const *, int, unsigned int, int, float))
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:756
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddPolyline(struct ImVec2 const *, int, unsigned int, int, float))
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:1003
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddConvexPolyFilled(struct ImVec2 const *, int, unsigned int))

lld-link: error: undefined symbol: _mm_rsqrt_ss
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:949
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddPolyline(struct ImVec2 const *, int, unsigned int, int, float))
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:756
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddPolyline(struct ImVec2 const *, int, unsigned int, int, float))
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:1003
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddConvexPolyFilled(struct ImVec2 const *, int, unsigned int))

lld-link: error: undefined symbol: _mm_cvtss_f32
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:949
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddPolyline(struct ImVec2 const *, int, unsigned int, int, float))
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:756
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddPolyline(struct ImVec2 const *, int, unsigned int, int, float))
>>> referenced by /home/<user>/gdh/libs/imgui/imgui_draw.cpp:1003
>>>               imgui.lib(imgui_draw.cpp.obj):(public: void __cdecl ImDrawList::AddConvexPolyFilled(struct ImVec2 const *, int, unsigned int))

BTW to build i'm just doing

geode build

(i do have a cross-toolchain setup or whatever)

Gamer069 avatar Aug 15 '25 20:08 Gamer069

and i understand that these errors are imgui-related but they still should be somehow fixed...

Gamer069 avatar Aug 15 '25 20:08 Gamer069

mod compiles on last commits (tested on windows, msvc compiler)

TobyAdd avatar Sep 10 '25 23:09 TobyAdd

it doesn't build properly on linux

Gamer069 avatar Sep 15 '25 18:09 Gamer069

I sincerely apologize, but I don't know the status of mod compilation for Linux. You can use a virtual machine with Windows or utilize GitHub Actions. The only issue is that FFmpeg libraries for Android aren't distributed and must be compiled manually to get GDH working on Android.

TobyAdd avatar Sep 15 '25 22:09 TobyAdd