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

Incompatible with Wine 10.0-1/gcc 14/Arch linux + workaround #175

Open
Anakiev2 opened this issue Jan 24, 2025 · 1 comment
Open

Incompatible with Wine 10.0-1/gcc 14/Arch linux + workaround #175

Anakiev2 opened this issue Jan 24, 2025 · 1 comment

Comments

@Anakiev2
Copy link

Anakiev2 commented Jan 24, 2025

tldr - Enabling/Disabling Gallium nine doesn't work on Arch Linux. I've managed to fix it by replacing one string.

--- orig/src/wine-nine-standalone/ninewinecfg/main.c	2025-01-24 19:25:51.535460369 +0200
+++ fix/src/wine-nine-standalone/ninewinecfg/main.c	2025-01-24 18:59:49.152137930 +0200
@@ -257,7 +257,7 @@
         return FALSE;
 
     buf[ret] = 0;
-    return !strcmp(buf + ret - strlen(fn_nine_dll), fn_nine_dll);
+    return !strcmp(buf + ret - strlen(fn_nine_dll), "9-nine.dll.so");
 }
 
 static BOOL nine_get_system_path(CHAR *pOut, DWORD SizeOut)

Long story - ninewinecfg cannot enable or disable Gallium nine on Arch Linux with either cli or gui. Running wine ninewinecfg -e returns 1. Running wine ninewinecfg -d returns 0 but it's not disabled. With the gui the checkbox Enable Gallium Nine... cannot be checked (no matter how many times I click). There is no output in the terminal window indicating what's wrong. It's the same with the latest version from github (wine-nine 0.11-devel).

I've managed to fix the problem by replacing this line:

return !strcmp(buf + ret - strlen(fn_nine_dll), fn_nine_dll);

with return !strcmp(buf + ret - strlen(fn_nine_dll), "9-nine.dll.so");.

I've found the "correct" string by printing some variables to stdout:

buf="/usr/lib32/wine/i386-unix/d3d9-nine.dll.so"
buf+ ret=""
buf + ret - strlen(fn_nine_dll)="9-nine.dll.so"
fn_nine_dll="d3d9-nine.dll"

After recompiling the checkbox works. Both the gui and the cli (with -e/-d) can enable/disable successfully.

Tested on:

wine 10.0-1
wine 9.22-1
wine-staging 9.22-1
wine-nine 0.10-1
linux 6.12.10.arch1-1
gcc 14.2.1+r134+gab884fffe3fc-2
@Anakiev2
Copy link
Author

I've done some more debugging and the presents of .so in the path creates the problem. I don't know if this is Arch Linux specific issue. This is my updated "fix" to add a local variable in is_nine_symlink() with the correct filename:

--- main.c	2025-01-25 10:28:57.608751696 +0200
+++ fix.c	2025-01-25 10:28:03.692087040 +0200
@@ -247,6 +247,7 @@
 {
     ssize_t ret;
     char *fn = unix_filename(filename);
+    static const char * const fn_nine_dll = "d3d9-nine.dll.so";
     CHAR buf[MAX_PATH];
 
     if (!fn)

It works perfectly fine.

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

No branches or pull requests

1 participant