Building A Game Executable That Runs On All Linux Distributions?


We are preparing our SDL2 game for publishing on Valve’s Steam game client.
We want to support Linux but am a little confused as to how.

If we build an executable on Manjaro, will the executable run on other Linux distributions?

Also the game requires:

  • SDL2
  • SDL2_Image
  • SDL2_Mixer
  • SDL2_TTF

How would we package above libraries into the executable?
Let us know, thanks!


Sorry, for a link to the open-source on GitHub:

The only way to make sure your application runs on all GNU/Linux systems is to package it as either an AppImage, a Snap or a FlatPak. That way, the application will run containerized, with all of its needed libraries included within the container.

Maybe a tarball containing the binary and all the required libraries ?

That approach would carry with it the risk of having existing system libraries overwritten by the ones in the tarball.

Snap, FlatPak and AppImage are designed to prevent that sort of thing from happening by creating a containerized application, in which the application can use whatever libraries of its own that it needs or wants, without that any of that can reach outside the container and affect the underlying operating system.


Thank you for your replies.

I asked the Valve people for help.
Apparently Steam bundles the SDL2 in the game when run on that platform on Linux.

Have to add this to the Linux source code though:

Game should be released for PC Windows(R)/Linux and Valve Steam Deck next month…


1 Like