Compiling Godot 4.2.2 for large world sizes

Here’s a quick reference guide for this process, for anyone struggling with the official docs.

Compiling Godot 4.22 for double precision:

Prep env:
sudo apt-get update
sudo apt-get install -y \
  build-essential \
  scons \
  pkg-config \
  libx11-dev \
  libxcursor-dev \
  libxinerama-dev \
  libgl1-mesa-dev \
  libglu1-mesa-dev \
  libasound2-dev \
  libpulse-dev \
  libudev-dev \
  libxi-dev \
  libxrandr-dev \
  mingw-w64

  sudo update-alternatives --config x86_64-w64-mingw32-g++ (switch to posix one)
(may need to reboot)

Hop into new 64 bit directory.
mkdir Godot_x64
cd Godot_x64

Generate encryption key
openssl rand -hex 32 > godot.gdkey

download from git:
git clone https://github.com/godotengine/godot.git -b 4.2.2-stable

build: (4 threads, build for linux, use llvm, use double precision) 
export GODOT_SCRIPT_ENCRYPTION_KEY=(key from the key step); 
export SCRIPT_AES256_ENCRYPTION_KEY="(key)"; scons platform=linuxbsd use_llvm=yes precision=double -j4

build template:
export SCRIPT_AES256_ENCRYPTION_KEY="(key)"; scons platform=linuxbsd use_llvm=yes precision=double -j4 target=template_release production=yes arch=x86_64 

export SCRIPT_AES256_ENCRYPTION_KEY="(key)"; scons platform=windows use_llvm=yes precision=double -j4 target=template_release production=yes bits=64 tools=no

Then just use these templates in your export.
Done.

Video with examples: