pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/59590: pkgsrc-2025Q2 devel/bazel fails to build on NetBSD/amd64 10.1
>Number: 59590
>Category: pkg
>Synopsis: pkgsrc-2025Q2 devel/bazel fails to build on NetBSD/amd64 10.1
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 12 06:05:00 +0000 2025
>Originator: Izumi Tsutsui
>Release: NetBSD 10.1 + pkgsrc-2025Q2
>Organization:
>Environment:
System: NetBSD optiplex 10.1
Architecture: x86_64
Machine: amd64
>Description:
pkgsrc-2025Q2 devel/bazel fails to build on NetBSD/amd64 10.1:
(escape sequence strings removed)
---
:
Compiling absl/base/internal/thread_identity.cc [for tool]; 0s local
Compiling src/main/cpp/util/strings.cc; 0s local ...
ERROR: /tmp/bazel_VudxYVKr/out/external/upb/BUILD:141:11: Compiling upb/mini_table.c [for tool] failed: (Exit 1): clang failed: error executing command (from target @upb//:mini_table)
(cd /tmp/bazel_VudxYVKr/out/execroot/io_bazel && \
exec env - \
PATH=/s/obj.x86_64/pkgsrc/devel/bazel/work.x86_64/.cwrapper/bin:/s/obj.x86_64/pkgsrc/devel/bazel/work.x86_64/.buildlink/bin:/s/obj.x86_64/pkgsrc/devel/bazel/work.x86_64/.gcc/bin:/s/obj.x86_64/pkgsrc/devel/bazel/work.x86_64/.tools/bin:/usr/pkg/java/openjdk11/bin:/usr/pkg/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/pkg/bin:/usr/X11R7/bin \
PWD=/proc/self/cwd \
/usr/pkg/bin/clang -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/netbsd-opt-exec-EDC14992/bin/external/upb/_objs/mini_table/mini_table.d '-frandom-seed=bazel-out/netbsd-opt-exec-EDC14992/bin/external/upb/_objs/mini_table/mini_table.o' '-DBAZEL_CURRENT_REPOSITORY="upb"' -iquote external/upb -iquote bazel-out/netbsd-opt-exec-EDC14992/bin/external/upb -g0 '-std=c99' -pedantic '-Werror=pedantic' -Wall -Wstrict-prototypes -Wno-gnu-offsetof-extensions -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/upb/upb/mini_table.c -o bazel-out/netbsd-opt-exec-EDC14992/bin/external/upb/_objs/mini_table/mini_table.o)
# Configuration: 5fae97a0d8aa8be108333bf30538a8337194997af3b6d142d238d7d4dea3c894
# Execution platform: //:default_host_platform
external/upb/upb/mini_table.c:634:14: error: defining a type within '__builtin_offsetof' is a C23 extension [-Werror,-Wc23-extensions]
634 | UPB_ASSERT(UPB_ALIGN_OF(upb_StringView) ==
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/upb/upb/port_def.inc:95:38: note: expanded from macro 'UPB_ALIGN_OF'
95 | #define UPB_ALIGN_OF(type) offsetof (struct { char c; type member; }, member)
| ^~~~~~
/usr/pkg/lib/clang/19/include/__stddef_offsetof.h:16:43: note: expanded from macro 'offsetof'
16 | #define offsetof(t, d) __builtin_offsetof(t, d)
| ^
external/upb/upb/port_def.inc:146:49: note: expanded from macro 'UPB_ASSERT'
146 | #define UPB_ASSERT(expr) do {} while (false && (expr))
| ^~~~
1 error generated.
[175 / 659] 11 actions, 8 running
Compiling src/compiler/python_generator.cc [for tool]; 7s local
Compiling upbc/protoc-gen-upb.cc [for tool]; 5s local
Compiling src/main/cpp/blaze_util_posix.cc; 3s local
JavacBootstrap .../buildjar/libstarlark-deps.jar [for tool]; 2s local
Compiling src/tools/singlejar/combiners.cc [for tool]; 0s local
Compiling absl/base/internal/thread_identity.cc [for tool]; 0s local
Compiling src/main/cpp/util/strings.cc; 0s local
@com_google_protobuf//:protoc_lib; 0s local ...
Target //src:bazel_nojdk failed to build
[186 / 659] checking cached actions
INFO: Elapsed time: 33.755s, Critical Path: 7.36s
[186 / 659] checking cached actions
INFO: processes: 46 internal, 140 local.
[186 / 659] checking cached actions
FAILED: Build did NOT complete successfully
ERROR: Could not build Bazel
*** Error code 1
Stop.
make[3]: stopped in /usr/pkgsrc/devel/bazel
*** Error code 1
Stop.
make[2]: stopped in /usr/pkgsrc/devel/bazel
*** Error code 1
Stop.
---
i.e.
>external/upb/upb/mini_table.c:634:14: error: defining a type within '__builtin_offsetof' is a C23 extension [-Werror,-Wc23-extensions]
is a problem.
>How-To-Repeat:
https://releng.netbsd.org/pkgreports/shadow/2025Q2/NetBSD-10.0-x86_64/20250805.0648/meta/report.html
https://releng.netbsd.org/pkgreports/shadow/2025Q2/NetBSD-10.0-x86_64/20250805.0648/bazel-6.4.0/build.log
>Fix:
It lookas adding '-Wno-c23-extensions' to
third_party/upb/upb-bazel-clang.patch in
distfiles/bazel-6.4.0-dist-netbsd.tar.gz works around:
---
$NetBSD: patch-third__party_upb_upb-bazel-clang.patch,v 1.1 2024/01/01 12:01:00 ryoon Exp $
--- third_party/upb/upb-bazel-clang.patch.orig 2025-08-11 22:58:31.114708971 +0000
+++ third_party/upb/upb-bazel-clang.patch
@@ -13,7 +13,7 @@
"-Werror=pedantic",
"-Wall",
"-Wstrict-prototypes",
-+ "-Wno-gnu-offsetof-extensions",
++ "-Wno-gnu-offsetof-extensions", "-Wno-c23-extensions"
# GCC (at least) emits spurious warnings for this that cannot be fixed
# without introducing redundant initialization (with runtime cost):
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
---
However I have no idea how it should be patched since bazel/Makefile claims:
>> do-patch:
>> # Do not perform patching. The tarball includes all patches.
while there are still many patch files in bazel/patches??
---
Home |
Main Index |
Thread Index |
Old Index