Skip to content

Address config/build warnings for Cardboard SDK with NDK v27.X #476

Open
@tellypresence

Description

When building Cardboard SDK with Android Studio Koala Feature Drop Patch 1 and NDK v27.X (supported since Cardboard v1.26.0) several warnings are reported. It would be good to address the root causes in an effort to make the build warning-free.

SDK XML version 4 was encountered warning

> Task :sdk:sdk:configureCMakeDebug[arm64-v8a]
[CXX5304] This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. 
This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

Missing project() command in CMakeLists.txt:

C/C++: CMake Warning (dev) in CMakeLists.txt:
C/C++:   No project() command is present.  The top-level CMakeLists.txt file must
C/C++:   contain a literal, direct call to the project() command.  Add a line of
C/C++:   code such as
C/C++:     project(ProjectName)
C/C++:   near the top of the file, but after cmake_minimum_required().
C/C++:   CMake is pretending there is a "project(Project)" command on the first
C/C++:   line.
C/C++: This warning is for project developers.  Use -Wno-dev to suppress it.

Missing field initializer warnings in 3 source files:

<...>/cardboard/sdk/rendering/android/vulkan_distortion_renderer.cc
<...>/cardboard/sdk/unity/xr_unity_plugin/vulkan/vulkan_renderer.cc
<...>/cardboard/sdk/unity/xr_unity_plugin/vulkan/vulkan_widgets_renderer.cc

e.g.

C/C++: <...>/cardboard/sdk/rendering/android/vulkan_distortion_renderer.cc:190:49: warning: 
    missing field 'pNext' initializer [-Wmissing-field-initializers]
C/C++: 15 warnings generated.

Also in vulkan_renderer.cc
C/C++: <...>/cardboard/sdk/unity/xr_unity_plugin/vulkan/vulkan_renderer.cc:308:5: warning: 
    missing field 'flags' initializer [-Wmissing-field-initializers]
C/C++: 10 warnings generated.

C/C++: <...>/cardboard/sdk/unity/xr_unity_plugin/vulkan/vulkan_widgets_renderer.cc:134:74: warning: 
    missing field 'pNext' initializer [-Wmissing-field-initializers]
C/C++: 14 warnings generated.

invalid ABI 'riscv64' configuration warning

There's also this warning; not sure if it's Cardboard-specific or due to NDK v27.X

WARNING: C/C++: Ignoring invalid ABI 'riscv64' found in ABI metadata file 
    '<...>/Android/Sdk/ndk/27.1.12297006/meta/abis.json'.
C/C++: Ignoring invalid ABI 'riscv64' found in ABI metadata file '<...>/Android/Sdk/ndk/27.1.12297006/meta/abis.json'.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions