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

build: List soname for Android #8124

Closed

Conversation

spencer-lunarg
Copy link
Contributor

for #7385 - v2 of #8116

@Izhido can you confirm this works for you, works for me locally

@spencer-lunarg spencer-lunarg requested a review from a team as a code owner June 10, 2024 18:08
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 198524.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16786 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16786 passed.

@Izhido
Copy link

Izhido commented Jun 10, 2024

for #7385 - v2 of #8116

@Izhido can you confirm this works for you, works for me locally

Yes. I can confirm now this change works.

Comment on lines +396 to +397
# See https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/7385#issuecomment-2155788105
target_link_options(vvl PRIVATE -Wl,-soname=libVkLayer_khronos_validation.so)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? CI currently works fine without -soname being specified. Under what exact circumstances is this actually needed?

CMake deliberately omits -soname for MODULE libraries from what I can tell.

I'd like to understand what is breaking because -soname is not being added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#7385 (comment)

I will check tomorrow, but curious if the newest NDK breaks something (I have 25.1.8937393 locally and the issue was using 26.3)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake deliberately omits -soname for MODULE libraries from what I can tell.

Which https://cmake.org/cmake/help/latest/command/add_library.html says is something only loadable by dlopen, not by -l:

A plugin that may not be linked by other targets, but may be dynamically loaded at runtime using dlopen-like functionality.

That's how the validation layers work though, right? It looks like the @lzhido linked directly to the validation layers? Don't do that, just add them to the jniLibs directory of your project: https://developer.android.com/ndk/guides/graphics/validation-layer#prebuilt-binaries. Your C++ build should be completely ignorant of their existence; they only need to be packaged.

@spencer-lunarg
Copy link
Contributor Author

closing from #7385 (comment)

@spencer-lunarg spencer-lunarg deleted the spencer-lunarg-soname branch July 31, 2024 01:40
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

Successfully merging this pull request may close these issues.

5 participants