Skip to content

Instantly share code, notes, and snippets.

@lions-tech
Created July 19, 2024 10:15
Show Gist options
  • Save lions-tech/a34548a39363dc370aa12a35fdf54aad to your computer and use it in GitHub Desktop.
Save lions-tech/a34548a39363dc370aa12a35fdf54aad to your computer and use it in GitHub Desktop.
Build failure: Wayland - Flake & Log

Flake:

{
  description = "NixOS WSL Base Config";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
  };

  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs {
        inherit system;
        # from https://github.com/NixOS/nixpkgs/blob/c716603a63aca44f39bef1986c13402167450e0a/nixos/modules/config/no-x-libs.nix#L29
        overlays = nixpkgs.lib.singleton (nixpkgs.lib.const (super: {
          beam = super.beam_nox;
          cairo = super.cairo.override { x11Support = false; };
          dbus = super.dbus.override { x11Support = false; };
          fastfetch = super.fastfetch.override { vulkanSupport = false; waylandSupport = false; x11Support = false; };
          ffmpeg = super.ffmpeg.override { ffmpegVariant = "headless"; };
          ffmpeg_4 = super.ffmpeg_4.override { ffmpegVariant = "headless"; };
          ffmpeg_5 = super.ffmpeg_5.override { ffmpegVariant = "headless"; };
          ffmpeg_6 = super.ffmpeg_6.override { ffmpegVariant = "headless"; };
          ffmpeg_7 = super.ffmpeg_7.override { ffmpegVariant = "headless"; };
          # dep of graphviz, libXpm is optional for Xpm support
          gd = super.gd.override { withXorg = false; };
          ghostscript = super.ghostscript.override { cupsSupport = false; x11Support = false; };
          gjs = (super.gjs.override { installTests = false; }).overrideAttrs { doCheck = false; }; # avoid test dependency on gtk3
          gobject-introspection = super.gobject-introspection.override { x11Support = false; };
          gpg-tui = super.gpg-tui.override { x11Support = false; };
          gpsd = super.gpsd.override { guiSupport = false; };
          graphviz = super.graphviz-nox;
          gst_all_1 = super.gst_all_1 // {
            gst-plugins-bad = super.gst_all_1.gst-plugins-bad.override { guiSupport = false; };
            gst-plugins-base = super.gst_all_1.gst-plugins-base.override { enableGl = false; enableWayland = false; enableX11 = false; };
            gst-plugins-good = super.gst_all_1.gst-plugins-good.override { enableWayland = false; enableX11 = false; gtkSupport = false; qt5Support = false; qt6Support = false; };
            gst-plugins-rs = super.gst_all_1.gst-plugins-rs.override { withGtkPlugins = false; };
          };
          imagemagick = super.imagemagick.override { libX11Support = false; libXtSupport = false; };
          imagemagickBig = super.imagemagickBig.override { libX11Support = false; libXtSupport = false; };
          intel-vaapi-driver = super.intel-vaapi-driver.override { enableGui = false; };
          libdevil = super.libdevil-nox;
          libextractor = super.libextractor.override { gtkSupport = false; };
          libplacebo = super.libplacebo.override { vulkanSupport = false; };
          libva = super.libva-minimal;
          limesuite = super.limesuite.override { withGui = false; };
          mc = super.mc.override { x11Support = false; };
          mpv-unwrapped = super.mpv-unwrapped.override { drmSupport = false; screenSaverSupport = false; sdl2Support = false; vulkanSupport = false; waylandSupport = false; x11Support = false; };
          msmtp = super.msmtp.override { withKeyring = false; };
          mupdf = super.mupdf.override { enableGL = false; enableX11 = false; };
          neofetch = super.neofetch.override { x11Support = false; };
          networkmanager-fortisslvpn = super.networkmanager-fortisslvpn.override { withGnome = false; };
          networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; };
          networkmanager-l2tp = super.networkmanager-l2tp.override { withGnome = false; };
          networkmanager-openconnect = super.networkmanager-openconnect.override { withGnome = false; };
          networkmanager-openvpn = super.networkmanager-openvpn.override { withGnome = false; };
          networkmanager-sstp = super.networkmanager-vpnc.override { withGnome = false; };
          networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
          pango = super.pango.override { x11Support = false; };
          pinentry-curses = super.pinentry-curses.override { withLibsecret = false; };
          pipewire = super.pipewire.override { vulkanSupport = false; x11Support = false; };
          pythonPackagesExtensions = super.pythonPackagesExtensions ++ [
            (python-final: python-prev: {
              # tk feature requires wayland which fails to compile
              matplotlib = python-prev.matplotlib.override { enableTk = false; };
            })
          ];
          qemu = super.qemu.override { gtkSupport = false; spiceSupport = false; sdlSupport = false; };
          qrencode = super.qrencode.overrideAttrs (_: { doCheck = false; });
          qt5 = super.qt5.overrideScope (nixpkgs.lib.const (super': {
            qtbase = super'.qtbase.override { withGtk3 = false; withQttranslation = false; };
          }));
          stoken = super.stoken.override { withGTK3 = false; };
          # translateManpages -> perlPackages.po4a -> texlive-combined-basic -> texlive-core-big -> libX11
          util-linux = super.util-linux.override { translateManpages = false; };
          vim-full = super.vim-full.override { guiSupport = false; };
          vte = super.vte.override { gtkVersion = null; };
          zbar = super.zbar.override { enableVideo = false; withXorg = false; };
        }));
      };
    in
    {
      # NixOS configuration entrypoint
      # Available through 'nixos-rebuild --flake .#your-hostname'
      nixosConfigurations = {
        wsl = nixpkgs.lib.nixosSystem {
          system = "x86_64-linux";
          modules = [
            {
              hardware.opengl.enable = true;
              environment.noXlibs = true;
            }
          ];
        };
      };
      packages.${system} = {
        default = pkgs.wayland;
      };
    };
}

