-
Notifications
You must be signed in to change notification settings - Fork 12
Troubleshooting
This page covers common ModernGekko-Template setup, build, recompilation, and runtime problems all in one shot. Let's go
Before reporting an issue, update the repository and initialize every submodule:
git pull --recurse-submodules
git submodule sync --recursive
git submodule update --init --recursiveThen run the environment check:
make checkFor the experimental LLVM backend:
make check BACKEND=llvmDo not run the Makefile from Command Prompt or PowerShell. Run it EXCLUSIVELY in UCRT64.
Install MSYS2 from PowerShell if necessary:
winget install -e --id MSYS2.MSYS2Open MSYS2 UCRT64 from the Start menu and update it:
pacman -SyuMSYS2 may ask you to close the terminal. Reopen MSYS2 UCRT64, run pacman -Syu again, then install the required tools:
pacman -S --needed \
base-devel git \
mingw-w64-ucrt-x86_64-toolchain \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-ninjaVerify the environment:
echo "$MSYSTEM"
which gcc
which g++
which cmake
which ninja
which make
which sh
gcc -dumpmachineExpected results include:
UCRT64
/ucrt64/bin/gcc
/ucrt64/bin/g++
x86_64-w64-mingw32
This usually means make was launched from Command Prompt or PowerShell.
Open MSYS2 UCRT64, return to the template directory, and retry:
make toolsRemove the stale setup stamp:
rm -f .git/.recomp-submodules-stampThen retry:
git submodule update --init --recursive
make toolsExample:
You're building on an unsupported platform: 'AMD64' with 4-byte pointers.
CMake selected the wrong compiler or reused an incompatible build cache from another shell.
Verify that UCRT64 GCC is active:
which gcc
gcc -dumpmachineThen remove the cached tool builds:
rm -rf lib/DolRecomp/build
rm -rf lib/ModernGekko/build
make toolsDo not reuse build directories after switching between MSVC, MinGW, UCRT64, Clang, or GCC.
Example:
generator: Ninja
Does not match the generator used previously: Visual Studio 17 2022
Delete the affected build directories:
rm -rf lib/DolRecomp/build
rm -rf lib/ModernGekko/build
make toolsModernGekko-Template uses Ninja. Do not configure the same build directory with both Ninja and Visual Studio generators.
Examples include:
QOS_FLOWID has not been declared
QOS_NON_ADAPTIVE_FLOW was not declared
This commonly occurs when a non-MSYS2 Windows compiler, such as Scoop's GCC distribution, is selected.
Check every GCC installation visible through PATH:
type -a gcc
type -a g++The first results should be:
/ucrt64/bin/gcc
/ucrt64/bin/g++
Temporarily correct PATH if necessary:
export PATH=/ucrt64/bin:/usr/bin:$PATH
hash -rThen remove the old build directories and rebuild:
rm -rf lib/DolRecomp/build
rm -rf lib/ModernGekko/build
make toolsInstall the dependency packages listed on the Getting Started page, then check that pkg-config can locate them:
pkg-config --version
pkg-config --list-all | grep -E 'evdev|udev|gtk|alsa|pulse'After installing missing packages, remove the cached build directory and retry:
rm -rf lib/ModernGekko/build
make toolsIf the terminal prints Killed, the kernel probably terminated a compiler process because the system ran out of memory.
Reduce build parallelism:
make tools JOBS=2For a game module:
make recompile GAME=Game-Slug JOBS=2For LLVM:
make llvm GAME=Game-Slug JOBS=2Close memory-heavy applications before using the LLVM backend. LLVM object generation may require significantly more memory than the default C backend did.
On older template revisions, JOBS=2 may limit the CMake build without limiting every LLVM object worker. Update to the latest template if LLVM still launches too many workers.
Run:
git submodule sync --recursive
git submodule update --init --recursiveConfirm their state:
git submodule status --recursiveA line beginning with - means that submodule has not been initialized.
Build both tools:
make toolsBuild them separately if isolating a failure:
make dolrecomp
make moderngekkoThe first operation for a game must provide the ISO:
make run ISO="/path/to/game.iso"The filename is converted into a game slug under extracted/.
After extraction, use that slug without providing the ISO again:
make run GAME=Game-SlugSee the available extracted games:
ls extractedQuote it:
make run ISO="/home/user/Games/My Game.iso"DolRecomp currently expects LLVM 19 or 20.
Check the installed version:
llvm-config --versionProvide LLVM's CMake directory explicitly:
make llvm GAME=Game-Slug \
LLVM_DIR="$(llvm-config --cmakedir)"You can also provide the directory manually:
make llvm GAME=Game-Slug \
LLVM_DIR="/path/to/llvm/lib/cmake/llvm"Do not delete the generated output directory.
Resume generation with:
DOLRECOMP_LLVM_RESUME=1 make llvm GAME=Game-SlugOn Windows, finished module caching works normally. Some older revisions may fail to reuse individual LLVM COFF object files and rebuild those chunks. Update to the latest template if resume does not recognize existing Windows objects.
Update the template and its pinned submodules first:
git pull --recurse-submodules
git submodule sync --recursive
git submodule update --init --recursiveThen rebuild the LLVM-enabled tools:
rm -rf lib/DolRecomp/build
rm -rf lib/ModernGekko/build
make tools BACKEND=llvmIf the error remains, report the complete LLVM message and the guest function or chunk address shown immediately before the failure.
Do not delete the existing LLVM object output if you intend to resume it.
First test without graphics:
make run GAME=Game-Slug \
RUN_ARGS="--headless --allow-interpreter"If headless mode continues farther, test Vulkan explicitly:
make run GAME=Game-Slug \
RUN_ARGS="--graphics Vulkan --allow-interpreter"This helps separate CPU or recompilation problems from graphics configuration problems.
On Linux:
mv ~/.local/share/moderngekko \
~/.local/share/moderngekko.backupOn Windows from UCRT64:
mv "$LOCALAPPDATA/moderngekko" \
"$LOCALAPPDATA/moderngekko.backup"Restart ModernGekko after renaming the directory. The old configuration remains available in the backup directory.
Run the default C backend:
make run GAME=Game-Slug BACKEND=c \
RUN_ARGS="--headless --allow-interpreter"Run the LLVM backend:
make llvm-run GAME=Game-Slug \
RUN_ARGS="--headless --allow-interpreter"If one backend works and the other does not, include that difference in the bug report.
DolRecomp may report a possible self-modifying or executable-memory patching instruction.
This is a warning, not necessarily an immediate failure. Test with:
make run GAME=Game-Slug \
RUN_ARGS="--allow-interpreter"Include the reported guest address when opening an issue.
Remove compiled tools while preserving extracted games:
make clean-toolsRemove generated modules and extracted games:
make clean-extractedRemove everything generated by the template:
make cleanFor a toolchain or CMake cache problem, prefer removing only the tool builds:
rm -rf lib/DolRecomp/build
rm -rf lib/ModernGekko/buildDo not run a full clean before attempting to resume a long LLVM build.
Include all of the following:
git rev-parse HEAD
git submodule status --recursive
make checkAlso include:
- Operating system and version
- Linux distribution, or Windows shell environment
- CPU architecture
- Compiler and version
- CMake and Ninja versions
- Exact command that failed
- Full output beginning at the first error
- Selected backend,
corllvm - Selected toolchain
- Whether the failure happens in headless mode
- Whether
--allow-interpreterchanges the result - Whether the C and LLVM backends behave differently in testing
Useful version commands:
gcc --version
clang --version
cmake --version
ninja --version
make --version
llvm-config --versionOn Windows, also include:
echo "$MSYSTEM"
which gcc
which cmake
which ninjaDo not attach any copyrighted game assets whatsoever.