Page MenuHome

Build: add wayland to deps build
ClosedPublic

Authored by Campbell Barton (campbellbarton) on Sep 27 2022, 1:24 AM.

Details

Summary

This is needed to ensure and up to date "wayland-scanner" is used,
as versions before 1.20.0 generate headers incompatible with
dynamic linking (WITH_GHOST_WAYLAND_DYNLOAD).

As the centos7 version of wayland is 1.15 so make this part of Blender's dependencies on Linux.

We intend to enable Wayland for Blender 3.4 release, this is needed for the build-bot.


Notes:

Diff Detail

Repository
rB Blender
Branch
TEMP-WAYLAND-BUILD-ENV (branched from master)
Build Status
Buildable 23950
Build 23950: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) requested review of this revision.Sep 27 2022, 1:24 AM
Campbell Barton (campbellbarton) created this revision.
build_files/build_environment/cmake/wayland.cmake
9

My wayland-scanner seems to have a dependency on system libexpat, not sure if we can rely on that being available on all systems used to build Blender.

We are building static libexpat as one of the libs, maybe there's a way to link against that.

build_files/cmake/platform/platform_unix.cmake
766–770

I'd change this to:

if(EXISTS "${LIBDIR}" AND EXIST "${LIBDIR}/wayland/bin/wayland-scanner")

Just to make it a bit more robust to bisecting or other switching between git revisions.

  • Add note that wayland can be removed when the buildbot upgrades it's wayland version.
  • Check the wayland-scanner binary exists before using (not just LIBDIR).
  • Link against our statically compiled libexpat.
This revision is now accepted and ready to land.Sep 27 2022, 5:56 AM

For context, there is an intent to enable Wayland for Blender 3.4, and this is required to make that work on the buildbot.

I can't download the sources from https://wayland.freedesktop.org/releases/wayland-1.21.0.tar.xz so this change breaks make deps for me. I have the correct URL, so I'll commit that to master.

This patch was already landed, without any update to its status or an explanation as to why it had to land so quickly without, apparently, proper testing. Why was that?

UPDATE: After fixing the download URL, I still can't build Wayland on CentOS7:

The Meson build system
Version: 0.55.1
Source dir: /home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/build/wayland/src/external_wayland
Build dir: /home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/build/wayland/src/external_wayland-build
Build type: native build

../external_wayland/meson.build:1:0: ERROR: Meson version is 0.55.1 but project requires >= 0.56.0

I'm now hacking the wayland meson.build file so that it declares an older version of meson to at least get it to start building. Now it complains that libffi, libxml-2.0, and dot cannot be found, so apparently there are new deps-build-time dependencies.

UPDATE: the dot dependency can be removed by passing -Ddocumentation=false.

The same kind of options can be used to avoid building the tests, or to even avoid installing the libraries. Since this patch is meant to only install wayland-scanner, we could pass -Dlibraries=false as well and avoid having libs we don't intend to use.

Sybren A. Stüvel (sybren) requested changes to this revision.Sep 27 2022, 1:58 PM
This revision now requires changes to proceed.Sep 27 2022, 1:58 PM

Disabled wayland as part of build deps rBf6664217b3214be869afb732d1d5bfc471a88e9a until issues can be sorted out.

I've committed a proper fix.

This revision is now accepted and ready to land.Sep 27 2022, 3:19 PM