Error log:

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/iwg7f4kv2pfalirkp2aa74jzbhqg3fim-wayland-1.22.0.tar.xz
source root is wayland-1.22.0
setting SOURCE_DATE_EPOCH to timestamp 1680595111 of file wayland-1.22.0/wayland-scanner.mk
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
applying patch /nix/store/3hzvdj9v9j4m82lx9l8wc5vbd7241b5w-darwin.patch
patching file meson.build
patching file src/event-loop.c
patching file src/wayland-os.c
patching script interpreter paths in doc/doxygen/gen-doxygen.py
doc/doxygen/gen-doxygen.py: interpreter directive changed from "#!/usr/bin/env python3" to "/nix/store/4rf5qybw37b4lh1g0xczlv14sqdbmnpm-python3-3.11.9/bin/python3"
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
mesonConfigurePhase flags: --prefix=/nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0 --libdir=/nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0/lib --libexecdir=/nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0/libexec --bindir=/nix/store/2nn0lggd379l97bwvxv125lw2xidv6yr-wayland-1.22.0-bin/bin --sbindir=/nix/store/2nn0lggd379l97bwvxv125lw2xidv6yr-wayland-1.22.0-bin/sbin --includedir=/nix/store/nv9bxjcjfk0dqjnlsiqmzbnlqzafw510-wayland-1.22.0-dev/include --mandir=/nix/store/4dm1x2ph4z7ix0s372zvlkvv38jz0ali-wayland-1.22.0-man/share/man --infodir=/nix/store/2nn0lggd379l97bwvxv125lw2xidv6yr-wayland-1.22.0-bin/share/info --localedir=/nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain -Ddocumentation=true -Dlibraries=true -Dtests=true
The Meson build system
Version: 1.4.0
Source dir: /build/wayland-1.22.0
Build dir: /build/wayland-1.22.0/build
Build type: native build
Project name: wayland
Project version: 1.22.0
C compiler for the host machine: gcc (gcc 13.2.0 "gcc (GCC) 13.2.0")
C linker for the host machine: gcc ld.bfd 2.41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wno-unused-parameter: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wmissing-prototypes: YES 
Compiler for C supports arguments -fvisibility=hidden: YES 
Has header "sys/prctl.h" : YES 
Has header "sys/procctl.h" : NO 
Has header "sys/ucred.h" : NO 
Checking for function "accept4" : YES 
Checking for function "mkostemp" : YES 
Checking for function "posix_fallocate" : YES 
Checking for function "prctl" : YES 
Checking for function "memfd_create" : YES 
Checking for function "mremap" : YES 
Checking for function "strndup" : YES 
Checking whether type "struct xucred" has member "cr_pid" : NO 
Found pkg-config: YES (/nix/store/gx6s21qcy4glnla7f3nvrawnfrw6g3jl-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
Run-time dependency libffi found: YES 3.4.6
Header "sys/signalfd.h" has symbol "SFD_CLOEXEC" : YES 
Header "sys/timerfd.h" has symbol "TFD_CLOEXEC" : YES 
Header "time.h" has symbol "CLOCK_MONOTONIC" : YES 
Checking for function "clock_gettime" : NO 
Library rt found: YES
Checking for function "clock_gettime" with dependency -lrt: YES 
Configuring config.h using configuration
Configuring wayland-version.h using configuration
Run-time dependency expat found: YES 2.6.2
Run-time dependency libxml-2.0 found: YES 2.12.7
Program embed.py found: YES (/nix/store/4rf5qybw37b4lh1g0xczlv14sqdbmnpm-python3-3.11.9/bin/python3.11 /build/wayland-1.22.0/src/embed.py)
Library m found: YES
Run-time dependency threads found: YES
Program nm found: YES
Program wayland-egl-symbols-check found: YES (/build/wayland-1.22.0/egl/wayland-egl-symbols-check)
Library dl found: YES
Dependency threads found: YES unknown (cached)
Dependency threads found: YES unknown (cached)
Library dl found: YES
C++ compiler for the host machine: g++ (gcc 13.2.0 "g++ (GCC) 13.2.0")
C++ linker for the host machine: g++ ld.bfd 2.41
Program sed found: YES (/nix/store/7xwbkzfrs6flyvjyvd23m8r2mlnycinq-gnused-4.9/bin/sed)
Program scanner-test.sh found: YES (/build/wayland-1.22.0/tests/scanner-test.sh)
Program dot found: YES (/nix/store/pk4zwp0vcxbsvpb3j2bx584123d5smc1-graphviz-10.0.1/bin/dot)
Program doxygen found: YES (/nix/store/46zadiib1ird939ga8sm66lp5hyi6kg4-doxygen-1.10.0/bin/doxygen)
Program xsltproc found: YES (/nix/store/fmdkpq9ry2w2jvfpwvqanj2kxvjzaa24-libxslt-1.1.39-bin/bin/xsltproc)
Program xmlto found: YES (/nix/store/xh6jiabpcah34q4v1j7sahb2z295xl30-xmlto-0.0.28/bin/xmlto)
Message: doxygen: 1.10.0 (GIT-NOTFOUND)
Message: dot: dot - graphviz version 10.0.1 (0)
Configuring wayland.doxygen using configuration
Program gen-doxygen.py found: YES (/build/wayland-1.22.0/doc/doxygen/gen-doxygen.py)
Build targets in project: 60
NOTICE: Future-deprecated features used:
 * 0.62.0: {'pkgconfig.generate variable for builtin directories'}
 * 0.64.0: {'copy arg in configure_file'}

wayland 1.22.0

  User defined options
    auto_features: enabled
    bindir       : /nix/store/2nn0lggd379l97bwvxv125lw2xidv6yr-wayland-1.22.0-bin/bin
    buildtype    : plain
    includedir   : /nix/store/nv9bxjcjfk0dqjnlsiqmzbnlqzafw510-wayland-1.22.0-dev/include
    infodir      : /nix/store/2nn0lggd379l97bwvxv125lw2xidv6yr-wayland-1.22.0-bin/share/info
    libdir       : /nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0/lib
    libexecdir   : /nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0/libexec
    localedir    : /nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0/share/locale
    mandir       : /nix/store/4dm1x2ph4z7ix0s372zvlkvv38jz0ali-wayland-1.22.0-man/share/man
    prefix       : /nix/store/6m4dfhby72197qnibcq8ajp710zmcj7z-wayland-1.22.0
    sbindir      : /nix/store/2nn0lggd379l97bwvxv125lw2xidv6yr-wayland-1.22.0-bin/sbin
    wrap_mode    : nodownload
    documentation: true
    libraries    : true
    tests        : true

Found ninja-1.11.1 at /nix/store/gjhpxkgdfflv9r4ia2w1i7whmb37lvq6-ninja-1.11.1/bin/ninja
mesonConfigurePhase: enabled\ parallel\ building
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
build flags: -j20
[1/107] Generating doc/publican/sources/ProtocolInterfaces.xml with a custom command
[2/107] Generating doc/doxygen/xml/wayland-architecture.map with a custom command
FAILED: doc/doxygen/xml/wayland-architecture.map 
/nix/store/pk4zwp0vcxbsvpb3j2bx584123d5smc1-graphviz-10.0.1/bin/dot -Tcmapx_np -odoc/doxygen/xml/wayland-architecture.map ../doc/doxygen/dot/wayland-architecture.gv
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Warning: no value for width of non-ASCII character 226. Falling back to width of space character
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
[3/107] Generating doc/doxygen/xml/x-architecture.map with a custom command
FAILED: doc/doxygen/xml/x-architecture.map 
/nix/store/pk4zwp0vcxbsvpb3j2bx584123d5smc1-graphviz-10.0.1/bin/dot -Tcmapx_np -odoc/doxygen/xml/x-architecture.map ../doc/doxygen/dot/x-architecture.gv
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Warning: no value for width of non-ASCII character 226. Falling back to width of space character
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
[4/107] Generating doc/publican/sources/ProtocolSpec.xml with a custom command
[5/107] Generating doc/doxygen/xml/wayland-architecture.png with a custom command
FAILED: doc/doxygen/xml/wayland-architecture.png 
/nix/store/pk4zwp0vcxbsvpb3j2bx584123d5smc1-graphviz-10.0.1/bin/dot -Tpng -odoc/doxygen/xml/wayland-architecture.png ../doc/doxygen/dot/wayland-architecture.gv
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Warning: no value for width of non-ASCII character 226. Falling back to width of space character
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
[6/107] Generating doc/doxygen/xml/x-architecture.png with a custom command
FAILED: doc/doxygen/xml/x-architecture.png 
/nix/store/pk4zwp0vcxbsvpb3j2bx584123d5smc1-graphviz-10.0.1/bin/dot -Tpng -odoc/doxygen/xml/x-architecture.png ../doc/doxygen/dot/x-architecture.gv
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Warning: no value for width of non-ASCII character 226. Falling back to width of space character
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
Error: Could not find/open font
[7/107] Compiling C object egl/wayland-egl-abi-check.p/wayland-egl-abi-check.c.o
[8/107] Generating doc/publican/sources/Introduction.xml with a custom command
[9/107] Generating doc/publican/sources/Architecture.xml with a custom command
warning: failed to load external entity "../doc/publican/images/x-architecture.map"
warning: failed to load external entity "../doc/publican/images/wayland-architecture.map"
[10/107] Compiling C object tests/exec-fd-leak-checker.p/exec-fd-leak-checker.c.o
[11/107] Compiling C object tests/fixed-benchmark.p/fixed-benchmark.c.o
[12/107] Compiling C object tests/fixed-test.p/fixed-test.c.o
[13/107] Compiling C object tests/array-test.p/array-test.c.o
[14/107] Compiling C object tests/map-test.p/map-test.c.o
[15/107] Generating src/wayland.dtd.h with a custom command (wrapped by meson to capture output)
[16/107] Compiling C object src/libwayland-private.a.p/wayland-os.c.o
[17/107] Compiling C object tests/list-test.p/list-test.c.o
[18/107] Compiling C object src/libwayland-util.a.p/wayland-util.c.o
[19/107] Generating doc/doxygen/man-pages-3 with a custom command
warning: Tag 'HTML_TIMESTAMP' at line 8 of file '-' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
/build/wayland-1.22.0/src/wayland-client-core.h:125: warning: Found non-existing group 'wl_proxy' for the command '@ingroup', ignoring command
/build/wayland-1.22.0/src/wayland-server-core.h:377: warning: explicit link request to 'wl_signal_add' could not be resolved
[20/107] Compiling C object tests/os-wrappers-test.p/os-wrappers-test.c.o
[21/107] Compiling C object src/libwayland-private.a.p/connection.c.o
ninja: build stopped: subcommand failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment