NvC-DmN-CH / Half-Life-2-Mirrored

Half-Life 2 Mirrored
Other
15 stars 2 forks source link

Doesn't work on Linux: "Engine Error: Could not load library client..." #1

Closed SandaruKasa closed 2 years ago

SandaruKasa commented 2 years ago

I'm running Manjaro Linux with steam-manjaro package installed.

I've placed the mod's folder, hl2_mirrored (extracted from an archive I've downloaded from moddb) in ~/.steam/steam/steamapps/sourcemods/.

I've downloaded Source SDK Base 2013 Singleplayer and have switched to its upcoming beta branch.

Upon launching the mod, the valve intro plays and then, before the main menu even appears, it gives me an error:

image

Restarting, verifying the cache, and even installing steam-native package doesn't resolve the issue.

NvC-DmN-CH commented 2 years ago

Idk how linux stuff works but, you need to run "Source SDK Base 2013 Singleplayer" this on linux as well?

Do you also have Half-Life 2 installed? It's needed for some things

TheAwesome98-Real commented 2 years ago

are you missing client.so from the bin folder?

SandaruKasa commented 2 years ago

Idk how linux stuff works but, you need to run "Source SDK Base 2013 Singleplayer" this on linux as well?

When I copy the mod folder to steamapps/sourcemods, it appears in the list of my installed games in Steam library. Trying to launch it without the SDK installed causes Steam to automatically start installing the SDK. Launching it with the SDK installed causes the error from above.

Do you also have Half-Life 2 installed? It's needed for some things

I had Episode 2 installed. Tried installing HL2 as well, but it didn't change anything.

are you missing client.so from the bin folder?

I am. There is no client.so in the hl2_mirrored/bin/ folder.

$ ls -A sourcemods/hl2_mirrored/bin/
client.dll  server.dll

There is one in TF2C's tho (and TF2C actually launches just fine for me):

$ ls -A sourcemods/tf2classic/bin/
client.dll  client.so  discord-rpc.dll  game_shader_dx9.dll  game_shader_dx9.so  server.dll  server.so  server_srv.so

client.so is also present in some other places:

$ cd ~/.steam/steam/steamapps/ && find -name client.so
./sourcemods/tf2classic/bin/client.so
./common/Half-Life 2/episodic/bin/client.so
./common/Half-Life 2/hl2/bin/client.so
./common/Source SDK Base 2013 Multiplayer/sourcetest/bin/client.so
./common/Team Fortress 2/tf/bin/client.so
./common/Source SDK Base 2013 Singleplayer/sourcetest/bin/client.so

I tried running cp some/game/bin/* sourcemods/hl2_mirrored/bin/ for a couple of different games in hopes that it would give me all the missing files for HL2:Mirrored, but it didn't help.

TheAwesome98-Real commented 2 years ago

I am. There is no client.so

client.so isn't just a "random .so file" (i don't know what else to call it, really), it contains all the game's code. you'll need to compile the game from source, and copy the client.so and server.so from there into bin. (I might try later and send you them, if you can't)

SandaruKasa commented 2 years ago

client.so isn't just a "random .so file" (i don't know what else to call it, really), it contains all the game's code.

Ah, I was hoping it was just some library shared among the source games. But oh well.

you'll need to compile the game from source, and copy the client.so and server.so from there into bin. (I might try later and send you them, if you can't)

I've done it. It was the most painful compilation in my life so far, but I've done it. Ended up having to manually patch some parts of the source code to make warnings go away, and actually building the entire thing inside docker using ubuntu:16.04, because some of the assemblies in the source code seem to rely on internal details of old versions of GCC or something?

So yeah, anyway, it works for me now. I can share the Dockerfile and patches I've used (or just the compiled binaries) if you need them. (Or maybe it's not as much of a pain to compile them under Widnows as it was for me?)

Thank you for the response!

NvC-DmN-CH commented 2 years ago

yey

TheAwesome98-Real commented 2 years ago

some of the assemblies in the source code seem to rely on internal details of old versions of GCC or something?

I have a patched version of source that fixes this 😅

KerJoe commented 2 years ago

If you have already done the work, why not just share the compiled files right here? Like this: https://github.com/KerJoe/Half-Life-2-Mirrored/releases