RFE: wine-gecko needs an option to statically link with winpthreads

RESOLVED FIXED in mozilla37

Status

()

Core
Build Config
--
enhancement
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Michael Cronenworth, Assigned: Jacek Caban)

Tracking

unspecified
mozilla37
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8544564 [details] [diff] [review]
Default to static linking on mingw.

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
Attachment #8544564 - Flags: review?(mh+mozilla)
(Reporter)

Comment 2

3 years ago
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.
Attachment #8544564 - Flags: review?(mh+mozilla)
I want to look at what difference this actually makes in practice. Can you upload a mingw build with and without this patch?
Flags: needinfo?(jacek)
(Assignee)

Comment 4

3 years ago
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.
Flags: needinfo?(jacek)
(Assignee)

Comment 5

3 years ago
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)
Attachment #8544564 - Flags: review?(mh+mozilla) → review+
(Assignee)

Comment 7

3 years ago
Thanks for the review.

https://hg.mozilla.org/integration/mozilla-inbound/rev/2675cfbcb591
https://hg.mozilla.org/mozilla-central/rev/2675cfbcb591
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.