How to install everything to compile Godot on Linux (Ubuntu 16.04)?

Godot Version

4.3

Question

The official documentation recommends using an old version of Linux for compilation (specifically Ubuntu 16.4), on which it is problematic to make work some of the tools mentioned in the documentation. And the documentation repeatedly refers to the need to recompile an engine to use some of it’s features! Without further ado, I will inform that I have already solved this issue. At least as much as possible, I think.

You can use my script to simplify the installation and proper configuration of any individual packages mentioned in the corresponding pages of the Godot documentation. For detailed description see the README.md and comments inside the script. Here the link:

So… What are the benefits of the script?

  • The script reduces your involvement in the installation, you are not required to monitor the process.

  • During the writing process I dealt with a number of issues, including inaccuracies and errors in the documentation, so you don’t need to.

  • It was checked on both 32-bit and 64-bit versions of Ubuntu 16.04 for sources of Godot 4.3.

  • Since the script runs on Ubuntu 16.04, it should therefore work without problems on all newer versions of Ubuntu.

  • A lot of comment’s inside and a whole script structure is human-readible like sequential instruction.

And minuses now:

  • The script provides an efficient installation path on older Ubuntu, but on newer versions of the system you would probably prefer a direct installation instead of slong long compilations (necessary on Ubuntu 16 due to the lack of package support.)

  • In some cases, the script resorts to questionable solutions. For example, to deleting the already installed GCC on the user’s computer, to replace it with the version specified in the script. I can’t guarantee that this won’t break any of other applications on your computer.

  • The script relies on a lot of internet links, so over time some parts of it may stop working due to some repositories being removed or no longer available.

  • I don’t even know if Godot works on Ubuntu 16! Both compiled and official releases showed me the same critical issues that don’t exist on Ubuntu 20. Maybe it’s because I ran them through a virtual machine that handle Ubuntu drivers really bad, but also possible that there’s no point in compiling Godot on such an old Linux. If so, the Godot documentation need to be fixed.

The script fully implements the “Compiling for Linux, *BSD” documentation page.
“Cross-compiling for macOS from Linux” is present, but important issues are not resolved and it is not fully tested.

1 Like

Ubuntu 16.04 and 18.04 are both EOL now, so I’d use Ubuntu 20.04 to compile Linux binaries now (until April 2025 when it also becomes EOL).