Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build instructions out of date #461

Open
dabulla opened this issue Feb 28, 2024 · 5 comments
Open

Android build instructions out of date #461

dabulla opened this issue Feb 28, 2024 · 5 comments
Labels
bug Something isn't working synced to gitlab Synchronized to OpenXR internal GitLab

Comments

@dabulla
Copy link

dabulla commented Feb 28, 2024

cd src/conformance
./gradlew clean && ./gradlew build

there is no folder conformance.

I found gradle in hello_xr but building it under arch linux currently fails with this exception for me:

BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

I try to build OpenXR for Meta Quests.

@rpavlik
Copy link
Contributor

rpavlik commented Feb 29, 2024

What file has those build instructions? Those are only for the monorepo and OpenXR-CTS.

However, ./gradlew assembleVulkanDebug in src/tests/hello_xr should build a hello_xr APK pre-set to Vulkan. If you're trying to build the loader, you don't need to, it's published to maven central, but the loader on its own may be built with maintainer-scripts/build-aar.sh

@rpavlik-bot rpavlik-bot added the synced to gitlab Synchronized to OpenXR internal GitLab label Mar 7, 2024
@rpavlik-bot
Copy link
Collaborator

An issue (number 2230) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2230 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

@SafariMonkey
Copy link

The offending line seems to be

cd src/conformance

@rpavlik rpavlik added the bug Something isn't working label Apr 15, 2024
@chaask
Copy link

chaask commented Dec 10, 2024

Hi, I'm also facing this issue and tried ./gradlew assembleVulkanDebug as suggested by @rpavlik. However, now, I see a different issue. Some errors indicate that python is not available on my system. But I've python 3.12.8. Is there anyway to overcome this? BTW, I had to upgrade gradle to 8.9 from 7.5


> Task :configureCMakeDebug[arm64-v8a]-2
C/C++: CMake Error at src/CMakeLists.txt:433 (message):
C/C++:   Python 3 not found, but pre-generated
C/C++:   C:/code/github/openxr/OpenXR-SDK-Source/src/xr_generated_dispatch_table.h
C/C++:   not found
C/C++: Call Stack (most recent call first):
C/C++:   src/CMakeLists.txt:494 (run_xr_xml_generate)

