Running FreeBSD 12.4 on an amd64 system, and attempting to compile Chromium. Compile fails with: FAILED: obj/third_party/wayland/wayland_cursor/os-compatibility.o ./../third_party/wayland/src/cursor/os-compatibility.c:127:7: warning: implicit declaration of function 'memfd_create' is invalid in C99 [-Wimplicit-function-declaration] fd = memfd_create("wayland-cursor", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ ../../third_party/wayland/src/cursor/os-compatibility.c:127:38: error: use of undeclared identifier 'MFD_CLOEXEC' fd = memfd_create("wayland-cursor", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ ../../third_party/wayland/src/cursor/os-compatibility.c:127:52: error: use of undeclared identifier 'MFD_ALLOW_SEALING' fd = memfd_create("wayland-cursor", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ ../../third_party/wayland/src/cursor/os-compatibility.c:135:13: error: use of undeclared identifier 'F_ADD_SEALS' fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); ^ ../../third_party/wayland/src/cursor/os-compatibility.c:135:26: error: use of undeclared identifier 'F_SEAL_SHRINK' fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); ^ ../../third_party/wayland/src/cursor/os-compatibility.c:135:42: error: use of undeclared identifier 'F_SEAL_SEAL' fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); ^ 1 warning and 5 errors generated. ninja: build stopped: subcommand failed. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/chromium *** Error code 1
Created attachment 240492 [details] patch reposting This is due to the use of the bundle libwayland. https://cgit.freebsd.org/ports/commit/www/chromium?id=230cf3bad636e34e916bcba192aa5934d8fc5211 I will post the patch I posted to the mailing list here as well.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=beba79ea0400605b719e3ac7961bab51533159d5 commit beba79ea0400605b719e3ac7961bab51533159d5 Author: Robert Nagy <rnagy@FreeBSD.org> AuthorDate: 2023-02-28 09:35:39 +0000 Commit: Robert Nagy <rnagy@FreeBSD.org> CommitDate: 2023-03-01 05:06:28 +0000 www/{chromium,ungoogled-chromium}: unbreak on FreeBSD < 13.0 support for memfd_create has been introduced in 13.0 so disable it on older releases PR: 269869 Reviewed by: rene (mentor) .../files/patch-third__party_wayland_include_config.h | 16 ++++++++++++++-- .../files/patch-third__party_wayland_include_config.h | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-)
(In reply to commit-hook from comment #2) After my several attempts at it, it seems that __FreeBSD_version is not defined in third_party/wayland/include/config.h. So, my patch includes <osreldate.h> (/usr/include/osreldate.h) near it. Also, it's a minor detail, but some versions of 13.0 are also affected, so it's __FreeBSD_version < 1300048 :)
(In reply to Tatsuki Makino from comment #3) One more thing. __FreeBSD__ < 13 or __FreeBSD__ >= 13 can be used there.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bf43457463908bd882fc20677eeae81de09506d7 commit bf43457463908bd882fc20677eeae81de09506d7 Author: Robert Nagy <rnagy@FreeBSD.org> AuthorDate: 2023-03-01 05:43:17 +0000 Commit: Robert Nagy <rnagy@FreeBSD.org> CommitDate: 2023-03-01 13:06:40 +0000 www/*chromium: add missing osreldate.h header tighten the version check PR: 269869 Approved by: rene (mentor) Submitted by: Tatsuki Makino <tatsuki_makino hotmail com> .../files/patch-third__party_wayland_include_config.h | 15 +++++++++------ .../files/patch-third__party_wayland_include_config.h | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-)
I can confirm the patch works. I've finished compiling chromium-110.0.5481.177 on FreeBSD 12.4. Cheers Jason Naughton
Any chance to get this patch backported to the 2023Q1 branch? It's not on there currently, and thus the chromium build is broken relative to this branch.
(In reply to Dave Hayes from comment #7) We still have a few more days of 12.3-RELEASE support left, so I hope that will be changed after that is ended... :)