anyc / steam-overlay

Gentoo overlay for Valve's Steam client and Steam-based games
GNU General Public License v2.0
202 stars 44 forks source link

Fixes steam-wrapper.sh for libcxx LLVM Profile Segfaults #342

Closed ThisNekoGuy closed 9 months ago

ThisNekoGuy commented 9 months ago

This commit checks if the current profile is set to Clang and, if running a Wayland session, detects the currently set GCC version and preloads libstdc++ to fix LLVM profile segfaults for launching Steam. In my experience, this only seems to be required for Wayland sessions and not Xorg.

liuyujielol commented 9 months ago

this also happens on x11, not wayland specific at least for me on kde with x11 session

and upcoming profile 23.0 has clang profiles renamed to llvm[1] eselect profile list | grep '\*' | grep clang is going to be always empty

[1]https://github.com/gentoo/gentoo/tree/master/profiles/default/linux/amd64/23.0

ThisNekoGuy commented 9 months ago

Alright, I'll amend those.

chewi commented 9 months ago

Sorry, but this is way more complex than it needs to be. I'll rework it.

I agree that it probably has nothing to do with Wayland. I'm not sure that it's even 32-bit specific. Sure, Steam is 32-bit, but what about the games? Granted there aren't many 64-bit native Linux games that aren't run in a container, but even still, they typically would not expect libcxx. I don't know how the libraries interact when something does need libcxx though.

ThisNekoGuy commented 9 months ago

Sure, Steam is 32-bit

Steam needs it, for sure, but if a subprocess actually does need libcxx it should just be able to find it. Preloading stdlibc++ will likely just be ignored because libcxx software shouldn't even be linked to it to care in the first place. (Correct me if you're sure)

Additionally, Proton is built with GCC anyway and they run in their own Steam runtime variants. (I haven't had such issues in testing)

chewi commented 9 months ago

See the libcxx branch for what I've come up with, although there is an issue. It adds both the 64-bit and 32-bit libraries, but the Steam GUI doesn't appear if you add the 64-bit one. I'd kinda like to understand why before I restrict this to 32-bit.

ThisNekoGuy commented 9 months ago

I mean, I saw it, but I'm not sure what you want me to do if this PR is just going to get closed. I couldn't tell you why Steam doesn't like the 64-bit library being preloaded, so I don't really have anything to say.