Bug 2417982 - wine doesn't search for dlls in /usr/i686-w64-mingw32/sys-root/mingw/bin/
Summary: wine doesn't search for dlls in /usr/i686-w64-mingw32/sys-root/mingw/bin/
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: wine
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michael Cronenworth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2417810 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-12-01 12:36 UTC by Luan Vitor Simião Oliveira
Modified: 2026-02-08 18:36 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Luan Vitor Simião Oliveira 2025-12-01 12:36:59 UTC
while trying to run this tool under wine: https://github.com/Brolijah/YACpkTool/releases
i got the following error message:
0148:err:module:import_dll Library libgcc_s_dw2-1.dll (which is needed by L"Z:\\usr\\share\\wine\\mono\\wine-mono-10.3.0\\bin\\libmono-2.0-x86.dll") not found

even though the package mingw32-libgcc-15.2.1-2.fc43.x86_64 is installed.

copying the dll from /usr/i686-w64-mingw32/sys-root/mingw/bin/ to ~/.wine/drive_c/windows/syswow64 fixed the issue.

also, seems like wine doesn't depends on mingw32-libgcc so i had to install it manually

Reproducible: Always

Steps to Reproduce:
1. download https://github.com/Brolijah/YACpkTool/releases
2. try to run it with wine on the cli
Actual Results:
error about missing library

Expected Results:
program launches and displays help

Comment 1 Richard W.M. Jones 2025-12-08 16:20:52 UTC
*** Bug 2417810 has been marked as a duplicate of this bug. ***

Comment 2 Richard W.M. Jones 2025-12-08 16:27:08 UTC
wine-10.20-2.fc44.x86_64 + everything else from Rawhide

There seems something very broken here about how the latest wine searches for DLLs.

If I manually copy or link the DLLs into the same directory as the executable, then
it works, but that is very tedious.

Setting WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/ is inconsistent.
Sometimes it fixes the problem and sometimes not, and I don't understand why.

A trivial reproducer is:

$ cat hello.c
#include <stdio.h>
#include <gnutls/gnutls.h>
int main ()
{
  gnutls_session_t session;
  gnutls_init (&session, 0);
  printf ("hello, world\n");
}

$ x86_64-w64-mingw32-gcc hello.c -o hello.exe -lgnutls
$ file hello.exe 
hello.exe: PE32+ executable for MS Windows 5.02 (console), x86-64, 18 sections

$ ./hello.exe 
002c:fixme:winediag:loader_init wine-staging 10.20 is a testing version containing experimental patches.
002c:fixme:winediag:loader_init Please mention your exact version when filing bug reports on winehq.org.
0024:err:module:import_dll Library libgnutls-30.dll (which is needed by L"Z:\\home\\rjones\\d\\nbdkit-windows\\hello.exe") not found
0024:err:module:loader_init Importing dlls for L"Z:\\home\\rjones\\d\\nbdkit-windows\\hello.exe" failed, status c0000135
00e4:fixme:winediag:loader_init wine-staging 10.20 is a testing version containing experimental patches.
00e4:fixme:winediag:loader_init Please mention your exact version when filing bug reports on winehq.org.
011c:fixme:winediag:loader_init wine-staging 10.20 is a testing version containing experimental patches.
011c:fixme:winediag:loader_init Please mention your exact version when filing bug reports on winehq.org.

Comment 3 Michael Cronenworth 2025-12-08 16:47:31 UTC
Upstream said that the new wow64 feature no longer supports searching outside of wine directories. :(

https://bugs.winehq.org/show_bug.cgi?id=54573#c34

I am leaning towards disabling the new wow64 feature in Fedora.

Comment 4 Richard W.M. Jones 2025-12-08 17:06:05 UTC
I'm not sure I understood much about that bug, but the problem is not the DLLs
themselves, but the loading path.  Even adding a symlink from the executable's
directory to /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgnutls-30.dll (and
additional symlinks for every DLL that it requires) works.

Comment 5 Hasshu 2026-02-08 18:36:21 UTC
As far as I can tell, Wine's basically stopped working with some software...

Is this a regression expected to be fixed upstream? Or is it about a paradigm shift of sorts, and distros are supposed to adjust?


Note You need to log in before you can comment on or make changes to this bug.