ladybird/Documentation/Troubleshooting.md
Andrew Kaster f71b909bed CMake+CI: Use the same preset names on every platform
Starting with CMake 3.30 and CMakePresets version 9, the include field
supports interesting macro expansions. We can now define platform
specific presets in separate files and include them in the top-level
CMakePresets.json, while keeping the same preset names across all
platforms. This avoids some preset explosion at the cost of some mostly
empty json files for each unix platform.

The CMake minimum required in the top-level and Lagom CMakeLists.txt
have not been adjusted in this patch, as that would have the effect of
changing the default policy versions and is a bit out of scope.
2026-01-17 12:18:46 -07:00

68 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Troubleshooting
In case of an error, you might find an answer of how to deal with it here.
## Building Ladybird
### CMake fails to configure the build because it's outdated
Ensure your CMake version is >= 3.30 with `cmake --version`. If your system doesn't provide a suitable
version of CMake, you can download a binary release from the [CMake website](https://cmake.org/download).
### GCC is missing or is outdated
Ensure your gcc version is supported by the [build system](BuildInstructionsLadybird.md#build-prerequisites) with
`gcc --version`. Otherwise, install it. If your gcc binary is not called `gcc` you have to specify the names of your
C and C++ compiler when you run cmake, e.g. `cmake ../.. -GNinja -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13`.
### Legacy renegotiation is disabled
Ensure your `/etc/ssl/openssl.cnf` file has the following options:
```console
[openssl_init]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT@SECLEVEL=1
Options = UnsafeLegacyRenegotiation
```
### “Targets may link only to libraries. CMake is dropping the item” message (when building with the Qt UI on macOS)
When building with the Qt UI on macOS, you may encounter the following message:
```
CMake Warning at /opt/homebrew/Cellar/qt/6.7.0_1/lib/cmake/Qt6/FindWrapOpenGL.cmake:48 (target_link_libraries):
Target "ladybird" requests linking to directory "/usr/X11R6/lib". Targets
may link only to libraries. CMake is dropping the item.
```
…followed by 14-line stack trace, the top of which is this:
```
Build/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
```
…and all of it shown in bright yellow, making you think it must be important and something must need to be fixed. But thats not the case. Instead, despite that, youll be able to build successfully with the Qt UI.
## Running Ladybird
### Race condition on exit when running headless on systems with `llvmpipe`
When running `--headless=text` or `--headless=layout-tree` on a UNIX system with the [llvmpipe](https://docs.mesa3d.org/drivers/llvmpipe.html) software rasterizer
(common default on virtual machines), Ladybird will occasionally terminate with:
```
double free or corruption (!prev)
```
Run Ladybird with `--force-cpu-painting` to make that go away.
Likely explanation ([this thread](https://github.com/LadybirdBrowser/ladybird/issues/5097)):
> suspect […] atexit handlers are registered twice possibly due to llvmpipe and fork/exec interaction issues when starting WebContent process