hyprwm / xdg-desktop-portal-hyprland

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

fails to build with pipewire 1.1.82? #227

Closed solopasha closed 2 months ago

solopasha commented 3 months ago

fails with:

[ 91%] Building CXX object hyprland-share-picker/CMakeFiles/hyprland-share-picker.dir/elidedbutton.cpp.o
cd /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/redhat-linux-build/hyprland-share-picker && /usr/bin/g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/redhat-linux-build/hyprland-share-picker/hyprland-share-picker_autogen/include -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/. -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/protocols -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtGui -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -std=gnu++17 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -fpermissive -Wno-address-of-temporary -MD -MT hyprland-share-picker/CMakeFiles/hyprland-share-picker.dir/mainpicker.cpp.o -MF CMakeFiles/hyprland-share-picker.dir/mainpicker.cpp.o.d -o CMakeFiles/hyprland-share-picker.dir/mainpicker.cpp.o -c /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/mainpicker.cpp
cd /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/redhat-linux-build/hyprland-share-picker && /usr/bin/g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/redhat-linux-build/hyprland-share-picker/hyprland-share-picker_autogen/include -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/. -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/protocols -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtGui -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -std=gnu++17 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -fpermissive -Wno-address-of-temporary -MD -MT hyprland-share-picker/CMakeFiles/hyprland-share-picker.dir/elidedbutton.cpp.o -MF CMakeFiles/hyprland-share-picker.dir/elidedbutton.cpp.o.d -o CMakeFiles/hyprland-share-picker.dir/elidedbutton.cpp.o -c /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/elidedbutton.cpp
cd /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/redhat-linux-build/hyprland-share-picker && /usr/bin/g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/redhat-linux-build/hyprland-share-picker/hyprland-share-picker_autogen/include -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/. -I/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/protocols -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtGui -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -std=gnu++17 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -fpermissive -Wno-address-of-temporary -MD -MT hyprland-share-picker/CMakeFiles/hyprland-share-picker.dir/main.cpp.o -MF CMakeFiles/hyprland-share-picker.dir/main.cpp.o.d -o CMakeFiles/hyprland-share-picker.dir/main.cpp.o -c /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/main.cpp
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/ScreencopyShared.cpp:1:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/helpers/MiscFunctions.cpp: In function ‘std::string execAndGet(const char*)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/helpers/MiscFunctions.cpp:16:50: warning: ignoring attributes on template argument ‘int (*)(FILE*)’ [-Wignored-attributes]
   16 |     const std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
      |                                                  ^
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/Screencopy.hpp:6,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/Screencopy.cpp:1:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/../core/../portals/Screencopy.hpp:6,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/../core/PortalManager.hpp:8,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/Session.cpp:2:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/../core/../portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/../core/../portals/Screencopy.hpp:6,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/../core/PortalManager.hpp:8,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/GlobalShortcuts.cpp:2:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/../core/../portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/../core/../portals/Screencopy.hpp:6,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/../core/PortalManager.hpp:8,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/ToplevelManager.cpp:3:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/shared/../core/../portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/../core/../portals/Screencopy.hpp:6,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/../core/PortalManager.hpp:8,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/Screenshot.cpp:2:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/portals/../core/../portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/core/../portals/Screencopy.hpp:6,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/core/PortalManager.hpp:8,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/main.cpp:4:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/core/../portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
In file included from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/core/../portals/Screencopy.hpp:6,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/core/PortalManager.hpp:8,
                 from /builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/core/PortalManager.cpp:1:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/builddir/build/BUILD/xdg-desktop-portal-hyprland-1.3.2-build/xdg-desktop-portal-hyprland-1.3.2/src/core/../portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |             
vaxerski commented 3 months ago

compiles on my end.

vaxerski commented 3 months ago

what if you comment out L8-9 in ScreencopyShared.hpp?

solopasha commented 3 months ago

builds fine after doing so

JohnMH commented 2 months ago

Confirmed that fixes it. See attached patch. Not sure why this was done, so I'll keep this as a patch for the Gentoo (GURU) package for now.

pipewire_fix.patch

vaxerski commented 2 months ago

I'll remove the things then

Raff932 commented 2 months ago

I'll remove the things then

Oh, this works for me too. Thank you!