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 failure #980

Open
yaman-lunarg opened this issue Apr 2, 2024 · 9 comments
Open

Android build failure #980

yaman-lunarg opened this issue Apr 2, 2024 · 9 comments

Comments

@yaman-lunarg
Copy link

$ cmake -S . -B build \

-D CMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake
-D ANDROID_PLATFORM=26
-D CMAKE_ANDROID_ARCH_ABI=arm64-v8a
-D CMAKE_ANDROID_STL_TYPE=c++_static
-D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=NO
-D CMAKE_BUILD_TYPE=Release
-D UPDATE_DEPS=ON
-G Ninja
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Users/Vector/AppData/Local/ndk/21.3.6528147/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: D:/Users/Vector/AppData/Local/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Starting builds in D:\Personal\Projects\LunarG_repo\vulkanTools\external\Android\Release\armv7-a
Installed Vulkan-Headers (v1.3.280) in 0.6241400241851807 seconds
Installed volk (vulkan-sdk-1.3.280) in 1.1439473628997803 seconds
-- Found Git: D:/Program Files/Git/mingw64/bin/git.exe (found version "2.32.0.windows.2")
-- Configuring done (13.6s)
CMake Error at cube/CMakeLists.txt:229 (target_link_libraries):
Target "vkcube" links to:

Vulkan::Headers

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

CMake Error at vulkaninfo/CMakeLists.txt:109 (target_link_libraries):
Target "vulkaninfo" links to:

Vulkan::Headers

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

-- Generating done (0.0s)
CMake Generate step failed. Build files cannot be regenerated correctly.

@charles-lunarg
Copy link
Contributor

Can you post the CMakeCache.txt, and any relevant CMake logs?

I can see that Vulkan-Headers was installed locally, but it seems that Vulkan-Tools was not made aware of it.

I assume the build is trying to use the clang compiler but I just want to confirm that.

@yaman-lunarg
Copy link
Author

Found 3 cmake cache files:
CMakeCache.txt
CMakeCache (1).txt
CMakeCache (2).txt

@charles-lunarg
Copy link
Contributor

Could you also include the D:/Users/Vector/AppData/Local/ndk/21.3.6528147/build/cmake/android.toolchain.cmake file?

Wait, this looks like an issue:
-D CMAKE_ANDROID_ARCH_ABI=arm64-v8a
Then later on, it appears `armv7-a' is where the Vulkan-Headers are being installed.

Starting builds in D:\Personal\Projects\LunarG_repo\vulkanTools\external\Android\Release\armv7-a

@yaman-lunarg
Copy link
Author

yaman-lunarg commented Apr 2, 2024

Arm 7 vs 8 also caught my attention.
.txt to make github happy.
I have 3 different NDKs:
21.3.6528147 25.2.9519653 26.2.11394342
android.toolchain.cmake.txt

@charles-lunarg
Copy link
Contributor

So excuse my ignorance, but do you need to use a specific ndk with each android platform? I see that its using the 21.3.xxx ndk while the ANDROID_PLATFORM is 26.

@yaman-lunarg
Copy link
Author

I am very new to this android environment. Not sure how I ended up with three.

@charles-lunarg
Copy link
Contributor

I'm not much better, and all of my android experience is on linux so I cannot rule out weirdness due to Windows.

@yaman-lunarg
Copy link
Author

25.2.9519653 is probably related to Khronos Samples.

@yaman-lunarg
Copy link
Author

Re-run the build using $ANDROID_NDK_HOME set to D:\Users\Vector\AppData\Local\ndk\26.2.11394342. Same error.

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

No branches or pull requests

2 participants