Skip to content

proton: Improve find_nvidia_wine_dll_dir() handling of missing files - #4882

Merged
aeikum merged 1 commit into
ValveSoftware:experimental_6.3from
liam-middlebrook:fix-nv-dll-discovery
Jun 2, 2021
Merged

proton: Improve find_nvidia_wine_dll_dir() handling of missing files#4882
aeikum merged 1 commit into
ValveSoftware:experimental_6.3from
liam-middlebrook:fix-nv-dll-discovery

Conversation

@liam-middlebrook

Copy link
Copy Markdown
Contributor

Additionally split out the find_library() logic for discovery of libdl
so that the case of a missing libdl (no matter how unlikely) is caught
before attempting to load an erroneous CDLL.

Fixes: #4881 (Latest Proton Experimental Fails To Open)

Comment thread proton
libdl = CDLL(find_library("libdl"))
libglx_nvidia = CDLL("libGLX_nvidia.so.0")
try:
libdl_soname = find_library("dl")

@DadSchoorse DadSchoorse Jun 2, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you should check for None here as well, at least that's what the documentations says will be returned if no library can be found.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah, I see that here on a second pass-through: https://docs.python.org/3/library/ctypes.html#finding-shared-libraries

Additionally split out the find_library() logic for discovery of libdl
so that the case of a missing libdl (no matter how unlikely) is caught
before attempting to load an erroneous CDLL.

Fixes: 4881 (Latest Proton Experimental Fails To Open)

Reviewed-by: Adam Moss <amoss@nvidia.com>
@edmondo

edmondo commented Jun 2, 2021

Copy link
Copy Markdown

Thanks.
Patch applied to the proton script and it fixes the issue.

@aeikum

aeikum commented Jun 2, 2021

Copy link
Copy Markdown
Contributor

Thanks for the quick fix. Will get that out shortly.

@aeikum
aeikum merged commit cc7ad4b into ValveSoftware:experimental_6.3 Jun 2, 2021
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.

4 participants