Skip to content

Godot (Jolt) cannot be cross-compiled on Linux for ppc64 and rv64 #100557

Closed
@MBCX

Description

@MBCX

Tested versions

System information

Godot v4.4.dev (9ee41ad73) - Windows 10.0.26100 - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 31.0.21921.1000) - Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz (6 threads)

Issue description

Since the merger of Jolt Physics (#99895), now Godot cannot be compiled nor cross-compiled for other architectures (PPC and RISC-V/RV64). It can only be compiled/cross-compiled for x86 and/or ARM.

For both, it does say that the architecture is unsupported:

In file included from thirdparty/jolt_physics/Jolt/RegisterTypes.cpp:5:
In file included from thirdparty/jolt_physics/Jolt/Jolt.h:8:
thirdparty/jolt_physics/Jolt/Core/Core.h:206:3: error: Unsupported CPU architecture
  206 |         #error Unsupported CPU architecture
      |          ^
BUILD: Elapsed time [00:02:34]
Compiling thirdparty/jolt_physics/Jolt/AABBTree/AABBTreeBuilder.cpp ...
In file included from thirdparty/jolt_physics/Jolt/AABBTree/AABBTreeBuilder.cpp:5:
In file included from thirdparty/jolt_physics/Jolt/Jolt.h:8:
thirdparty/jolt_physics/Jolt/Core/Core.h:206:3: error: Unsupported CPU architecture
  206 |         #error Unsupported CPU architecture
      |          ^
thirdparty/jolt_physics/Jolt/Core/Core.h:458:34: error: use of undeclared identifier 'JPH_CPU_ADDRESS_BITS'
  458 | static_assert(sizeof(void *) == (JPH_CPU_ADDRESS_BITS == 64? 8 : 4), "Invalid size of pointer" );
      |                                  ^
In file included from thirdparty/jolt_physics/Jolt/RegisterTypes.cpp:5:
In file included from thirdparty/jolt_physics/Jolt/Jolt.h:12:
In file included from thirdparty/jolt_physics/Jolt/Core/Array.h:7:
thirdparty/jolt_physics/Jolt/Core/STLAllocator.h:47:63: error: use of undeclared identifier 'JPH_CPU_ADDRESS_BITS'
   47 |         static constexpr bool   needs_aligned_allocate = alignof(T) > (JPH_CPU_ADDRESS_BITS == 32? 8 : 16);
      |                                                                        ^
# ......
# .....

But this is kind of a bummer, more so for rv64 users.

Steps to reproduce

  1. Follow the instructions for setting up an rv64 cross-compiler.
  2. Execute the build command there.
  3. Wait for failure.

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions