bilelmoussaoui / ashpd

A Rust wrapper around XDG portals DBus interfaces
https://bilelmoussaoui.github.io/ashpd/ashpd/
MIT License
242 stars 46 forks source link

Consider making X11 integration optional #77

Closed linkmauve closed 2 years ago

linkmauve commented 2 years ago

I build GTK 4 without X11 support, as I exclusively use Wayland on my systems, and this prevents this crate from building, with the given error log:

The following warnings were emitted during compilation:                                                                                                                                           

warning: `"pkg-config" "--libs" "--cflags" "gtk4-x11" "gtk4-x11 >= 4.0.0"` did not exit successfully: exit status: 1                                                                              

error: failed to run custom build command for `gdk4-x11-sys v0.4.2`                                                                                                                               

Caused by:                                                                                                                                                                                        
  process didn't exit successfully: `/home/linkmauve/dev/rust/amberol/build/target/debug/build/gdk4-x11-sys-eae7525ab06d408a/build-script-build` (exit status: 1)                                 
  --- stdout                                                                                                                                                                                      
  cargo:rerun-if-env-changed=GTK4_X11_NO_PKG_CONFIG                                                                                                                                               
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu                                                                                                                                  
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu                                                                                                                                  
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG                                                                                                                                                      
  cargo:rerun-if-env-changed=PKG_CONFIG                                                                                                                                                           
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu                                                                                                                             
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu                                                                                                                             
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH                                                                                                                                                 
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH                                                                                                                                                      
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu                                                                                                                           
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu                                                                                                                           
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR                                                                                                                                               
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR                                                                                                                                                    
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu                                                                                                                      
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu                                                                                                                      
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR                                                                                                                                          
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR                                                                                                                                               
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gtk4-x11" "gtk4-x11 >= 4.0.0"` did not exit successfully: exit status: 1                                           
  error: could not find system library 'gtk4-x11' required by the 'gdk4-x11-sys' crate                                                                                                            

  --- stderr                                                                                                                                                                                      
  Package gtk4-x11 was not found in the pkg-config search path.                                                                                                                                   
  Perhaps you should add the directory containing `gtk4-x11.pc'                                                                                                                                   
  to the PKG_CONFIG_PATH environment variable                                                                                                                                                     
  Package 'gtk4-x11', required by 'virtual:world', not found                                                                                                                                      
  Package 'gtk4-x11', required by 'virtual:world', not found                                                                                                                                      

warning: build failed, waiting for other jobs to finish...
bilelmoussaoui commented 2 years ago

Ah right, completely missed this use case. I will handle it in the upcoming release