197: find_package(Vulkan REQUIRED)
198: message("Vulkan was found")
199: # find the vsg
200: find_package(vsg REQUIRED)
HI Robert, thanks. Please find more info inlined. Hopefully there is something revealing in it.
Hi Rollastre,
You haven't provide enough info to guess what the problem might be.
What OS and build tools are you using?
I've seen this in all OSes I tried so far (Linux, Windows, Mac, and in this case Android). So, this seems to be a general thing. I wonder if it is a bug, actually.
I build with CMake. The only thing that might be somehow not
standard is that I use conan to satisfy dependencies. I have conan
recipes for both Vulkan and VSG which work fine and build
(apparently at least). When I run this,
cmake .. -DCMAKE_BUILD_TYPE="Debug" \
-DCMAKE_SYSTEM_NAME="Android" \
-DANDROID_PLATFORM_LEVEL=26 \
-DANDROID_STL="c++_shared" \
-DANDROID_ABI=armeabi-v7a \
-DANDROID_NDK_RELEASE=25.0.8775105 \
-DANDROID_NDK=/opt/android/AndroidSdk/ndk/25.0.8775105 \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
-DGRADLEW=/opt/Qt/5.14.1/Src/qtwebengine/src/3rdparty/chromium/third_party/flatbuffers/src/android/gradlew \
-DCMAKE_ANDROID_SDK=/opt/android/AndroidSdk/ \
-DJRE_HOME=/opt/android/android-studio/jre/ \
-DVulkan_INCLUDE_DIR=/opt/android/AndroidSdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/vulkan \
-DVulkan_LIBRARY=/opt/android/AndroidSdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/26/libvulkan.so \
this is the output I get
# find vulkan
find_package(Vulkan REQUIRED)
message("Vulkan was found")
# find the vsg
find_package(vsg REQUIRED)
message("Vsg was found")
find_package(RAPIDJSON REQUIRED)
message("RapidJSON was found")
in the CMakeLists.txt file
However, what puzzles me is that Generation step fails in a line that succeded in Configuration step (find_package(vsg REQUIRED)).
Which version of Vulkan do you have installed?
In this case, the one coming from the Android NDK 25 (I am not sure which one it is). But, again, experience this in 1.2.182.0 and now in version 1.3.216.0 when in other OSs
Which VSG projects have you built and installed?
Just VSG. I.e. no vsgExamples, no vsgXChange, and the like.
Do they all build and install OK?
I'd say so, yes.
Have you run the vsgExamples?
--No, not really.
Cheers,Robert
You received this message because you are subscribed to the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vsg-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vsg-users/CAFN7Y%2BVJNKjC9jHwgkYfvbUjF6G03jU%2BFjmPe80dSJFxA4Yc_g%40mail.gmail.com.
| cmake . -DCMAKE_TOOLCHAIN_FILE=$(dirname $(which ndk-build))/build/cmake/android.toolchain.cmake -DANDROID_ABI=ameabi-v7a -DANDROID_PLATFORM=32 -DBUILD_SHARED_LIBS=ON As Vulkan is included in the NDK, that toolchain file should configure everything you need, and provide the FindVulkan.cmake (allowing package search to work). The toolchain file has various options for STL variant, platform/compilers, etc. I haven't touched Conan in a while, but expect it can provide a similar toolchain file. That would be in line with other cmake-integrated package managers. I've personally built vsg against a vcpkg install (Windows & Linux), which installs packages to a local sysroot, and provides a toolchain file for cmake to use - Given that, calls to find_package search the vcpkg install tree rather than the system (vcpkg is tightly integrated into cmake, I believe conan had similar concept when I last looked). What may be happening is that you've provided the vulkan location, but for some reason it's only created a 'vulkan' target, rather than the new style 'Vulkan::Vulkan' cmake target. I've seen similar issues when using an outdated CMake, or one with a broken FindVulkan.cmake or similar (though I haven't seen this with vulkan specifically). On either a Linux or Android build, it's worth trying the toolchain file approach, or if you've got a minimal test case on Linux I could try and reproduce this (I've been meaning to learn Conan at some point). (Hope you heal quickly Rob) Thanks Gareth |
--
You received this message because you are subscribed to the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vsg-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vsg-users/CAFN7Y%2BV0CAnkubaKRrpmF_khBr621JXoGNEPhTohFpbiAVo6Dw%40mail.gmail.com.