Bug 288475 - emulators/wine-proton: update to 10.0-1
Summary: emulators/wine-proton: update to 10.0-1
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on: 288469
Blocks:
  Show dependency tree / graph
 
Reported: 2025-07-26 23:15 UTC by Alex S
Modified: 2026-07-12 09:53 UTC (History)
13 users (show)

See Also:


Attachments
wine-proton-10 (201.11 KB, patch)
2025-07-26 23:15 UTC, Alex S
iwtcex: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex S 2025-07-26 23:15:24 UTC
Created attachment 262463 [details]
wine-proton-10

This update brings the so-called new wow64 mode, which could be activated either by invoking /usr/local/wine-proton/bin-wow64/wine or setting the PROTON_USE_WOW64 env variable for the Steam client.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2025-07-27 22:36:05 UTC
Why ffmpeg4?
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-07-27 23:25:56 UTC
Error: /usr/local/wine-proton/lib/wine/x86_64-unix/winepulse.so is linked to /usr/local/lib/libpulse.so.0 from audio/pulseaudio but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libpulse.so:audio/pulseaudio

-PULSEAUDIO_BUILD_DEPENDS=       ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio
+PULSEAUDIO_LIB_DEPENDS=         libpulse.so:audio/pulseaudio
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2025-07-28 14:55:59 UTC
Maybe create 2 flavors "default" and "pulse"?
Comment 4 Alex S 2025-07-28 21:13:45 UTC
(In reply to Vladimir Druzenko from comment #1)

> Why ffmpeg4?

That's the version that matches upstream at https://github.com/ValveSoftware/Proton. (Note that the repo includes FFmpeg @ a77521c as a submodule.) We can't simply substitute FFmpeg 6 here due to API changes.

(In reply to Vladimir Druzenko from comment #2)

> Error: /usr/local/wine-proton/lib/wine/x86_64-unix/winepulse.so is linked to /usr/local/lib/libpulse.so.0 from audio/pulseaudio but it is not declared as a dependency

Winepulse is one the two audio backends that we build (another is wineoss) and it's loaded through dlopen when it's deliberately enabled. (I specifically patched out any possibility of it being automatically selected by default.) I personally believe leaving Pulseaudio out of dependencies is appropriate considering not everyone wants it to be installed (and we default to wineoss), but I also spent a whole hour debating that exact point with arrowd@ with regards to this specific patch, so that's not the only opinion out there.

(In reply to Vladimir Druzenko from comment #3)

> Maybe create 2 flavors "default" and "pulse"?

Meh. Doesn't seem like a worthwhile improvement to me.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2025-07-30 00:51:42 UTC
I see 3 ways:
1. Make 2 flavors: "default" and "pulse".
2. Patch sources to use dlopen libpulse.so and support this patch (or upstream it).
3. Use correct PULSEAUDIO_LIB_DEPENDS=libpulse.so:audio/pulseaudio:
3.1. With default ON PULSEAUDIO.
3.2. With default OFF PULSEAUDIO.

Select an option from the list above or suggest your own.
But the option to create a broken/incorrect package is not allowed.
Comment 6 Alex S 2025-07-30 03:05:57 UTC
I already mentioned dlopen.
Comment 7 Gleb Popov freebsd_committer freebsd_triage 2025-07-30 11:25:45 UTC
(In reply to Vladimir Druzenko from comment #5)
Point 2 can't work without either flavors, subpackages, or master/slave ports. Actually, flavors do not make any sense here, because -pulse flavoured wine-proton is just the same vanilla wine-proto + additional file installed.

So this can be solved beautifully when we get subpackages or awfully by creating a slave port that only installs winepulse.drv. (Or just accept the 7 Mb pulseaudio dependency)
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2025-07-31 00:28:34 UTC
(In reply to Alex S from comment #6)
If you implemented work with libpulse.so via dlopen, then winepulse.so would not be dynamically linked with it.
Comment 9 Alex S 2025-07-31 05:54:09 UTC
There is no functional difference between dlopening libpulse.so
(your suggestion) and dlopening winepulse.so that is linked to
libpulse.so (Wine impl). Chaining dlopens for a single dependency
is inherently nonsensical and upstream would be very amused if they
ever see such a patch.
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2025-08-03 00:35:51 UTC
(In reply to Alex S from comment #9)
Need dlopen for libpulse.so, not for winepulse.so.
Comment 11 Alex S 2025-08-03 09:29:44 UTC
Ah, no, you either get this or no update at all. I'm not babysitting a bunch of unsuppressible half-assed lint checks.
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2025-08-04 20:20:11 UTC
Ports are not a dumpster to dump everything into. They are only so good because committers follow the rules.
Comment 13 Thibault Payet 2025-08-04 20:54:43 UTC
(In reply to Vladimir Druzenko from comment #2)
Is there a concrete consumer of /usr/local/wine-proton/lib/wine/x86_64-unix/winepulse.so that directly link to it instead of using dlopen which is what wine does.
I am not aware of any project that would depends on winepulse.so except of wine itself.

Making pulseaudio a lib dependency as suggested, would be a POLA violation for user of wine-proton that have pulseaudio not installed on their systems, since this would automatically make pulseaudio a dependency at the install.
And for users relying on pulseaudio due to some games needing it, having the pulseaudio off would be a POLA violation since they would suddenly not have any sound (or maybe very distorted ones) on their games.
Comment 14 Anton Saietskii 2025-08-23 21:18:03 UTC
(In reply to Alex S from comment #11)

Are you sure somebody will accept your patches after such aggressive and arrogant tone? I'd be very suprised if that will happen...
Comment 15 Alexander Vereeken freebsd_triage 2025-11-06 18:08:08 UTC
Friendly Ping.
Comment 16 Alexander Vereeken freebsd_triage 2025-12-28 00:18:35 UTC
Friendly ping. VVD@ do you still intend to commit this update?
Comment 17 Jose Quinteiro 2025-12-29 20:55:25 UTC
(In reply to Alex S from comment #4)
Thank you for taking so much care to not forcing the Puleaudio linuxism down my throat!
Comment 18 Vladimir Druzenko freebsd_committer freebsd_triage 2025-12-30 09:04:29 UTC
(In reply to Alexander Vereeken from comment #16)
Yes, but only with a "normal" patch without dirty hacks.
Comment 19 Alex S 2025-12-30 09:55:09 UTC
It's still unclear to me what specific end user problem we are trying
to avoid. I mean every warning is supposed to be tied to a plausible
issue. What would that be in this case?
Comment 20 Alexander Vereeken freebsd_triage 2025-12-30 16:59:05 UTC
(In reply to Vladimir Druzenko from comment #18)

Please correct me if I am mistaken, but if the concern continues to focus on PulseAudio management, I do not believe it is justified to keep this patch on hold. The lines in question are already present in ports and maybe keep this in an separate ticket nearby?
Comment 21 Generic Rikka 2026-01-03 23:32:50 UTC
I think both goals here are reasonable: avoid forcing PulseAudio on users who don’t need it, while also avoiding a package that can fail at runtime.

From a ports perspective: if an installed ELF object (e.g., winepulse.so) has a hard DT_NEEDED on libpulse.so.*, then the package must ensure that dependency is satisfied whenever that object is shipped — otherwise a user can end up with a missing shared library at the point that module is loaded.

Possible ports-compliant ways forward:

 - Make winepulse truly runtime-linked (no DT_NEEDED on libpulse.so — i.e., use dlopen()/dlsym() inside the module), or

 - Ship/install winepulse only behind an option (e.g., PULSEAUDIO), and add LIB_DEPENDS only when that option is enabled, or

 - Accept PulseAudio as an unconditional dependency if the module is always installed.

Happy to test/verify a proposed approach (e.g., readelf -d/ldd on the resulting artifacts and quick runtime checks).

I’d really like to see the Proton 10 / WoW64 update land, so I’m hoping we can pick one of the above and move forward.
Comment 22 Alex S 2026-01-04 05:45:18 UTC
(In reply to Generic Rikka from comment #21)

Stop mocking the thread with LLM-generated responses.
Comment 23 Generic Rikka 2026-01-04 06:23:41 UTC
(In reply to Alex S from comment #22)
Sorry — I did not intend to mock anything. I sometimes use an LLM to tighten some of my wording, especially where my English fails. My intent was to bridge and propose solutions that may be acceptable by committers. Anyways, I’m stepping back from this PR to avoid adding noise.
Comment 24 Thibault Payet 2026-01-04 10:39:19 UTC
(In reply to Generic Rikka from comment #21)
As I already discussed: which consumer of winepulse.so exists besides wine-proton itself ?
The only consumer in ports is wine-proton, which use dlopen on winepulse.so.

So when the user does not have libpulse.so, the dlopen failed and the winepulse driver is not available.
When the user does have libpulse.so, the dlopen succeed and the winepulse driver is available.

So there is no case where the missing libpulse.so cause wine to fail.

And finally, there is no consumer of winepulse.so that is used outside of wine-proton.
Comment 25 Gleb Popov freebsd_committer freebsd_triage 2026-01-04 10:42:50 UTC
(In reply to Thibault Payet from comment #24)
winepulse.so is linked to libpulse.so, pkg detects that and makes pulseaudio a dependency of the package. We can make pkg ignore this fact with a special Makefile knob, but I don't want to push this hack.
Comment 26 Thibault Payet 2026-01-04 10:52:02 UTC
(In reply to Gleb Popov from comment #25)
Sure, but the alternative to do a double dlopen is not really great.

Because now you got winepulse.so that successfully load with dlopen, but then it tries to dlopen libpulse.so and fail. So now wine is assuming that winepulse.so is correctly loaded and it will attempt to use it for the audio backend.

So in order to respect the contract between wine and winepulse.so, we have to either expose some API that tell wine that the winepulse driver is not available (i.e is a stub),
or make winepulse.so failed to be dlopen if it failed to dlopen libpulse.so.
So basically we make winepulse.so only load if libpulse.so is there. Which is not really what dlopen is for.
Comment 27 Gleb Popov freebsd_committer freebsd_triage 2026-01-04 11:16:59 UTC
(In reply to Thibault Payet from comment #26)
I fail to see why we're getting into low level details like dlopen and stuff. I never proposed that.

Solutions that I'm comfortable with (and ready to push) are:
1. Wait for subpackages and make winepulse.so a subpackage.
2. Make the pulseaudio dependency an option and choose a sane default.
3. A slave port or a flavor that builds the whole thing and only packages winepulse.so. This is a poor man's solution #1.
Comment 28 Vladimir Druzenko freebsd_committer freebsd_triage 2026-01-27 08:48:51 UTC
emulators/wine-devel chose the path of flavor:
https://cgit.freebsd.org/ports/commit/?id=36f7f11c6c75750e8f0ba60627f2ae38a3ce134b
Comment 29 Alex S 2026-01-27 11:31:22 UTC
You still didn't answer my question.
Comment 30 Daniel Engberg freebsd_committer freebsd_triage 2026-03-18 17:34:35 UTC
Another question, what version is this patch as it doesn't seem to line up with upstream versioning?
Comment 31 Daniel Engberg freebsd_committer freebsd_triage 2026-03-18 17:43:19 UTC
(In reply to Alexander Vereeken from comment #16)
Given that multiple committers already have expressed concerns and not accepted the current version I think its safe to assume that its not going to land in tree.
Comment 32 Gleb Popov freebsd_committer freebsd_triage 2026-03-18 17:57:10 UTC
(In reply to Daniel Engberg from comment #31)
Subpackages are (again) near with recent reintroduction of provides/requires in pkg: https://reviews.freebsd.org/D55897
There is a hope to get this in finally.