hyprwm / xdg-desktop-portal-hyprland

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

Cannot build because source files not found #240

Closed janemba closed 4 months ago

janemba commented 4 months ago

Hello,

I have an issue building xdg-desktop-portal-hyprland, it seems that some source files cannot be found:

$ git clone --recursive https://github.com/hyprwm/xdg-desktop-portal-hyprland
$ cd xdg-desktop-portal-hyprland
$ cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build

-- The C compiler identification is GNU 14.1.0
-- The CXX compiler identification is GNU 14.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring XDPH in Release with CMake
-- Checking deps...
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE  
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib64/libxkbcommon.so (found suitable version "1.5.0", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for modules 'wayland-client;wayland-protocols;wayland-scanner;libpipewire-0.3;libspa-0.2;libdrm;gbm;hyprlang>=0.2.0'
--   Found wayland-client, version 1.22.0
--   Found wayland-protocols, version 1.34
--   Found wayland-scanner, version 1.22.0
--   Found libpipewire-0.3, version 1.0.4
--   Found libspa-0.2, version 0.2
--   Found libdrm, version 2.4.120
--   Found gbm, version 24.0.3
--   Found hyprlang, version 0.5.2
-- Checking for module 'sdbus-c++'
--   Found sdbus-c++, version 1.5.0
-- Checking for module 'hyprland-protocols'
--   Found hyprland-protocols, version 0.2
-- Found WaylandScanner at /usr/bin/wayland-scanner
-- Found wayland-protocols at //usr/share/wayland-protocols
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/xdg-desktop-portal-hyprland/build

All good for now. But while building:

$ cmake --build build

[  3%] Generating /tmp/xdg-desktop-portal-hyprland/protocols/wlr-screencopy-unstable-v1-protocol.h
[  6%] Generating /tmp/xdg-desktop-portal-hyprland/protocols/hyprland-global-shortcuts-v1-protocol.c
Could not open input file: No such file or directory
gmake[2]: *** [CMakeFiles/xdg-desktop-portal-hyprland.dir/build.make:94: /tmp/xdg-desktop-portal-hyprland/protocols/hyprland-global-shortcuts-v1-protocol.c] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/xdg-desktop-portal-hyprland.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

So well I don't know what's wrong but looking in protocols folder I got this:

$ ls protocols
meson.build  wlr-foreign-toplevel-management-unstable-v1.xml  wlr-screencopy-unstable-v1-protocol.h  wlr-screencopy-unstable-v1.xml

No *.c files. Did I miss a step ?

vaxerski commented 4 months ago

did you forget to git clone --recursive?

janemba commented 4 months ago

No no I didn't its in my first post. I tried multiple times by removing the folder and git clone --recursive again.

vaxerski commented 4 months ago
-- Checking for module 'hyprland-protocols'
--   Found hyprland-protocols, version 0.2

right, it finds a global h-p. Can you update it? The latest is 0.3.0

janemba commented 4 months ago

So I updated it and it works now. What an adventure.