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.
Why ffmpeg4?
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
Maybe create 2 flavors "default" and "pulse"?
(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.
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.
I already mentioned dlopen.
(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)
(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.
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.
(In reply to Alex S from comment #9) Need dlopen for libpulse.so, not for winepulse.so.
Ah, no, you either get this or no update at all. I'm not babysitting a bunch of unsuppressible half-assed lint checks.
Ports are not a dumpster to dump everything into. They are only so good because committers follow the rules.
(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.
(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...
Friendly Ping.
Friendly ping. VVD@ do you still intend to commit this update?
(In reply to Alex S from comment #4) Thank you for taking so much care to not forcing the Puleaudio linuxism down my throat!
(In reply to Alexander Vereeken from comment #16) Yes, but only with a "normal" patch without dirty hacks.
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?
(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?
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.
(In reply to Generic Rikka from comment #21) Stop mocking the thread with LLM-generated responses.
(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.
(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.
(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.
(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.
(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.
emulators/wine-devel chose the path of flavor: https://cgit.freebsd.org/ports/commit/?id=36f7f11c6c75750e8f0ba60627f2ae38a3ce134b
You still didn't answer my question.
Another question, what version is this patch as it doesn't seem to line up with upstream versioning?
(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.
(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.
(In reply to Daniel Engberg from comment #30) https://github.com/ValveSoftware/Proton/tree/proton-10.0-1f references https://github.com/ValveSoftware/wine/tree/3e3b24184a29e8e35cd618100fefabccfc01f420 as a submodule.