Skip to content

Fix Linux/clang build and runtime issues - #70

Merged
Pursche merged 4 commits into
masterfrom
LinuxBuildFix
Aug 11, 2026
Merged

Fix Linux/clang build and runtime issues#70
Pursche merged 4 commits into
masterfrom
LinuxBuildFix

Conversation

@Pursche

@Pursche Pursche commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Compile fixes for clang (MSVC-isms):

  • offsetof(Type, Type::member) -> offsetof(Type, member) in CulledRenderer, JoltDebugRenderer, ModelRenderer (standard offsetof takes a member designator; the qualified form is an MSVC extension)
  • LightRenderer.h: add missing RenderGraphBuilder forward declaration
  • UpdateUnitEntities.cpp: fix tracy include case (tracy/Tracy.hpp); only resolved on case-insensitive filesystems

Runtime fixes:

  • Application.cpp: open PACT storage at Data/Pact (was data/pact, which only worked on case-insensitive filesystems; with FallbackToInit the game silently created and read an empty archive on Linux)
  • FactionUtil.cpp: Reaction perception override was unreachable without a local player set; return the override before the local-player early-out (matches the override-is-absolute semantics the tests expect)

Shader fixes:

  • Model/Terrain Draw.vs.slang: SV_ClipDistance must be float or float[] (slang 2026.13 enforces this); use float[4] with element-wise writes

Build system fixes:

  • ProjectUtil.lua: linkgroups + $ORIGIN rpath on Linux, fix executable extension map (no extension on Linux)
  • ShaderCookerStandalone.lua: cook shaders as a post-build step on non-Windows; premake's gmake backend generates no build target for Utility projects, so the Shaders project's prebuild never ran
  • Shaders.lua: adapt cooker invocation to the extension-map fix
  • Submodules/Engine: bump to LinuxBuildFix (Linux/clang build and runtime fixes)

Compile fixes for clang (MSVC-isms):
- offsetof(Type, Type::member) -> offsetof(Type, member) in
  CulledRenderer, JoltDebugRenderer, ModelRenderer (standard offsetof
  takes a member designator; the qualified form is an MSVC extension)
- LightRenderer.h: add missing RenderGraphBuilder forward declaration
- UpdateUnitEntities.cpp: fix tracy include case (tracy/Tracy.hpp);
  only resolved on case-insensitive filesystems

Runtime fixes:
- Application.cpp: open PACT storage at Data/Pact (was data/pact, which
  only worked on case-insensitive filesystems; with FallbackToInit the
  game silently created and read an empty archive on Linux)
- FactionUtil.cpp: Reaction perception override was unreachable without
  a local player set; return the override before the local-player
  early-out (matches the override-is-absolute semantics the tests
  expect)

Shader fixes:
- Model/Terrain Draw.vs.slang: SV_ClipDistance must be float or float[]
  (slang 2026.13 enforces this); use float[4] with element-wise writes

Build system fixes:
- ProjectUtil.lua: linkgroups + $ORIGIN rpath on Linux, fix executable
  extension map (no extension on Linux)
- ShaderCookerStandalone.lua: cook shaders as a post-build step on
  non-Windows; premake's gmake backend generates no build target for
  Utility projects, so the Shaders project's prebuild never ran
- Shaders.lua: adapt cooker invocation to the extension-map fix
- Submodules/Engine: bump to LinuxBuildFix (Linux/clang build and
  runtime fixes)
Luau integers in the Engine fork are a distinct 64-bit language type
with strict host-side reads, and the interpreter does not support
arithmetic on them (only native codegen does) - so script counters
incremented with += are correctly plain Lua numbers. The test harness
read those globals through the strict integer API, which yields 0 for
non-integer-tagged values; read them as numbers and cast host-side
instead.

Also bumps Submodules/Engine to the LinuxBuildFix commit reverting the
temporary double fallback in Zenith::ToInteger, restoring the intended
strict integer read semantics.
@Pursche
Pursche merged commit a48c3ff into master Aug 11, 2026
1 of 5 checks passed
@Foereaper
Foereaper deleted the LinuxBuildFix branch August 11, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant