Created attachment 897628 [details] emerge --info wlroots-18 upgraded to C23 leading to a build failure with clang due to dev-libs/wayland using a different code path with the newer C standard. https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/85875c47d9234c2ad61bf3af97fca133fe3ffa78 https://gitlab.freedesktop.org/wayland/wayland/-/blob/1.23.0/src/wayland-util.h?ref_type=tags#L51 Unmerged PR that addresses this in dev-libs/wayland: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/401 FAILED: libwlroots-0.18.so.p/render_wlr_renderer.c.o clang -Ilibwlroots-0.18.so.p -I. -I../wlroots-0.18.0 -Iinclude -I../wlroots-0.18.0/include -Iprotocol -Irender/gle s2/shaders -Irender/vulkan/shaders -Ibackend/drm -I/usr/lib64/libffi/include -I/usr/include/libdrm -I/usr/include/ pixman-1 -I/usr/include/elogind -flto=thin -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch - Wextra -std=c23 -D_POSIX_C_SOURCE=200809L -DWLR_USE_UNSTABLE -DWLR_LITTLE_ENDIAN=1 -DWLR_BIG_ENDIAN=0 -Wundef -Wmi ssing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wendif-labels -Wstrict- aliasing=2 -Woverflow -Wmissing-prototypes -Walloca -Wno-missing-braces -Wno-missing-field-initializers -Wno-unuse d-parameter -fmacro-prefix-map=../wlroots-0.18.0/= -O3 -pipe -march=znver3 -Werror=odr -Werror=strict-aliasing -fP IC -MD -MQ libwlroots-0.18.so.p/render_wlr_renderer.c.o -MF libwlroots-0.18.so.p/render_wlr_renderer.c.o.d -o libw lroots-0.18.so.p/render_wlr_renderer.c.o -c ../wlroots-0.18.0/render/wlr_renderer.c In file included from ../wlroots-0.18.0/render/wlr_renderer.c:6: In file included from ../wlroots-0.18.0/include/wlr/render/interface.h:13: /usr/include/wayland-server-core.h:680:41: error: 'deprecated' attribute cannot be applied to types 680 | int32_t stride, uint32_t format) WL_DEPRECATED; | ^ /usr/include/wayland-util.h:52:25: note: expanded from macro 'WL_DEPRECATED' 52 | #define WL_DEPRECATED [[deprecated]] | ^ In file included from ../wlroots-0.18.0/render/wlr_renderer.c:6: In file included from ../wlroots-0.18.0/include/wlr/render/interface.h:14: In file included from ../wlroots-0.18.0/include/wlr/render/wlr_renderer.h:14: In file included from ../wlroots-0.18.0/include/wlr/render/pass.h:15: In file included from ../wlroots-0.18.0/include/wlr/util/box.h:19: In file included from /usr/include/wayland-server-protocol.h:8:
Created attachment 897629 [details] gui-libs/wlroots-0.18.0 build.log (xz compressed)
I can confirm that building wlroots with gcc (per https://wiki.gentoo.org/wiki/Clang#GCC_fallback_environment) resolves this problem.
(In reply to wolfgang from comment #2) > I can confirm that building wlroots with gcc (per > https://wiki.gentoo.org/wiki/Clang#GCC_fallback_environment) resolves this > problem. Hardly resolves it. It mitigates it for the time being.
I would suggest anyone on the LLVM profile looking for a workaround use a package.env for =gui-libs/wlroots-0.18.0 to use CFLAGS=“${CFLAGS} -std=c17” as it’s safe to assume the next version bump will carry the upstream fix. Details on using package.env can be found here https://wiki.gentoo.org/wiki//etc/portage/package.env
The fix has been merged upstream now so we can backport it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdd989aff6fbe6b1137aa5a9228009a8aa4154dd commit bdd989aff6fbe6b1137aa5a9228009a8aa4154dd Author: Alfred Wingate <parona@protonmail.com> AuthorDate: 2024-07-14 20:04:55 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-08-22 14:48:42 +0000 dev-libs/wayland: fix revdep clang builds with C23 Closes: https://bugs.gentoo.org/936061 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/37554 Signed-off-by: Sam James <sam@gentoo.org> .../files/wayland-1.23.0-c23-clang-fix.patch | 146 +++++++++++++++++++++ dev-libs/wayland/wayland-1.23.0-r1.ebuild | 70 ++++++++++ 2 files changed, 216 insertions(+)