hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
273 stars 47 forks source link

Unable to build on Aarch64 VMware fusion VM #13

Closed fmoda3 closed 1 year ago

fmoda3 commented 1 year ago

After adding the nixos and home manager modules, and enabling both, a nixos-rebuild results in this error:

building the system configuration...
warning: Git tree '/root/.nix-configs' is dirty
error: builder for '/nix/store/icz9gdxj6nqwjkrm5vhxwy0vwhbsddj6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae.drv' failed with exit code 1;
       last 10 log lines:
       > FAILED: xdg-desktop-portal-hyprland.p/src_screencast_wlr_screencast.c.o
       > gcc -Ixdg-desktop-portal-hyprland.p -I. -I.. -I../include -Iprotocols -I/nix/store/m5vjh9vkwv860fgjf3lp318sq91fas41-wayland-1.21.0-dev/include -I/nix/store/5i9hp7vf8f7cgynks2dfazca0kpzcvg1-systemd-252.1-dev/include -I/nix/store/xqcb7z6gwzvfawm9q9y3ixshx1g40lkc-pipewire-0.3.63-dev/include/pipewire-0.3 -I/nix/store/xqcb7z6gwzvfawm9q9y3ixshx1g40lkc-pipewire-0.3.63-dev/include/spa-0.2 -I/nix/store/vdpgiildw7rdzm293lks13z343y1jkna-inih-56/include -I/nix/store/dc13rizw4r38a41r1i79xw455x2m6305-mesa-22.2.5-dev/include -I/nix/store/i9ay2q2bnwcknmid34dhn40izkqa308v-libdrm-2.4.114-dev/include -I/nix/store/i9ay2q2bnwcknmid34dhn40izkqa308v-libdrm-2.4.114-dev/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -D_POSIX_C_SOURCE=200809L '-DSYSCONFDIR="/nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/etc"' -DHAVE_LIBSYSTEMD=1 -D_REENTRANT -MD -MQ xdg-desktop-portal-hyprland.p/src_screencast_wlr_screencast.c.o -MF xdg-desktop-portal-hyprland.p/src_screencast_wlr_screencast.c.o.d -o xdg-desktop-portal-hyprland.p/src_screencast_wlr_screencast.c.o -c ../src/screencast/wlr_screencast.c
       > ../src/screencast/wlr_screencast.c: In function 'vasprintf':
       > ../src/screencast/wlr_screencast.c:645:49: error: missing binary operator before token "("
       >   645 | #if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy)
       >       |                                                 ^
       > [25/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screencast_screencast_common.c.o
       > [26/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screencast_screencast.c.o
       > [27/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screencast_pipewire_screencast.c.o
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/icz9gdxj6nqwjkrm5vhxwy0vwhbsddj6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae.drv'.
error: 1 dependencies of derivation '/nix/store/fmazzd7x223jivf9yv8r3apvm98ybh0g-dbus-1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l00bhp5jx590ia64a889zixzhss0i10v-xdg-portals.drv' failed to build
error: 1 dependencies of derivation '/nix/store/p3hds7kfdf61sn0cnwwwqvfgwianplby-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6nah1zll3pnnj8bmbj0222a6l8jimwlr-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9mxp13grs7cf7q9n151gf6hdaf0lhq87-nixos-system-cicucci-devvm-23.05.20221222.7ba7b45.drv' failed to build

the nix log shows:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/w3bhan5scvsb0ksbzyf42g0r80vgpq5i-vj08gn8simj499vy5kz0qckvma01glg0-source
source root is vj08gn8simj499vy5kz0qckvma01glg0-source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
meson flags: --buildtype=plain         --libdir=/nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/lib --libexecdir=/nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre>
The Meson build system
Version: 0.64.1
Source dir: /build/vj08gn8simj499vy5kz0qckvma01glg0-source
Build dir: /build/vj08gn8simj499vy5kz0qckvma01glg0-source/build
Build type: native build
Project name: xdg-desktop-portal-hyprland
Project version: 0.6.0
C compiler for the host machine: gcc (gcc 9.5.0 "gcc (GCC) 9.5.0")
C linker for the host machine: gcc ld.bfd 2.39
Host machine cpu family: aarch64
Host machine cpu: aarch64
Compiler for C supports arguments -Wno-missing-braces: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -D_POSIX_C_SOURCE=200809L: YES
Library rt found: YES
Found pkg-config: /nix/store/xjpkpbs2mb4nqyqadbi44bwxa8gap8h9-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
Run-time dependency libpipewire-0.3 found: YES 0.3.63
Run-time dependency wayland-client found: YES 1.21.0
Run-time dependency wayland-protocols found: YES 1.31
Run-time dependency inih found: YES 56
Run-time dependency gbm found: YES 22.2.5
Run-time dependency libdrm found: YES 2.4.114
Checking for function "timerfd_create" : YES
Checking for function "signalfd" : YES
Run-time dependency libsystemd found: YES 252
Found pkg-config: /nix/store/xjpkpbs2mb4nqyqadbi44bwxa8gap8h9-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
Build-time dependency wayland-scanner found: YES 1.21.0
Program /nix/store/0029k730qv1fl3wcqifppdm3gk5gy51r-wayland-1.21.0-bin/bin/wayland-scanner found: YES (/nix/store/0029k730qv1fl3wcqifppdm3gk5gy51r-wayland-1.21.0-bin/bin/wayland-scanner)
Run-time dependency systemd found: YES 252
Configuring xdg-desktop-portal-hyprland.service using configuration
Configuring org.freedesktop.impl.portal.desktop.hyprland.service using configuration
Build targets in project: 11

xdg-desktop-portal-hyprland 0.6.0

  User defined options
    auto_features  : enabled
    bindir         : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/bin
    buildtype      : plain
    includedir     : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/include
    infodir        : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/share/info
    libdir         : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/lib
    libexecdir     : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/libexec
    localedir      : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/share/locale
    mandir         : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/share/man
    prefix         : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae
    sbindir        : /nix/store/fyc0hdwik5bp70msbxif40yqjpmvg5z6-xdg-desktop-portal-hyprland-0.pre+date=2022-12-13_9fb4fae/sbin
    wrap_mode      : nodownload
    sd-bus-provider: libsystemd

Found ninja-1.11.1 at /nix/store/1313aamckdb8y5jixp0k4pc8s8qgyrj7-ninja-1.11.1/bin/ninja
meson: enabled parallel building
@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j4
[1/29] Generating protocols/__nix_store_9czb3wcbls9ihflinb90bp2zkj50a2x8_wayland_protocols_1_31_share_wayland_protocols_unstable_linux_dmabuf_linux_dmabuf_unstable_v1_xml_c with a custom command
[2/29] Generating protocols/__nix_store_9czb3wcbls9ihflinb90bp2zkj50a2x8_wayland_protocols_1_31_share_wayland_protocols_unstable_xdg_output_xdg_output_unstable_v1_xml_c with a custom command
[3/29] Generating protocols/__nix_store_9czb3wcbls9ihflinb90bp2zkj50a2x8_wayland_protocols_1_31_share_wayland_protocols_unstable_linux_dmabuf_linux_dmabuf_unstable_v1_xml_client_h with a custom command
[4/29] Generating protocols/__nix_store_9czb3wcbls9ihflinb90bp2zkj50a2x8_wayland_protocols_1_31_share_wayland_protocols_unstable_xdg_output_xdg_output_unstable_v1_xml_client_h with a custom command
[5/29] Generating protocols/wlr_screencopy_unstable_v1_xml_c with a custom command
[6/29] Generating protocols/wlr_screencopy_unstable_v1_xml_client_h with a custom command
[7/29] Generating protocols/wlr_foreign_toplevel_management_unstable_v1_xml_c with a custom command
[8/29] Generating protocols/wlr_foreign_toplevel_management_unstable_v1_xml_client_h with a custom command
[9/29] Generating protocols/hyprland_protocols_protocols_hyprland_toplevel_export_v1_xml_c with a custom command
[10/29] Generating protocols/hyprland_protocols_protocols_hyprland_toplevel_export_v1_xml_client_h with a custom command
[11/29] Compiling C object xdg-desktop-portal-hyprland.p/meson-generated_.._protocols_xdg-output-unstable-v1-protocol.c.o
[12/29] Compiling C object xdg-desktop-portal-hyprland.p/meson-generated_.._protocols_linux-dmabuf-unstable-v1-protocol.c.o
[13/29] Compiling C object xdg-desktop-portal-hyprland.p/meson-generated_.._protocols_wlr-screencopy-unstable-v1-protocol.c.o
[14/29] Compiling C object xdg-desktop-portal-hyprland.p/meson-generated_.._protocols_wlr-foreign-toplevel-management-unstable-v1-protocol.c.o
[15/29] Compiling C object xdg-desktop-portal-hyprland.p/meson-generated_.._protocols_hyprland-toplevel-export-v1-protocol.c.o
[16/29] Compiling C object xdg-desktop-portal-hyprland.p/src_core_logger.c.o
[17/29] Compiling C object xdg-desktop-portal-hyprland.p/src_core_config.c.o
[18/29] Compiling C object xdg-desktop-portal-hyprland.p/src_core_request.c.o
[19/29] Compiling C object xdg-desktop-portal-hyprland.p/src_core_main.c.o
[20/29] Compiling C object xdg-desktop-portal-hyprland.p/src_core_session.c.o
[21/29] Compiling C object xdg-desktop-portal-hyprland.p/src_core_timespec_util.c.o
[22/29] Compiling C object xdg-desktop-portal-hyprland.p/src_core_timer.c.o
[23/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screenshot_screenshot.c.o
[24/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screencast_wlr_screencast.c.o
FAILED: xdg-desktop-portal-hyprland.p/src_screencast_wlr_screencast.c.o
gcc -Ixdg-desktop-portal-hyprland.p -I. -I.. -I../include -Iprotocols -I/nix/store/m5vjh9vkwv860fgjf3lp318sq91fas41-wayland-1.21.0-dev/include -I/nix/store/5i9hp7vf8f7cgynks2dfazca0kpzcvg1-systemd-252.1-dev/include -I/nix/store/xqcb7z6gwzvfawm9>
../src/screencast/wlr_screencast.c: In function 'vasprintf':
../src/screencast/wlr_screencast.c:645:49: error: missing binary operator before token "("
  645 | #if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy)
      |                                                 ^
[25/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screencast_screencast_common.c.o
[26/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screencast_screencast.c.o
[27/29] Compiling C object xdg-desktop-portal-hyprland.p/src_screencast_pipewire_screencast.c.o
ninja: build stopped: subcommand failed.
vaxerski commented 1 year ago

C compiler for the host machine: gcc (gcc 9.5.0 "gcc (GCC) 9.5.0")

try getting a newer gcc ver

fmoda3 commented 1 year ago

looks like this was something that was fixed in the nixpkgs version of hyprland by using a newer gcc (which defaults to 9 on aarch64 linux): https://github.com/NixOS/nixpkgs/commit/a9db54b790ad3f0631c618db02084bfb346d7661

I wonder if the flake in this repo should also override stdenv to gcc11Stdenv?

vaxerski commented 1 year ago

@fufexan

fufexan commented 1 year ago

Updated, should be fixed.