Page MenuHomeFreeBSD

graphics/wayland: convert to USES=meson
Needs ReviewPublic

Authored by jbeich on Wed, Feb 12, 12:31 PM.

Details

Reviewers
greg_unrelenting.technology
pkubaj
Group Reviewers
x11
Summary

Other changes:

  • Drop autotools patches
  • Drop sys/param.h check as __FreeBSD__ is defined by compiler
  • Fix tests randomly failing to build (e.g., under qemu-user-static)
Test Plan

Builds fine on:

  • 11.3 aarch64
  • 11.3 amd64
  • 11.3 armv6
  • 11.3 i386
  • 12.0 amd64
  • 12.0 i386
  • 12.1 aarch64
  • 12.1 amd64
  • 12.1 armv6
  • 12.1 armv7
  • 12.1 i386
  • 13.0 amd64
  • 13.0 i386
  • Base GCC 4.2.1 (mimics powerpc*, mips*, riscv64)

Works fine on:

  • multimedia/libva-intel-driver
  • multimedia/mpv
  • www/firefox + MOZ_ENABLE_WAYLAND
  • x11-servers/xwayland-devel
  • x11-wm/cage
  • x11-wm/sway
  • x11/wl-clipboard

Diff Detail

Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29395
Build 27282: arc lint + arc unit

Event Timeline

jbeich created this revision.Wed, Feb 12, 12:31 PM
jbeich edited the test plan for this revision. (Show Details)
jbeich edited the test plan for this revision. (Show Details)Wed, Feb 12, 1:04 PM
jbeich edited the test plan for this revision. (Show Details)Wed, Feb 12, 2:00 PM
jbeich edited the test plan for this revision. (Show Details)Wed, Feb 12, 2:29 PM
jbeich edited the test plan for this revision. (Show Details)Wed, Feb 12, 3:07 PM
imp added a subscriber: imp.Wed, Feb 12, 11:05 PM

Thanks Jan. I like this direction.
There's two build errors that look easy to fix (or I'm misreading the logs). What are you plans there?

graphics/wayland/files/patch-tests_test-runner.c
104–105

You dropped this by mistake... stderr will still be red after this error message.

imp added inline comments.Wed, Feb 12, 11:07 PM
graphics/wayland/files/patch-tests_test-runner.c
59

To make this upstreamable, do we need proper ifdef conditions here?

imp added inline comments.Thu, Feb 13, 1:10 AM
graphics/wayland/files/patch-tests_test-runner.c
104–105

Or am I misreading the patch and this is a change in upstream...

jbeich marked 3 inline comments as done.Thu, Feb 13, 1:25 AM
In D23644#519258, @imp wrote:

There's two build errors that look easy to fix (or I'm misreading the logs). What are you plans there?

See https://gitlab.freedesktop.org/wayland/wayland/issues/144

graphics/wayland/files/patch-tests_test-runner.c
59

Unlikely. ptrace(2) on Linux has 4 arguments as well.

104–105

Misreading. Only context lines have changed. This port's fixes are not colored by Phabricator. If still unsure apply the diff then look at files/patch-tests_test-runner.c.

jbeich updated this revision to Diff 68236.Thu, Feb 13, 1:59 AM
  • Rebase
jbeich updated this revision to Diff 68238.Thu, Feb 13, 2:50 AM
  • Drop dependency('dl') as glibc doesn't ship pkg-config file while upstream already has cc.find_library('dl')

@pkubaj, @mikael, can you test build on powerpc64 and aarch64 on real hardware?
I'm trying to figure out if https://gitlab.freedesktop.org/wayland/wayland/issues/144 is due to qemu-user-static.

imp added a comment.Fri, Feb 14, 2:54 PM

@pkubaj, @mikael, can you test build on powerpc64 and aarch64 on real hardware?
I'm trying to figure out if https://gitlab.freedesktop.org/wayland/wayland/issues/144 is due to qemu-user-static.

I don't think we've had any timing related qemu-user-static issues that weren't legit races.

It builds fine on ppc64 elfv2, I will try on arm sunday

pkubaj accepted this revision.Fri, Feb 14, 3:50 PM

Tested on powerpc64 on 12.1-RELEASE and CURRENT (builds fine).

This revision is now accepted and ready to land.Fri, Feb 14, 3:50 PM
imp added a comment.Fri, Feb 14, 4:35 PM

I'll test this on my arm64 box... I'll also try hack things to put a 'sleep 30' into the generation of wayland-client-protocol.h to exaggerate the race.

imp added a comment.Fri, Feb 14, 8:59 PM

OK. I did the following:

--- src/scanner.c~      2020-02-11 16:46:03.000000000 -0700
+++ src/scanner.c       2020-02-14 12:33:53.197144000 -0700
@@ -1918,6 +1918,8 @@
                { 0,                   0,           NULL, 0 }
        };

+       sleep(30);
+
        while (1) {
                opt = getopt_long(argc, argv, "hvcs", options, NULL);

which will magnify all races, right?

I was able to build 10 times in a row with this on my arm64 box. It's weird that we're hitting a race with qemu-user-static invocations.

jbeich updated this revision to Diff 68346.Sat, Feb 15, 3:08 AM
jbeich edited the summary of this revision. (Show Details)
jbeich edited the test plan for this revision. (Show Details)
  • Fix tests randomly failing to build in qemu-user-static jails

Now it's ready to land.

This revision now requires review to proceed.Sat, Feb 15, 3:08 AM
manu added a subscriber: manu.Sat, Feb 15, 1:57 PM
manu added inline comments.
graphics/wayland/Makefile
31

Any reason to not remove it directly in the patch since we have one for meson.build ?

jbeich added inline comments.Sat, Feb 15, 3:51 PM
graphics/wayland/Makefile
31

In patches it'd be harder to notice the hackish nature. See D23696 instead.

Are the meson patches submitted upstream?

jbeich added a comment.EditedSat, Feb 15, 4:09 PM

@zeising, not until upstream gains FreeBSD support. Upstreaming appears to be stalled on API. For example, DragonFly, NetBSD, OpenBSD don't use epoll-shim.

I'm not involved in the effort, so have probbaly missed or misinterpreted something.