> Task :configureCMakeDebug[arm64-v8a]-2 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':configureCMakeDebug[arm64-v8a]-2'.
> [CXX1429] error when building with cmake using C:\code\github\openxr\OpenXR-SDK-Source\CMakeLists.txt: -- The C compiler identification is Clang 12.0.9
  -- The CXX compiler identification is Clang 12.0.9
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Could NOT find Python3 (missing: Python3_EXECUTABLE Interpreter)
  -- Performing Test HAVE_FILESYSTEM_IN_STD
  -- Performing Test HAVE_FILESYSTEM_IN_STD - Failed
  -- Performing Test HAVE_FILESYSTEM_IN_STDEXPERIMENTAL
  -- Performing Test HAVE_FILESYSTEM_IN_STDEXPERIMENTAL - Failed
  -- Performing Test HAVE_FILESYSTEM_IN_STD_17
  -- Performing Test HAVE_FILESYSTEM_IN_STD_17 - Failed
  -- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB
  -- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB - Failed
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS - Failed
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS - Failed
  -- Found OpenGLES: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libGLESv3.so  found components: V3 V2
  -- Performing Test HAVE_EGL
  -- Performing Test HAVE_EGL - Success
  -- Found EGL: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include (found version "1.5")
  -- Enabling OpenGL|ES support
  -- Found Vulkan: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libvulkan.so
  -- Enabling Vulkan support
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - not found
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - yes
  -- Found Threads: TRUE
  -- Could NOT find JsonCpp (missing: JsonCpp_INCLUDE_DIR JsonCpp_LIBRARY)
  -- Enabling OpenGL support in hello_xr, loader_test, and conformance, if configured
  -- Found glslc: C:/Android/ndk/23.2.8568313/shader-tools/windows-x86_64/glslc.exe
  -- Looking for secure_getenv
  -- Looking for secure_getenv - not found
  -- Looking for __secure_getenv
  -- Looking for __secure_getenv - not found
  -- Looking for timespec_get
  -- Looking for timespec_get - not found
  -- OpenXR 1.1.43
  -- Configuring incomplete, errors occurred!
  See also "C:/code/github/openxr/OpenXR-SDK-Source/src/tests/hello_xr/.cxx/Debug/12y1h6y6/arm64-v8a/CMakeFiles/CMakeOutput.log".
  See also "C:/code/github/openxr/OpenXR-SDK-Source/src/tests/hello_xr/.cxx/Debug/12y1h6y6/arm64-v8a/CMakeFiles/CMakeError.log".

  C++ build system [configure] failed while executing:
      @echo off
      "C:\\Android\\cmake\\3.22.1\\bin\\cmake.exe" ^
        "-HC:\\code\\github\\openxr\\OpenXR-SDK-Source" ^
        "-DCMAKE_SYSTEM_NAME=Android" ^
        "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
        "-DCMAKE_SYSTEM_VERSION=24" ^
        "-DANDROID_PLATFORM=android-24" ^
        "-DANDROID_ABI=arm64-v8a" ^
        "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
        "-DANDROID_NDK=C:\\Android\\ndk\\23.2.8568313" ^
        "-DCMAKE_ANDROID_NDK=C:\\Android\\ndk\\23.2.8568313" ^
        "-DCMAKE_TOOLCHAIN_FILE=C:\\Android\\ndk\\23.2.8568313\\build\\cmake\\android.toolchain.cmake" ^
        "-DCMAKE_MAKE_PROGRAM=C:\\Android\\cmake\\3.22.1\\bin\\ninja.exe" ^
        "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\code\\github\\openxr\\OpenXR-SDK-Source\\src\\tests\\hello_xr\\build\\intermediates\\cxx\\Debug\\12y1h6y6\\obj\\arm64-v8a" ^
        "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\\code\\github\\openxr\\OpenXR-SDK-Source\\src\\tests\\hello_xr\\build\\intermediates\\cxx\\Debug\\12y1h6y6\\obj\\arm64-v8a" ^
        "-DCMAKE_BUILD_TYPE=Debug" ^
        "-BC:\\code\\github\\openxr\\OpenXR-SDK-Source\\src\\tests\\hello_xr\\.cxx\\Debug\\12y1h6y6\\arm64-v8a" ^
        -GNinja ^
        "-DBUILD_API_LAYERS=OFF" ^
        "-DBUILD_TESTS=ON" ^
        "-DBUILD_LOADER=ON" ^
        "-DBUILD_CONFORMANCE_TESTS=OFF" ^
        "-DBUILD_ALL_EXTENSIONS=ON" ^
        "-DHELLOXR_DEFAULT_GRAPHICS_PLUGIN=Vulkan"
    from C:\code\github\openxr\OpenXR-SDK-Source\src\tests\hello_xr
  CMake Error at src/CMakeLists.txt:433 (message):
    Python 3 not found, but pre-generated
    C:/code/github/openxr/OpenXR-SDK-Source/src/xr_generated_dispatch_table.h
    not found
  Call Stack (most recent call first):
    src/CMakeLists.txt:494 (run_xr_xml_generate)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.9/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 7s
21 actionable tasks: 21 executed

C:\code\github\openxr\OpenXR-SDK-Source\src\tests\hello_xr>python --version
Python 3.12.8

@rpavlik
Copy link
Contributor

rpavlik commented Dec 16, 2024

I am assuming you probably do no

Hi, I'm also facing this issue and tried ./gradlew assembleVulkanDebug as suggested by @rpavlik. However, now, I see a different issue. Some errors indicate that python is not available on my system. But I've python 3.12.8. Is there anyway to overcome this? BTW, I had to upgrade gradle to 8.9 from 7.5


> Task :configureCMakeDebug[arm64-v8a]-2
C/C++: CMake Error at src/CMakeLists.txt:433 (message):
C/C++:   Python 3 not found, but pre-generated
C/C++:   C:/code/github/openxr/OpenXR-SDK-Source/src/xr_generated_dispatch_table.h
C/C++:   not found
C/C++: Call Stack (most recent call first):
C/C++:   src/CMakeLists.txt:494 (run_xr_xml_generate)

