godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.12k stars 21.18k forks source link

Can't build android templates (open_xr error) #96019

Closed boruok closed 2 months ago

boruok commented 2 months ago

Tested versions

System information

Ubuntu 22.04.4 LTS, GTX1060 6GB, NVIDIA 535.183.01, Compatibility mode

Issue description

can't build android templates with disabled open_xr module, both arm32 and arm64 fails with following:

[100%] progress_finish(["progress_finish"], [])
[100%] Linking Shared Library bin/libgodot.android.template_debug.arm64.so ...
ld: error: undefined symbol: XRServer::get_xr_mode()
>>> referenced by java_godot_lib_jni.cpp
>>>               platform/android/java_godot_lib_jni.os:(Java_org_godotengine_godot_GodotLib_step)
>>> referenced by java_godot_lib_jni.cpp
>>>               platform/android/java_godot_lib_jni.os:(Java_org_godotengine_godot_GodotLib_step)
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [bin/libgodot.android.template_debug.arm64.so] Error 1
scons: building terminated because of errors.
[Time elapsed: 00:00:14.21]

Steps to reproduce

compile android templates with following:

scons platform=android arch=arm64 target=template_debug generate_apk=yes build_profile="game.build"

game.build

{
    "disabled_build_options": {
        "disable_2d_physics": true,
        "disable_3d": true,
        "disable_3d_physics": true,
        "disable_navigation": true,
        "openxr": false,
        "vulkan": false
    },
    "disabled_classes": [
    ],
    "type": "build_profile"
}

Minimal reproduction project (MRP)

matheusmdx commented 2 months ago

Bisecting points to #94799 as the culprit, @m4gr3d

image

akien-mga commented 1 month ago

Tested versions

  • reproduced in v4.3.stable.official [77dcf97]

For the record, please make sure the version you list is accurate. Two regression reports you filed were actually only affecting the master branch (4.4) but were reported as affecting 4.3.stable, so I've spent some time unnecessary trying to cherry-pick those PRs to 4.3 and failing.