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.
From: Bernhard Übelacker bernhardu@mailbox.org
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 --- dlls/ntdll/unix/virtual.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index e168eed8c37..34944c85253 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -650,8 +650,11 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry ) { if (builtin->module != module) continue; - if (builtin->unix_path && !builtin->unix_handle) + if (builtin->unix_path && !builtin->unix_handle) { builtin->unix_handle = dlopen( builtin->unix_path, RTLD_NOW ); + if (!builtin->unix_handle) + ERR_(module)( "failed to load %s\n", builtin->unix_path ); + } if (builtin->unix_handle) { *funcs = dlsym( builtin->unix_handle, ptr_name );
Like normal dlls, a load failure is not necessarily an error. This should be printed in the higher level modules in the cases where it's actually a problem.
On Mon Sep 23 20:32:47 2024 +0000, Alexandre Julliard wrote:
Like normal dlls, a load failure is not necessarily an error. This should be printed in the higher level modules in the cases where it's actually a problem.
Thanks for looking into it.
I tried to identify the higher levels.
* [dlls/ntdll/unix/virtual.c](https://gitlab.winehq.org/wine/wine/-/blob/42af68b8b7cf066a1738c483e8ea1b5bf...) * [dlls/winealsa.drv/mmdevdrv.c](https://gitlab.winehq.org/wine/wine/-/blob/42af68b8b7cf066a1738c483e8ea1b5bf...): * [dlls/mmdevapi/main.c](https://gitlab.winehq.org/wine/wine/-/blob/42af68b8b7cf066a1738c483e8ea1b5bf...)
What about adding the ERR in mmdevapi when no driver succeeds, and changing the ERR in `get_builtin_unix_funcs` to a WARN_(module), and adding an additional WARN_(module) to winealsa (and pulse, oss, and coredrive)?
That way the default output should just get the additional line if no audio driver is loaded, and the user could proceed by WINEDEBUG=warn+module?