> Task :configureCMakeDebug[arm64-v8a]-2 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':configureCMakeDebug[arm64-v8a]-2'.
> [CXX1429] error when building with cmake using C:\code\github\openxr\OpenXR-SDK-Source\CMakeLists.txt: -- The C compiler identification is Clang 12.0.9
  -- The CXX compiler identification is Clang 12.0.9
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Could NOT find Python3 (missing: Python3_EXECUTABLE Interpreter)
  -- Performing Test HAVE_FILESYSTEM_IN_STD
  -- Performing Test HAVE_FILESYSTEM_IN_STD - Failed
  -- Performing Test HAVE_FILESYSTEM_IN_STDEXPERIMENTAL
  -- Performing Test HAVE_FILESYSTEM_IN_STDEXPERIMENTAL - Failed
  -- Performing Test HAVE_FILESYSTEM_IN_STD_17
  -- Performing Test HAVE_FILESYSTEM_IN_STD_17 - Failed
  -- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB
  -- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB - Failed
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS - Failed
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS
  -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS - Failed
  -- Found OpenGLES: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libGLESv3.so  found components: V3 V2
  -- Performing Test HAVE_EGL
  -- Performing Test HAVE_EGL - Success
  -- Found EGL: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include (found version "1.5")
  -- Enabling OpenGL|ES support
  -- Found Vulkan: C:/Android/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libvulkan.so
  -- Enabling Vulkan support
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - not found
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - yes
  -- Found Threads: TRUE
  -- Could NOT find JsonCpp (missing: JsonCpp_INCLUDE_DIR JsonCpp_LIBRARY)
  -- Enabling OpenGL support in hello_xr, loader_test, and conformance, if configured
  -- Found glslc: C:/Android/ndk/23.2.8568313/shader-tools/windows-x86_64/glslc.exe
  -- Looking for secure_getenv
  -- Looking for secure_getenv - not found
  -- Looking for __secure_getenv
  -- Looking for __secure_getenv - not found
  -- Looking for timespec_get
  -- Looking for timespec_get - not found
  -- OpenXR 1.1.43
  -- Configuring incomplete, errors occurred!
  See also "C:/code/github/openxr/OpenXR-SDK-Source/src/tests/hello_xr/.cxx/Debug/12y1h6y6/arm64-v8a/CMakeFiles/CMakeOutput.log".
  See also "C:/code/github/openxr/OpenXR-SDK-Source/src/tests/hello_xr/.cxx/Debug/12y1h6y6/arm64-v8a/CMakeFiles/CMakeError.log".

  C++ build system [configure] failed while executing:
      @echo off
      "C:\\Android\\cmake\\3.22.1\\bin\\cmake.exe" ^
        "-HC:\\code\\github\\openxr\\OpenXR-SDK-Source" ^
        "-DCMAKE_SYSTEM_NAME=Android" ^
        "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
        "-DCMAKE_SYSTEM_VERSION=24" ^
        "-DANDROID_PLATFORM=android-24" ^
        "-DANDROID_ABI=arm64-v8a" ^
        "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
        "-DANDROID_NDK=C:\\Android\\ndk\\23.2.8568313" ^
        "-DCMAKE_ANDROID_NDK=C:\\Android\\ndk\\23.2.8568313" ^
        "-DCMAKE_TOOLCHAIN_FILE=C:\\Android\\ndk\\23.2.8568313\\build\\cmake\\android.toolchain.cmake" ^
        "-DCMAKE_MAKE_PROGRAM=C:\\Android\\cmake\\3.22.1\\bin\\ninja.exe" ^
        "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\code\\github\\openxr\\OpenXR-SDK-Source\\src\\tests\\hello_xr\\build\\intermediates\\cxx\\Debug\\12y1h6y6\\obj\\arm64-v8a" ^
        "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\\code\\github\\openxr\\OpenXR-SDK-Source\\src\\tests\\hello_xr\\build\\intermediates\\cxx\\Debug\\12y1h6y6\\obj\\arm64-v8a" ^
        "-DCMAKE_BUILD_TYPE=Debug" ^
        "-BC:\\code\\github\\openxr\\OpenXR-SDK-Source\\src\\tests\\hello_xr\\.cxx\\Debug\\12y1h6y6\\arm64-v8a" ^
        -GNinja ^
        "-DBUILD_API_LAYERS=OFF" ^
        "-DBUILD_TESTS=ON" ^
        "-DBUILD_LOADER=ON" ^
        "-DBUILD_CONFORMANCE_TESTS=OFF" ^
        "-DBUILD_ALL_EXTENSIONS=ON" ^
        "-DHELLOXR_DEFAULT_GRAPHICS_PLUGIN=Vulkan"
    from C:\code\github\openxr\OpenXR-SDK-Source\src\tests\hello_xr
  CMake Error at src/CMakeLists.txt:433 (message):
    Python 3 not found, but pre-generated
    C:/code/github/openxr/OpenXR-SDK-Source/src/xr_generated_dispatch_table.h
    not found
  Call Stack (most recent call first):
    src/CMakeLists.txt:494 (run_xr_xml_generate)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.9/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 7s
21 actionable tasks: 21 executed

C:\code\github\openxr\OpenXR-SDK-Source\src\tests\hello_xr>python --version
Python 3.12.8

That is weird, but it's more like a generic gradle/android gradle plugin issue than something specific to OpenXR. We are not doing anything particularly fancy here, not sure why it's not working for you even though python is in your path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working synced to gitlab Synchronized to OpenXR internal GitLab
Projects
None yet
Development

No branches or pull requests

5 participants