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

Linux build for the Steam release #523

Open
darealshinji opened this issue Oct 4, 2024 · 9 comments
Open

Linux build for the Steam release #523

darealshinji opened this issue Oct 4, 2024 · 9 comments

Comments

@darealshinji
Copy link
Contributor

First of all, it runs well on Proton, so a native build shouldn't have a high priority.

What exactly are the reasons that there is no Linux version available yet? I've read that Steam wants Linux binaries to be compatible with really old runtimes or something? I would like to help.

@treellama
Copy link
Member

The stable steam runtime is based on Ubuntu 16.04! And also does not include boost and some other libraries, so they would have to be built and included. I don't think this is insurmountable but the Proton port works well enough and I didn't have time before the summer releases to build for Linux. Plus we were sick of CI/build tooling after Win + Mac. This is on my list to look at for the next release.

@darealshinji
Copy link
Contributor Author

I did a quick test. Building on the sniper runtime SDK works.
https://gitlab.steamos.cloud/steamrt/sniper/sdk

I install and start the runtime with this command:

podman run --rm --init \
 -v /home:/home \
 -v /etc/passwd:/etc/passwd:ro \
 -v /etc/group:/etc/group:ro \
 -e HOME="$HOME" \
 -h "$(hostname)" \
 -v /tmp:/tmp \
 -it registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest \
 /bin/bash

For whatever reason, to make autoreconf work I have to patch autoconf.ac:

--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ AC_CHECK_HEADERS([unistd.h pwd.h])
 dnl Check for boost functions and libraries.
 AX_BOOST_BASE([1.65.0],
               ,
-              [AC_MSG_ERROR([You need Boost 1.65.0 or higher to build Aleph One.])])
+              AC_MSG_ERROR([You need Boost 1.65.0 or higher to build Aleph One.]))
 AX_BOOST_SYSTEM
 AS_IF([ test "x$BOOST_SYSTEM_LIB" != "x" ],
       [ LIBS="$BOOST_SYSTEM_LIB $LIBS" ],

Install packages and build:

apt update
apt upgrade
apt install autoconf-archive \
 libboost-dev libboost-system-dev libboost-filesystem-dev \
 libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev

autoreconf -if
CFLAGS='-O2' CXXFLAGS='-O2' LDFLAGS='-s -Wl,--as-needed' \
 ./configure
make -j4

@treellama
Copy link
Member

Any libraries you install will not be present once deployed, is part of the issue. Also sniper runtime has to be manually enabled by Valve. I thought I had requested that, but now I can't find any record of doing that. So I will request it again.

@darealshinji
Copy link
Contributor Author

darealshinji commented Oct 4, 2024

Deploying the extra libraries shouldn't be an issue. I will do more testing, maybe compile ffmpeg too to reduce dependencies. I can also try out the stable runtime.

@darealshinji
Copy link
Contributor Author

Here's a list of commands (not so much of an actual script) to build alephone and ffmpeg in a container:
https://gist.github.com/darealshinji/a2d64ec70bf2adee0cadea9f69efec67

ffmpeg is built against the steamrt libraries and only libboost_filesystem and libboost_system need to be copied from the build environment. A launch script that sets LD_LIBRARY_PATH needs to be added.

@shmabler
Copy link

shmabler commented Oct 17, 2024

For some reason the Proton version is not working for me. It worked the first time, then the second time it had no sound, then the third time it just won't start at all anymore. I changed to Luxtorpeda compatibility tool and the game starts again and the sound works. Luxtorpeda uses the native source port for Linux.

@KAMiKAZOW
Copy link

Also sniper runtime has to be manually enabled by Valve.

This is no longer the case:

Native Linux games that require sniper can be released on Steam.
Since October 2024, this is available as a "self-service"
feature via the Steamworks partner web interface, which can be used by
any game that benefits from a newer library stack.
To use this feature, your app must first set up a Launch Option that
supports Linux.
Once that is set up, you can use the Installation → Linux Runtime
menu item to select a runtime.

https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/slr-for-game-developers.md#native-linux-games-targeting-steam-runtime-3-sniper

@treellama
Copy link
Member

Well that's good news. I wonder if they intended to notify developers haha

@KAMiKAZOW
Copy link

Well that's good news. I wonder if they intended to notify developers haha

It was mentioned in the regular Steam news feed a couple of weeks ago among several bullet points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants