Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit Mumble doesn't work with 32 bit Steam games on Linux #1274

Closed
NothingMuchHereToSay opened this issue May 30, 2014 · 14 comments
Closed
Labels
bug A bug (error) in the software linux overlay

Comments

@NothingMuchHereToSay
Copy link

Ubuntu 14.04 64 bit

Command output:

ERROR: ld.so: object '/usr/lib/mumble/libmumble.so.1' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

@Weegee
Copy link

Weegee commented Jun 13, 2014

I can confirm this for all Source games. It works with Killing Floor however.

The 32 bit library doesn't work either, the output is nearly the same

ERROR: ld.so: object '/usr/lib32/libmumble.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.

Also, if you use mumble-overlay %command% in the launch options, the games crash with a segmentation fault without even starting. Using the LD_PRELOAD=/usr/lib32/libmumble.so %command% method yields the error message from above.

@Kissaki
Copy link
Member

Kissaki commented Jun 14, 2014

@NothingMuchHereToSay you are talking about (solely) the overlay not working, right?
The Mumble client is fine I would guess?

@mkrautz
Copy link
Contributor

mkrautz commented Jun 14, 2014

Our 'mumble-overlay' script is somewhat fragile. It tries to work with both 32-bit and 64-bit client binaries, as you can see here: https://github.com/mumble-voip/mumble/blob/master/scripts/mumble-overlay#L35

The detection doesn't work very well with scripts either (since the method the mumble-overlay script uses to determine the arch of the 'binary' is the 'file' utility, which obviously doesn't work on shell scripts).

It is however possible to set the LD_PRELOAD environment variable yourself, and point it to the libmumble.so file (of the right arch). If you try this, and it works, please report back. :-)

An example of doing it manually can be seen below:

$ LD_PRELOAD=/usr/lib/libmumble.so $HOME/SteamApps/common/Team\ Fortress\ 2/hl2

Note: that's a made up path for both the game binary, and a made up path for libmumble.so. You'll have to swap in the right ones!

@Weegee
Copy link

Weegee commented Jun 14, 2014

@mkrautz I've tried adding the LD_PRELOAD line to the Left 4 Dead 2 launch script (not the Steam launch options) as you can't just directly execute the game binary from the command line. Since hl2_linux is a 32-bit binary I've used the 32-bit Mumble library (obviously), but the overlay still doesn't pop up.

Is it related to the fact that Mumble itself is a 64-bit application?

Just fyi: The launch script

@NothingMuchHereToSay
Copy link
Author

Wow, okay, maybe I should also specify that needing a launch script is absolutely ludicrous. Just make it so that whenever a game is launched, Mumble will have its overlay ready.

@unique2101
Copy link

@mkrautz
Manual way does not work for me. Mumble manual talks about libmumble.so.1.1 which does not even exist in my system.
Everything was just fine on 32bit OS.

@kirillmukhin
Copy link

The problem is still exist. Attempt to run Team Fortress 2 with overlay:
$ LD_PRELOAD=/usr/lib/mumble/libmumble.so steam steam://run/440
Running Steam on manjarolinux 15.12 64-bit
STEAM_RUNTIME is enabled automatically
ERROR: ld.so: object '/usr/lib/mumble/libmumble.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

Mumble (1.3.0941gcffa565~snapshot)

I was using this workaround for a while. But looks like it's doesn't work now.

@mkrautz
Copy link
Contributor

mkrautz commented Feb 25, 2016

@Thrash-td

There are a number of possible problems here:

Either the error is from Steam itself. This could happen if the Steam binary itself is 32-bit.
In this case, the assumption is that Steam will keep its environment around in programs it launches, such that any games launched through steam also have LD_PRELOAD=/path/to/libmumble.so set.
Since the overlay doesn't appear in the game, this probably isn't it.

Another possibility is that the error is from the game itself. In this case, the game is of a different architecture than the libmumble.so that you're using. Since you're on a 64-bit x86_64 OS, you'd need a libmumble.so built for i386 instead. Then it would probably work.

Right now, we can't easily provide a 32-bit libmumble.so with our PPA inside the 64-bit package. And Linux distributions don't do that either, since an x86_64 package shouldn't contain i386 binaries.

Either you build libmumble.so yourself.
Or you download a i386 build of Mumble and extract its libmumble.so.
Or you install the x86_64 and i386 packages of Mumble side-by-side, if your distro suports that.

@mkrautz
Copy link
Contributor

mkrautz commented Feb 25, 2016

@NothingMuchHereToSay We want to provide automatic injection on Linux as well. But it's already quite fragile on the other platforms (which is why we want to make it only injection into known game launcers by default on Windows, for example: #2059).

The feature is tracked here:
#2129

Obviously, if you want to inject it into everything -- that has been possible since the start.

Simply set a global environment variable, LD_PRELOAD=/path/to/libmumble.so, and you'll automatically have the overlay in all processes.

@msva
Copy link

msva commented Jul 27, 2016

@davidebeatrici I'd say it is not only ubuntu problem. I having segfaults on gentoo too. Even when (just to test) trying to preload overlay to glxgears

@mkrautz
Copy link
Contributor

mkrautz commented Jul 27, 2016

@msva Hm. But this thread isn't about segfaults, it's about binary distros not shipping both 64-bit and 32-bit overlay libraries.

Can you open a new issue for what you're seeing -- or at least clarify in here?

Thanks.

@msva
Copy link

msva commented Jul 27, 2016

I just meant that I have all the same behaviour as @Weegee mentioned in second comment
// Although, maybe really it is not that clear as he described and right now I can't say in which cases it causes segfault, and in which just warns about wrong elf class.

@Krzmbrzl Krzmbrzl added the bug A bug (error) in the software label Jan 19, 2020
@ghost
Copy link

ghost commented Feb 12, 2023

This appears to be a duplicate of #1273 just with more info.

@Krzmbrzl
Copy link
Member

There are mutlitple issues addressed in here and as such this is not a particularly useful ticket. But for the most part it really seems to be a duplicate of the linked issue.

@Krzmbrzl Krzmbrzl closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug (error) in the software linux overlay
Projects
None yet
Development

No branches or pull requests

9 participants