Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting your build

(on Linux)
build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found

This workaround is applicable when building Servo using nix in Linux distributions other than NixOS. The error indicates that the version of glibc included in the distribution is older than the one in nixpkgs.

At the end of the shell.nix, change the line if ! [ -e /etc/NIXOS ]; then to if false; then to disable the support in shell.nix for producing binary artifacts that don't depend on the nix store.

(on Linux)
error: getting status of /nix/var/nix/daemon-socket/socket: Permission denied

If you get this error and you’ve installed Nix with your system package manager:

  • Add yourself to the nix-users group
  • Log out and log back in
(on Linux)
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

This error is harmless, but you can fix it as follows:

  • Run sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
  • Run sudo nix-channel --update
(on Windows)
Cannot run mach in a path on a case-sensitive file system on Windows.
  • Open a command prompt or PowerShell as administrator (Win+X, A)
  • Disable case sensitivity for your Servo repo:
    fsutil file SetCaseSensitiveInfo X:\path\to\servo disable
(on Windows)
Could not find DLL dependency: api-ms-win-crt-runtime-l1-1-0.dll
DLL file `api-ms-win-crt-runtime-l1-1-0.dll` not found!

Find the path to Redist\ucrt\DLLs\x64\api-ms-win-crt-runtime-l1-1-0.dll, e.g. C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64\api-ms-win-crt-runtime-l1-1-0.dll.

Then set the WindowsSdkDir environment variable to the path that contains Redist, e.g. C:\Program Files (x86)\Windows Kits\10.

(on Windows)
thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'clang.dll\', \'libclang.dll\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [(C:\\Program Files\\LLVM\\bin\\libclang.dll: invalid DLL (64-bit))])"', C:\Users\me\.cargo\registry\src\...

rustup may have been installed with the 32-bit default host, rather than the 64-bit default host needed by Servo. Check your default host with rustup show, then set the default host:

> rustup set default-host x86_64-pc-windows-msvc

(on Windows)
ERROR: GetShortPathName returned a long path name: `C:/PROGRA~2/Windows Kits/10/`. Use `fsutil file setshortname' to create a short name for any components of this path that have spaces.

SpiderMonkey (mozjs) requires 8.3 filenames to be enabled on Windows (#26010).

  • Open a command prompt or PowerShell as administrator (Win+X, A)
  • Enable 8.3 filename generation: fsutil behavior set disable8dot3 0
  • Uninstall and reinstall whatever contains the failing paths, such as Visual Studio or the Windows SDK — this is easier than adding 8.3 filenames by hand
(on Windows)
= note: lld-link: error: undefined symbol: __std_search_1 >>> referenced by D:\a\mozjs\mozjs\mozjs-sys\mozjs\intl\components\src\NumberFormatterSkeleton.cpp:157

Issues like this can occur when mozjs is upgraded, as the update may depend on newer MSVC (remember we require "Latest" in set up your environment!). To resolve it, launch the Visual Studio Installer and apply all available updates.