"Unable to find library -lGL" linker error while compiling vanilla Godot 3.2 in Ubuntu

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sage.albright

I am compiling Godot from scratch the first time because I plan on using a module for steamworks integration. I’ve dug around quite a bit, but haven’t been able to find anyone else with this error. It seems to occur during the final linking command.
[Initial build] Linking Program ==> bin/godot.x11.tools.64.llvm /usr/lib/llvm-6.0/bin/ld.lld: error: unable to find library -lGL clang: error: linker command failed with exit code 1 (use -v to see invocation) scons: *** [bin/godot.x11.tools.64.llvm] Error 1 scons: building terminated because of errors.

I repeatedly updated all the mesaGL dependencies mentioned in the tutorial. GCC and clang++ both produce the same error.

:bust_in_silhouette: Reply From: yrtv

Use Docker. Containers used for official build can be found here.:

But if you still want to compile on OS: Compiling for Linux, *BSD — Godot Engine (stable) documentation in English