Closed Bug 1116777 Opened 6 years ago Closed 6 years ago
RFE: wine-gecko needs an option to statically link with winpthreads
Beginning with Fedora 21 the MinGW build tools use winpthreads by default. Wine-gecko binaries depend on winpthreads-1.dll at runtime and wine cannot find it. The wine-gecko binaries should link against the static winpthreads library.
The way mingw-w64 handles winpthreads is seriously stupid. We need a way to force GCC to use its static version, but unlike libgcc and stdc++, there is no clean way to do that. The cleanest way is to use -static. This, in theory, may have an effect on other libraries that are not meant to use static version. I didn't find any place in m-c where that would matter, so maybe that's fine...
Assignee: nobody → jacek
Thanks for the patch and perfect timing as I just had time to work on this. I applied the patch and it compiles and runs in Wine. I am going to go ahead and use this patch in Fedora.
I want to look at what difference this actually makes in practice. Can you upload a mingw build with and without this patch?
Sure, here they are: https://drive.google.com/file/d/0B_y8ZxBTaQYLTWQweVZJb1R3UkE/view?usp=sharing https://drive.google.com/file/d/0B_y8ZxBTaQYLMU8tSWhFWkIzVjA/view?usp=sharing I compared DLL imports and they seem identical.
BTW, those builds are with mingw GCC with win32 threading model, so even unpatched build doesn't depend on winpthreads-1.dll. I may upload another build if needed, but the thing that matters is that dependency between Gecko DLLs, which are the same in both configs.
Comment on attachment 8544564 [details] [diff] [review] Default to static linking on mingw. Review of attachment 8544564 [details] [diff] [review]: ----------------------------------------------------------------- I'll look at this tomorrow. Flagging me not to forget.
Attachment #8544564 - Flags: review?(mh+mozilla) → review+
Thanks for the review. https://hg.mozilla.org/integration/mozilla-inbound/rev/2675cfbcb591
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.