[PATCH v3 0/2] MR6543: ntdll: Print error on failure to dlopen builtin shared object.
Currently trying to dlopen winealsa.so, without having the matching libasound.so.2 installed, fails silently. This should make users aware of the missing dependency. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57206 -- v3: mmdevapi: Add error if no driver could be initialized. ntdll: Add warning if dlopen of unixlib failed. https://gitlab.winehq.org/wine/wine/-/merge_requests/6543
From: Bernhard Übelacker <bernhardu(a)mailbox.org> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57206 --- dlls/ntdll/unix/virtual.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index e168eed8c37..af5a1e747ec 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -651,7 +651,11 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun { if (builtin->module != module) continue; if (builtin->unix_path && !builtin->unix_handle) + { builtin->unix_handle = dlopen( builtin->unix_path, RTLD_NOW ); + if (!builtin->unix_handle) + WARN_(module)( "failed to load .so lib %s: %s\n", builtin->unix_path, dlerror() ); + } if (builtin->unix_handle) { *funcs = dlsym( builtin->unix_handle, ptr_name ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6543
From: Bernhard Übelacker <bernhardu(a)mailbox.org> Currently there is no logging if all drivers could not be loaded. This could make users aware of missing dependencies. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57206 --- dlls/mmdevapi/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/mmdevapi/main.c b/dlls/mmdevapi/main.c index 36c94908d67..74643572348 100644 --- a/dlls/mmdevapi/main.c +++ b/dlls/mmdevapi/main.c @@ -179,6 +179,11 @@ static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context) load_driver_devices(eCapture); } + if (drvs.module == 0) + ERR("No driver from %s could be initialized. " + "Maybe check dependencies with WINEDEBUG=warn+module.\n", + wine_dbgstr_w(driver_list)); + return drvs.module != 0; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6543
v3: - Dropped the reduntant WARN_(module) in DllMain of the audio drivers. - Removed reducing to just the filename only for logging, because now it just gets printed on explicit request. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6543#note_83279
participants (1)
-
Bernhard Übelacker