Page MenuHome

Add wayland-protocols to distribution
ClosedPublic

Authored by Christian Rauch (christian.rauch) on Jul 6 2021, 12:28 PM.

Diff Detail

Repository
rB Blender
Branch
wl_protocols
Build Status
Buildable 15640
Build 15640: arc lint + arc unit

Event Timeline

Christian Rauch (christian.rauch) created this revision.
This revision is now accepted and ready to land.Jul 6 2021, 12:37 PM

@Sybren A. Stüvel (sybren) Can you check that these patches allow you to create a new linux_centos7_x86_64 with the wayland-protocols? If this works, I will merge this and we should be good to go for building Wayland on the buildbot.

Making myself a blocking reviewer, because I don't think it's ok to land this patch when it doesn't build on my CentOS7 VM.

I'm getting errors building the dependencies with this patch:

The Meson build system
Version: 0.55.1
Source dir: /home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/build/wayland-protocols/src/external_wayland_protocols
Build dir: /home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/build/wayland-protocols/src/external_wayland_protocols-build
Build type: native build
Using 'PKG_CONFIG_PATH' from environment with value: '/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: '/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig'
Project name: wayland-protocols
Project version: 1.21
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.27.1)
Found CMake: /usr/local/bin/cmake (3.17.5)
Build-time dependency wayland-scanner found: NO (tried pkgconfig and cmake)

../external_wayland_protocols/meson.build:11:0: ERROR: Dependency "wayland-scanner" not found, tried pkgconfig and cmake

A full log can be found at /home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/build/wayland-protocols/src/external_wayland_protocols-build/meson-logs/meson-log.txt
make[2]: *** [CMakeFiles/external_wayland_protocols.dir/build.make:130: build/wayland-protocols/src/external_wayland_protocols-stamp/external_wayland_protocols-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:222: CMakeFiles/external_wayland_protocols.dir/all] Error 2

From meson-log.txt:

Called `/usr/local/bin/cmake --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt .` in .../build_deps/deps/build/wayland-protocols/src/external_wayland_protocols-build/meson-private/cmake_wayland-scanner -> 0
  -- Module search paths:    ['/', '/opt', '/usr', '/usr/local']
  -- CMake root:             /usr/share/cmake3
  -- CMake architectures:    []
  -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share']
Preliminary CMake check failed. Aborting.
Build-time dependency wayland-scanner found: NO (tried pkgconfig and cmake)

On Ubuntu there is the wayland-scanner++ package, but on CentOS7 yum search wayland-scanner doesn't return anything.

This revision now requires review to proceed.Jul 6 2021, 3:32 PM

https://centos.pkgs.org/7/nux-dextop-x86_64/wayland-devel-1.5.0-4.el7.nux.x86_64.rpm.html seems indicate you need the wayland-devel package, but i don't have a centos vm currently to validate

Making myself a blocking reviewer, because I don't think it's ok to land this patch when it doesn't build on my CentOS7 VM.

On Ubuntu there is the wayland-scanner++ package, but on CentOS7 yum search wayland-scanner doesn't return anything.

