googlesamples/android-vulkan-tutorials

tutorial06_texture build error

linuxaged opened this issue · 13 comments

gradle builds four different abi libs: armeabi-v7a, arm64-v8a, x86, x86-64, but only armeabi-v7a type libshaderc.a is downloaded. Then there's the link error:

Error:error: 'C:/Users/linuxaged/.cdep/exploded/com.github.ggfan/shaderc/0.0.1/shaderc-arm64-v8a-cxx_static.zip/lib/arm64-v8a/libshaderc.a', needed by 'D:/workspace/android-vulkan-tutorials/tutorial06_texture/app/build/intermediates/cmake/debug/obj/arm64-v8a/libvktuts.so', missing and no known rule to make it

How to tell the cdep to download all libs we need? Change the cdep.sha256 to something like this?

I also had a problem building tutorial06. I have a fresh install of Android Studio, on Mac, and I get this error:

Error:error: '/Users/gfan/.cdep/exploded/com.github.ggfan/shaderc/0.0.1/shaderc-x86-cxx_static.zip/lib/x86/libshaderc.a', needed by '/Users/dneto/project/android-vulkan-tutorials/tutorial06_texture/app/build/intermediates/cmake/debug/obj/x86/libvktuts.so', missing and no known rule to make it

Is the Cdep build configured correctly? There is no user "gfan" on my machine, but the error references directory /Users/gfan

Edit the gradle to build the armeabi-v7a lib only can fix this temporarily.

ggfan commented

let me take a look
@dneto0: what you seeing is because of error of my checking in: ./cdep/modules/cdep-dependencies-config.cmake. It should not be checked in, should be re-generated instead. May you delete that directory and run "./cdep" at project directory ( like android-vulkan-tutorials/tutorial06_texture)?

ggfan commented

@linuxaged, may you also try it with re-generating cmake module file:
cd tutorial06-texture
rmdir /S .cdep
[Otpional: this should not matter. also removing $HOME/.cdep
cdep.bat

then build your project. I tried on old machine of window 7, it builds and runs fine. Inside APK, I do have 4 API libs packed

please kindly let me know what your result is.

ggfan commented

#29 merged. may you update your source code, and do a
git clean -xdf
so previous local .cdep is removed, then import to android studio and give it a shot?

thanks

I pulled latest master, including your #29

commit 8eb991a
Merge: 47605d5 8f77b4e
Author: Gerry ggfan@users.noreply.github.com
Date: Fri Jun 2 10:30:28 2017 -0700

Merge pull request #29 from googlesamples/remove-temp-folder

I confirmed there is no .cdep directory in the project root.

But I still get a failure when I try to build the project.

Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources]
Error:error: '/Users/gfan/.cdep/exploded/com.github.ggfan/shaderc/0.0.1/shaderc-x86-cxx_static.zip/lib/x86/libshaderc.a', needed by '/usr/local/google/home/dneto/android-vulkan-tutorials/tutorial06_texture/app/build/intermediates/cmake/debug/obj/x86/libvktuts.so', missing and no known rule to make it

This time I'm running on Linux. Maybe there's something wrong with the cdep release you made?

ggfan commented

let me check it on linux.

ggfan commented

get the master branch fresh on linux, it seems to be fine. But it may not prove anything to your failure:
'/Users/gfan/.cdep/exploded/com.github.ggfan/shaderc/0.0.1/shaderc-x86-cxx_static.zip/lib/x86/libshaderc.a'
the above should not happen since it points to my local machine, that connection would provided inside cmake module file; cmake module file should be generated by running ./cdep at project directory. ( still suspecting that cmake module is trouble )

I will find someone with different user on different machine to see.

ggfan commented

yes, tried on a different linux machine with different users, nothing cdep on it. clone the repo and open it with Android Studio ( 2.3.x ), built and runs fine.

maybe just one more trial on your linux:
0) exit android studio

  1. delete $HOME/.cdep directory
  2. delete ${PROJECT}/tutorial06_texture/.cdep directory
  3. re-import project into android studio ( I was not using "open project")
  4. .cdep directory should be created and path in the cmake_module file should point to your ${HOME}/.cdep for local repo, NOT "users/gfan", it is wrong if you see it
    thanks

That worked this time, on both Linux and Mac.
Thanks.

Works fine now ( Win10, Android Studio 2.3.2 )

I am getting the same error. Using Windows 10 and Android Studio Bumblebee 2021
Please find the below error:

Build command failed.
Error while executing process C:\Users\SourabhGoel\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\android-studio\android-vulkan-tutorials\tutorial06_texture\app.cxx\cmake\debug\armeabi-v7a vktuts}
ninja: Entering directory `D:\android-studio\android-vulkan-tutorials\tutorial06_texture\app.cxx\cmake\debug\armeabi-v7a'

ninja: error: 'D:/android-studio/android-vulkan-tutorials/tutorial06_texture/app/src/main/cpp/shaderc/libs/c++_static/armeabi-v7a/libshaderc.a', needed by 'D:/android-studio/android-vulkan-tutorials/tutorial06_texture/app/build/intermediates/cmake/debug/obj/armeabi-v7a/libvktuts.so', missing and no known rule to make it