ValveSoftware / steam-runtime

A runtime environment for Steam applications
Other
1.17k stars 86 forks source link

libxcb-xinput library is missing in the runtime #657

Closed komires closed 2 months ago

komires commented 3 months ago

libxcb-xinput library is missing in the runtime. Please consider adding this library to the runtime.

smcv commented 3 months ago

libxcb-xinput library is missing in the runtime.

What game or games need this library? Is this a request to add a library that is needed by a game you are developing, or is it a report that there is a game that already depends on this library?

smcv commented 3 months ago

Also, which runtime? There are several possible ways to run a Steam game. If you can provide steps to reproduce the problem, and logs or error output from that situation, that will always make it more likely to be resolved sooner.

komires commented 3 months ago

This is a request to add a library needed for games (in developing) that are created with Matali Physics environment. The problem may soon be reported more frequently and concerns touchscreen support (Steam Deck). If the frameworks/engines use XCB directly (where touch events aren't directly integrated into XCB), they have to use the input extension (libxcb-xinput), which is not available in Steam Linux Runtime. The problem is in Steam Linux Runtime 1.0, 2.0 and 3.0.

smcv commented 3 months ago

Thanks for the extra context. I assume you mean libxcb-xinput.so.0? That comes from the libxcb source package. We already ship some of the libraries from that source package, but not this one. This seems to be the only library shipped by modern versions of libxcb that we don't already have.

The Steam Runtime 1 'scout' LD_LIBRARY_PATH environment doesn't have libxcb-xinput.so.0 available for installation (it's too old), so we will not be able to add this library to the scout SDK, only to Steam Runtime 3 'sniper' (and optionally Steam Runtime 2 'soldier', but we don't currently support soldier as a target for native Linux games anyway).

If Matali Physics needs newer libraries than the ones in Steam Runtime 1 'scout', the best way to handle it would be to build your game(s) in the sniper SDK, and ask for your game(s) to be switched over to run in the Steam Linux Runtime 3.0 'sniper' environment, similar to #628, #654, #655.

@TTimo: OK to add this to sniper? (Platform += libxcb-xinput.so.0, SDK += libxcb-xinput-dev)

We have to be a bit careful about how we deal with the libxcb family of libraries, because they're potentially entangled with the host graphics driver stack (via libxcb.so.1) and they frequently add new symbols without increasing the minor ABI version, so we will need to make sure that we can detect whether they're older or newer than the version on the host system - it isn't quite as simple as just adding the new library to a list.

TTimo commented 3 months ago

@smcv sounds fine to add to sniper

komires commented 3 months ago

Thanks for the extra context. I assume you mean libxcb-xinput.so.0?

Yes, exactly

The Steam Runtime 1 'scout' LD_LIBRARY_PATH environment doesn't have libxcb-xinput.so.0 available for installation (it's too old), so we will not be able to add this library to the scout SDK, only to Steam Runtime 3 'sniper' (and optionally Steam Runtime 2 'soldier', but we don't currently support soldier as a target for native Linux games anyway).

Sounds good

smcv commented 3 months ago

Queued for inclusion in the next beta (tracked as steamrt/tasks#417 internally).

smcv commented 3 months ago

This is in today's beta, versioned as depot 0.20240321.82093 in VERSIONS.txt.

You can compile against this library by using the beta SDK registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta, and you can test against it by opting in to the client_beta branch in your Steam client. Please don't release games that rely on it until this beta has been promoted to stable: there is no specific timeline for this, but it generally happens once or twice per month.

smcv commented 2 months ago

The version with this library is now in the stable branch and can be used to build new games.

SDK: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest, /etc/os-release should say BUILD_ID=0.20240321.82093 or later.

SteamLinuxRuntime_sniper: default branch, VERSIONS.txt should say depot 0.20240321.82093 or later.