Are you using the buildbot for this? wayland-scanner is in package wayland-devel (https://command-not-found.com/wayland-scanner). That package should be on the buildbot now.

Alternatively, the install_deps.sh and the wiki https://wiki.blender.org/wiki/Building_Blender/Linux/Fedora mention the Wayland packages that have to be installed:

sudo dnf install wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers

Tip: You can use "whatprovides" to find the package for a specific file (https://ostechnix.com/find-package-provides-specific-file-linux/). E.g. sudo yum whatprovides '*wayland-scanner' should show the package in which this file/exectuable is located.

Are you using the buildbot for this? wayland-scanner is in package wayland-devel (https://command-not-found.com/wayland-scanner). That package should be on the buildbot now.

I'm not using the buildbot for this, I have my own VM that I use to build the CentOS libraries.

Alternatively, the install_deps.sh and the wiki https://wiki.blender.org/wiki/Building_Blender/Linux/Fedora mention the Wayland packages that have to be installed:

install_deps.sh is meant for compiling against as many packages from the Linux distribution as possible, so it cannot be used for providing documentation about what needs to be installed to run make deps. No complaints here, just an observation.

sudo dnf install wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers

No idea why any OS would use "did not finish" as their package manager ;-)

Tip: You can use "whatprovides" to find the package for a specific file (https://ostechnix.com/find-package-provides-specific-file-linux/). E.g. sudo yum whatprovides '*wayland-scanner' should show the package in which this file/exectuable is located.

Thanks. I'm not quite at home on CentOS, more of an Ubuntu/Debian man myself.

Making the deps produces these files:

wayland-protocols/share/wayland-protocols/staging/xdg-activation/xdg-activation-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-output/xdg-output-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/input-method/input-method-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/text-input/text-input-unstable-v3.xml
wayland-protocols/share/wayland-protocols/unstable/text-input/text-input-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/tablet/tablet-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/tablet/tablet-unstable-v2.xml
wayland-protocols/share/wayland-protocols/unstable/input-timestamps/input-timestamps-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/primary-selection/primary-selection-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v6.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v5.xml
wayland-protocols/share/wayland-protocols/stable/presentation-time/presentation-time.xml
wayland-protocols/share/wayland-protocols/stable/viewporter/viewporter.xml
wayland-protocols/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml

I'll leave it to you to double-check that these are indeed the files you need/expect/want.

This revision is now accepted and ready to land.Jul 6 2021, 4:40 PM

Making the deps produces these files:

wayland-protocols/share/wayland-protocols/staging/xdg-activation/xdg-activation-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-output/xdg-output-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/input-method/input-method-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/text-input/text-input-unstable-v3.xml
wayland-protocols/share/wayland-protocols/unstable/text-input/text-input-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/tablet/tablet-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/tablet/tablet-unstable-v2.xml
wayland-protocols/share/wayland-protocols/unstable/input-timestamps/input-timestamps-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/primary-selection/primary-selection-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v6.xml
wayland-protocols/share/wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v5.xml
wayland-protocols/share/wayland-protocols/stable/presentation-time/presentation-time.xml
wayland-protocols/share/wayland-protocols/stable/viewporter/viewporter.xml
wayland-protocols/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml

I'll leave it to you to double-check that these are indeed the files you need/expect/want.

That looks correct. Adding the wayland-protocol deps should only add XML files to the linux_centos7_x86_64 svn. Let me know when these files were added.

Is there anything you expect from @James Monteath (jmonteath) as reviewer? If so, I'll wait for that. Otherwise either you or I can land the patch, and then I can commit the files to SVN.

Ray Molenkamp (LazyDodo) requested changes to this revision.Jul 6 2021, 5:14 PM
This revision now requires changes to proceed.Jul 6 2021, 5:14 PM
build_files/build_environment/cmake/wayland_protocols.cmake
20

Please use download.cmake (do not protect it with a platform ifdef there) for this rather than a direct download, cheat off any of the other deps for the proper URL here

Christian Rauch (christian.rauch) added inline comments.
build_files/build_environment/cmake/wayland_protocols.cmake
20

Done now via download_source(WL_PROTOCOLS).

This revision is now accepted and ready to land.Jul 6 2021, 7:26 PM

Is there anything you expect from @James Monteath (jmonteath) as reviewer? If so, I'll wait for that. Otherwise either you or I can land the patch, and then I can commit the files to SVN.

I did not intend to add @James Monteath (jmonteath) as he is not available anyway.

I went ahead and merged that. @Sybren A. Stüvel (sybren) You can now create linux_centos7_x86_64 from master.

Note: this patch no longer reflects what was reviewed / described in its description -- it's purely due to a quirk in Phabricator (it updated the patch contents to reflect the first commit referencing it). Use the history of this patch to see what was reviewed.