I found a few examples online for both ways. In SaschaWillems examples, .so is used:
https://github.com/SaschaWillems/Vulkan/blob/master/base/VulkanAndroid.cpp#L142 In Vulkan-Tools there's a mix. Here the implementation falls back to .so.1 if .so is not found: https://github.com/KhronosGroup/Vulkan-Tools/blob/master/vulkaninfo/vulkaninfo.h#L256-L257 While here only .so is used: https://github.com/KhronosGroup/Vulkan-Tools/blob/master/common/vulkan_wrapper.cpp#L25 https://github.com/KhronosGroup/Vulkan-Tools/blob/master/scripts/generate_vulkan_wrapper.py#L2043 With no consistency or guidance I'm not sure what the right solution is. At first I thought perhaps it is better for the caller to be more specific so that a compatibility problem is detected with a dlopen failure. Complicating that, though, is that vulkan-loader 1.2 is not compatible with 1.3. Plus why does Vulkan-Tools use .so.1 second? Probably to get around the fact that the .so is in the dev package? Is it possible and/or reasonable for a binary to load the .so then check the version and handle that at runtime? If so, then including the .so in the main package makes sense. Or should the user in this case be expected to use RDEPENDS to install the .so? From: Martin Jansa <[email protected]> Sent: Monday, October 17, 2022 7:29 AM To: Ross Burton <[email protected]> Cc: Tom Hochstein <[email protected]>; [email protected] Subject: Re: [OE-core] [PATCH] vulkan-loader: Move libvulkan.so to main package On Mon, Oct 17, 2022 at 2:10 PM Ross Burton <[email protected]<mailto:[email protected]>> wrote: On 16 Oct 2022, at 22:43, Tom Hochstein via lists.openembedded.org<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.openembedded.org%2F&data=05%7C01%7Ctom.hochstein%40nxp.com%7Cb79ae30157f142e2468e08dab03b378b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638016065621027269%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ldUoyzxYOQMI33kzqUh9CJ15MGI2n0YRf8rwKopwkJw%3D&reserved=0> <[email protected]<mailto:[email protected]>> wrote: > > Since libvulkan.so is commonly loaded dynamically, put it in the main > package. Can you give an example? I'm wondering the same, because e.g. tensorflow-lite. arm-compute-library were also trying to dlopen libOpenCL.so and we've patched them to dlopen libOpenCL.so.1 instead, so why should libvulkan.so be different.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#171915): https://lists.openembedded.org/g/openembedded-core/message/171915 Mute This Topic: https://lists.openembedded.org/mt/94372555/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
