Results 1 to 2 of 2

Thread: android studio issues

  1. #1
    Newbie
    Join Date
    Dec 2017
    Posts
    1

    android studio issues

    I am trying to work with vulkan on android and I am getting link errors after adding the validation layers. I am using https://github.com/KhronosGroup/Vulk...lidationLayers. I have added the project and setup the dependency as instructed, but it doesn't link with the following errors. Any idea what file or library is missing? Also as a side note the gradle file is out of date and had to be modified to work.
    Code :
    Build VkLayer_parameter_validation x86
    [1/2] Building CXX object CMakeFiles/VkLayer_parameter_validation.dir/H_/Vulkan-LoaderAndValidationLayers-master/layers/parameter_validation_utils.cpp.o
    [2/2] Linking CXX shared library ..\..\..\..\build\intermediates\cmake\debug\obj\x86\libVkLayer_parameter_validation.so
    Build VkLayer_object_tracker x86
    [1/3] Building CXX object CMakeFiles/VkLayer_object_tracker.dir/H_/Vulkan-LoaderAndValidationLayers-master/layers/vk_layer_table.cpp.o
    [2/3] Building CXX object CMakeFiles/VkLayer_object_tracker.dir/H_/Vulkan-LoaderAndValidationLayers-master/build-android/generated/include/object_tracker.cpp.o
    [3/3] Linking CXX shared library ..\..\..\..\build\intermediates\cmake\debug\obj\x86\libVkLayer_object_tracker.so
    FAILED: cmd.exe /C "cd . && C:\Users\david_5d\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe  --target=i686-none-linux-android --gcc-toolchain=C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sysroot -fPIC -isystem C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -D__ANDROID_API__=24 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security   -std=c++11 -Wall -Werror         -Wno-unused-function -Wno-unused-const-variable         -Wno-c++98-compat-pedantic -DVK_PROTOTYPES         -DVK_USE_PLATFORM_ANDROID_KHR -O2 -DNDEBUG  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-24/arch-x86 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libVkLayer_object_tracker.so -o ..\..\..\..\build\intermediates\cmake\debug\obj\x86\libVkLayer_object_tracker.so CMakeFiles/VkLayer_object_tracker.dir/H_/Vulkan-LoaderAndValidationLayers-master/build-android/generated/include/object_tracker.cpp.o CMakeFiles/VkLayer_object_tracker.dir/H_/Vulkan-LoaderAndValidationLayers-master/layers/vk_layer_table.cpp.o  -llog liblayer_utils.a -latomic -lm "C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && cd ."
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:35: error: undefined reference to 'object_tracker::DeviceReportUndestroyedObjects(VkDevice_T*, VulkanObjectType, UNIQUE_VALIDATION_ERROR_CODE)'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:36: error: undefined reference to 'object_tracker::DeviceReportUndestroyedObjects(VkDevice_T*, VulkanObjectType, UNIQUE_VALIDATION_ERROR_CODE)'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:37: error: undefined reference to 'object_tracker::DeviceReportUndestroyedObjects(VkDevice_T*, VulkanObjectType, UNIQUE_VALIDATION_ERROR_CODE)'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:38: error: undefined reference to 'object_tracker::DeviceReportUndestroyedObjects(VkDevice_T*, VulkanObjectType, UNIQUE_VALIDATION_ERROR_CODE)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include\bits/gthr-default.h:748: error: undefined reference to 'object_tracker::global_lock'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include\bits/gthr-default.h:778: error: undefined reference to 'object_tracker::global_lock'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:97: error: undefined reference to 'object_tracker::ot_instance_table_map'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include\bits/gthr-default.h:778: error: undefined reference to 'object_tracker::global_lock'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:160: error: undefined reference to 'object_tracker::ValidateDeviceObject(unsigned long long, UNIQUE_VALIDATION_ERROR_CODE, UNIQUE_VALIDATION_ERROR_CODE)'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:165: error: undefined reference to 'object_tracke
    r::layer_data_map'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include\bits/gthr-default.h:748: error: undefined reference to 'object_tracker::global_lock'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:112: error: undefined reference to 'object_tracker::ot_instance_table_map'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:131: error: undefined reference to 'object_tracker::ot_instance_table_map'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:146: error: undefined reference to 'object_tracker::ot_instance_table_map'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:255: error: undefined reference to 'object_tracker::ot_device_table_map'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:160: error: undefined reference to 'object_tracker::ValidateDeviceObject(unsigned long long, UNIQUE_VALIDATION_ERROR_CODE, UNIQUE_VALIDATION_ERROR_CODE)'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:165: error: undefined reference to 'object_tracker::layer_data_map'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:160: error: undefined reference to 'object_tracker::ValidateDeviceObject(unsigned long long, UNIQUE_VALIDATION_ERROR_CODE, UNIQUE_VALIDATION_ERROR_CODE)'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:165: error: undefined reference to 'object_tracker::layer_data_map'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:160: error: undefined reference to 'object_tracker::ValidateDeviceObject(unsigned long long, UNIQUE_VALIDATION_ERROR_CODE, UNIQUE_VALIDATION_ERROR_CODE)'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:165: error: undefined reference to 'object_tracker::layer_data_map'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\inclu
    de/object_tracker.cpp:269: error: undefined reference to 'object_tracker::ot_device_table_map'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:283: error: undefined reference to 'object_tracker::ot_device_table_map'
    H:\Vulkan-LoaderAndValidationLayers-master\build-android\generated\include/object_tracker.cpp:300: error: undefined reference to 'object_tracker::ot_device_table_map'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:210: error: undefined reference to 'object_tracker::object_track_index'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:210: error: undefined reference to 'object_tracker::object_track_index'
    H:/Vulkan-LoaderAndValidationLayers-master/layers/object_tracker.h:210: error: undefined reference to 'object_tracker::object_track_index'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DestroyInstance(VkInstance_T*, VkAllocationCallbacks const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::EnumeratePhysicalDevices(VkInstance_T*, unsigned int*, VkPhysicalDevice_T**)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice_T*, unsigned int*, VkQueueFamilyProperties*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::GetInstanceProcAddr(VkIn
    stance_T*, char const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::GetDeviceProcAddr(VkDevice_T*, char const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::CreateDevice(VkPhysicalDevice_T*, VkDeviceCreateInfo const*, VkAllocationCallbacks const*, VkDevice_T**)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DestroyDevice(VkDevice_T*, VkAllocationCallbacks const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::EnumerateInstanceExtensionProperties(char const*, unsigned int*, VkExtensionProperties*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*, VkExtensionProperties*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::EnumerateInstanceLayerProperties(unsigned int*, VkLayerProperties*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::EnumerateDeviceLayerProperties(VkPhysicalDevice_T*, unsigned int*, VkLayerProperties*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::GetDeviceQueue(VkDevice_T*, unsigned int, unsigned int, VkQueue_T**)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bu
    ndle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::CreateComputePipelines(VkDevice_T*, unsigned long long, unsigned int, VkComputePipelineCreateInfo const*, VkAllocationCallbacks const*, unsigned long long*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::CreateDescriptorSetLayout(VkDevice_T*, VkDescriptorSetLayoutCreateInfo const*, VkAllocationCallbacks const*, unsigned long long*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DestroyDescriptorPool(VkDevice_T*, unsigned long long, VkAllocationCallbacks const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::ResetDescriptorPool(VkDevice_T*, unsigned long long, unsigned int)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::AllocateDescriptorSets(VkDevice_T*, VkDescriptorSetAllocateInfo const*, unsigned long long*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::FreeDescriptorSets(VkDevice_T*, unsigned long long, unsigned int, unsigned long long const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::UpdateDescriptorSets(VkDevice_T*, unsigned int, VkWriteDescriptorSet const*, unsigned int, VkCopyDescriptorSet const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DestroyComman
    dPool(VkDevice_T*, unsigned long long, VkAllocationCallbacks const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::AllocateCommandBuffers(VkDevice_T*, VkCommandBufferAllocateInfo const*, VkCommandBuffer_T**)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::FreeCommandBuffers(VkDevice_T*, unsigned long long, unsigned int, VkCommandBuffer_T* const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::BeginCommandBuffer(VkCommandBuffer_T*, VkCommandBufferBeginInfo const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DestroySwapchainKHR(VkDevice_T*, unsigned long long, VkAllocationCallbacks const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::GetSwapchainImagesKHR(VkDevice_T*, unsigned long long, unsigned int*, unsigned long long*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice_T*, unsigned int*, VkQueueFamilyProperties2KHR*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::CmdPushDescriptorSetKHR(VkCommandBuffer_T*, VkPipelineBindPoint, unsigned long long, unsigned int, unsigned int, VkWriteDescriptorSet const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145:
     error: undefined reference to 'object_tracker::CreateDebugReportCallbackEXT(VkInstance_T*, VkDebugReportCallbackCreateInfoEXT const*, VkAllocationCallbacks const*, unsigned long long*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DestroyDebugReportCallbackEXT(VkInstance_T*, unsigned long long, VkAllocationCallbacks const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DebugReportMessageEXT(VkInstance_T*, unsigned int, VkDebugReportObjectTypeEXT, unsigned long long, unsigned int, int, char const*, char const*)'
    C:/Users/david_5d/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include\bits/stl_pair.h:145: error: undefined reference to 'object_tracker::DebugMarkerSetObjectNameEXT(VkDevice_T*, VkDebugMarkerObjectNameInfoEXT const*)'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    :layerLib:externalNativeBuildDebug FAILED

  2. #2
    Newbie
    Join Date
    Dec 2017
    Posts
    1
    Note that the gradle build isn't regularly tested right now. NDK build is supported method as documented in BUILD.md. I'll notify the dev who originally added the gradle build that it needs to be updated.
    For future reference, you'll get a more consistent and quick response to issues with Vulkan Validation if you great a new issue directly in the github repo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean