[Bug 282166] devel/bazel5: fix build with clang 19
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Oct 2024 19:18:48 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282166
Bug ID: 282166
Summary: devel/bazel5: fix build with clang 19
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: vishwin@freebsd.org
Reporter: dim@FreeBSD.org
Flags: maintainer-feedback?(vishwin@freebsd.org)
Assignee: vishwin@freebsd.org
Clang 19 has become more strict about C23 extensions, which results in
errors building devel/bazel5:
external/upb/upb/upb.c:215:25: error: defining a type within
'__builtin_offsetof' is a C23 extension [-Werror,-Wc23-extensions]
215 | n = UPB_ALIGN_DOWN(n, UPB_ALIGN_OF(upb_arena));
| ^~~~~~~~~~~~~~~~~~~~~~~
external/upb/upb/port_def.inc:94:38: note: expanded from macro 'UPB_ALIGN_OF'
94 | #define UPB_ALIGN_OF(type) offsetof (struct { char c; type member; },
member)
| ^~~~~~
/usr/include/stddef.h:64:42: note: expanded from macro 'offsetof'
64 | #define offsetof(type, field) __offsetof(type, field)
| ^~~~
/usr/include/sys/cdefs.h:324:53: note: expanded from macro '__offsetof'
324 | #define __offsetof(type, field) __builtin_offsetof(type, field)
| ^~~~
external/upb/upb/port_def.inc:92:48: note: expanded from macro
'UPB_ALIGN_DOWN'
92 | #define UPB_ALIGN_DOWN(size, align) ((size) / (align) * (align))
| ^~~~~
To work around this, amend extra-patch-upb_bazel_build__defs.bzl to also
add -Wno-c23-extensions. Alternatively, the -Werror option could be
taken out.
--
You are receiving this mail because:
You are the assignee for the bug.