1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 00:37:35 +00:00

Documentation: Hide Meta/serenity.sh rebuild-toolchain

Unless a new toolchain update has been merged, users should not need to
rebuild their toolchain. Yet, the first thing they see in the build
documentation is to run `Meta/serenity.sh rebuild-toolchain`, which
might incorrectly lead them to use it whenever they encounter an error.
This is a waste of time and causes frustration.

Move any mentions of this option to `Troubleshooting.md` and add a note
to `BuildInstructions.md` about the toolchain build being a one-time
endeavor.
This commit is contained in:
Daniel Bertalan 2023-09-17 23:36:56 +02:00 committed by Andrew Kaster
parent 9cd3477763
commit 715f452233
4 changed files with 36 additions and 21 deletions

View file

@ -14,6 +14,33 @@ version of CMake, you can download a binary release from the [CMake website](htt
Ensure your [QEMU](https://www.qemu.org/) version is >= 5 with `qemu-system-i386 -version`. Otherwise,
install it. You can also build it using the `Toolchain/BuildQemu.sh` script.
### The toolchain is outdated
We strive to use the latest compilers and build tools to ensure the best developer experience; so every
few months, the toolchain needs to be updated. When such an update is due, an error like the following
will be printed during the build:
```
CMake Error at CMakeLists.txt:28 (message):
GNU version (13.1.0) does not match expected compiler version (13.2.0).
Please rebuild the GNU Toolchain
```
Or like this one:
```
Your toolchain has an old version of binutils installed.
installed version: "GNU ld (GNU Binutils) 2.40"
expected version: "GNU ld (GNU Binutils) 2.41"
Please run Meta/serenity.sh rebuild-toolchain x86_64 to update it.
```
Run `Meta/serenity.sh rebuild-toolchain x86_64` to perform the update.
CMake might cache the compiler version in some cases and print an error even after the toolchain has been rebuilt.
If this happens, run `Meta/serenity.sh rebuild x86_64` to start over from a fresh build directory.
### GCC is missing or is outdated
Ensure your gcc version is >= 12 with `gcc --version`. Otherwise, install it. If your gcc binary is not
@ -78,5 +105,5 @@ extensions, or you try to use VirtualBox without using a x64 virtualization mode
### Boot fails with "KVM doesn't support guest debugging"
- Update your host kernel to at least version `5.10`. This is the oldest kernel which properly supports the required KVM capability `KVM_CAP_SET_GUEST_DEBUG` (see corresponding [kernel commit](https://github.com/torvalds/linux/commit/b9b2782cd5)).
- Make sure that your distro has the qemu debug feature actually enabled (the corresponding check is [here](https://gitlab.com/qemu-project/qemu/-/blob/222059a0fccf4af3be776fe35a5ea2d6a68f9a0b/accel/kvm/kvm-all.c#L2540)).
- Make sure that your distro has the qemu debug feature actually enabled (the corresponding check is [here](https://gitlab.com/qemu-project/qemu/-/blob/222059a0fccf4af3be776fe35a5ea2d6a68f9a0b/accel/kvm/kvm-all.c#L2540)).
- Or, disable KVM debugging by setting this env var when running serenity: `SERENITY_DISABLE_GDB_SOCKET=1`