From nobody Tue Oct 12 19:06:56 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 22C6D12DB72A; Tue, 12 Oct 2021 19:06:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HTQBn02Tdz4WmZ; Tue, 12 Oct 2021 19:06:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D412519D9D; Tue, 12 Oct 2021 19:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19CJ6uLo020033; Tue, 12 Oct 2021 19:06:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19CJ6uum020032; Tue, 12 Oct 2021 19:06:56 GMT (envelope-from git) Date: Tue, 12 Oct 2021 19:06:56 GMT Message-Id: <202110121906.19CJ6uum020032@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: 8abf3fd74456 - main - devel/bazel: fix build on powerpc* List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8abf3fd74456a955857e83bb337184d62d27a90c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=8abf3fd74456a955857e83bb337184d62d27a90c commit 8abf3fd74456a955857e83bb337184d62d27a90c Author: Piotr Kubaj AuthorDate: 2021-10-12 18:37:02 +0000 Commit: Piotr Kubaj CommitDate: 2021-10-12 18:37:02 +0000 devel/bazel: fix build on powerpc* bazel uses a bundled abseil. To build on powerpc*, abseil requires a trivial patch. In file included from external/com_google_absl/absl/base/internal/unscaledcycleclock.cc:27: /usr/include/sys/sysctl.h:1185:25: error: unknown type name 'u_int' int sysctl(const int *, u_int, void *, size_t *, const void *, size_t); ^ external/com_google_absl/absl/base/internal/unscaledcycleclock.cc:91:10: error: unknown type name 'once_flag' static once_flag init_timebase_frequency_once; ^ external/com_google_absl/absl/base/internal/unscaledcycleclock.cc:93:18: error: no member named 'LowLevelCallOnce' in namespace 'absl::lts_2020_02_25::base_internal' base_internal::LowLevelCallOnce(&init_timebase_frequency_once, [&]() { ~~~~~~~~~~~~~~~^ PR: 259056 Approved by: ehlig@linta.de (maintainer) --- devel/bazel/Makefile | 5 +++++ .../extra-patch-absl_base_internal_unscaledcycleclock.cc | 14 ++++++++++++++ devel/bazel/files/extra-patch-bazel_grpc__deps.bzl | 10 ++++++++++ devel/bazel/files/patch-WORKSPACE | 14 ++++++++++++++ 4 files changed, 43 insertions(+) diff --git a/devel/bazel/Makefile b/devel/bazel/Makefile index 4c28f2a03c49..834f332f1f40 100644 --- a/devel/bazel/Makefile +++ b/devel/bazel/Makefile @@ -49,6 +49,11 @@ FINALRC= 2 EXTRA_PATCHES+= ${FILESDIR}/extra-i386_tools_cpp_BUILD.static.bsd .endif +pre-patch: + @${CP} ${FILESDIR}/extra-patch-absl_base_internal_unscaledcycleclock.cc \ + ${FILESDIR}/extra-patch-bazel_grpc__deps.bzl \ + ${WRKSRC}/third_party/grpc/ + # Have the location of the system-wide rc file reside ${ETCDIR}. # Also adapt the sample file to disable persistent java workers as they # do not work reliably on FreeBSD. diff --git a/devel/bazel/files/extra-patch-absl_base_internal_unscaledcycleclock.cc b/devel/bazel/files/extra-patch-absl_base_internal_unscaledcycleclock.cc new file mode 100644 index 000000000000..d13abc1bd9de --- /dev/null +++ b/devel/bazel/files/extra-patch-absl_base_internal_unscaledcycleclock.cc @@ -0,0 +1,14 @@ +--- absl/base/internal/unscaledcycleclock.cc.orig 2020-08-09 20:09:49 UTC ++++ absl/base/internal/unscaledcycleclock.cc +@@ -24,8 +24,10 @@ + #ifdef __GLIBC__ + #include + #elif defined(__FreeBSD__) +-#include ++#include "absl/base/call_once.h" + #include ++#include ++#include + #endif + #endif + diff --git a/devel/bazel/files/extra-patch-bazel_grpc__deps.bzl b/devel/bazel/files/extra-patch-bazel_grpc__deps.bzl new file mode 100644 index 000000000000..b3a648e5ff2c --- /dev/null +++ b/devel/bazel/files/extra-patch-bazel_grpc__deps.bzl @@ -0,0 +1,10 @@ +--- a/bazel/grpc_deps.bzl.orig 2021-10-11 15:54:07.083144000 +0200 ++++ b/bazel/grpc_deps.bzl 2021-10-11 16:02:48.722952000 +0200 +@@ -239,6 +239,7 @@ + if "com_google_absl" not in native.existing_rules(): + http_archive( + name = "com_google_absl", ++ patches = ["//third_party/grpc:extra-patch-absl_base_internal_unscaledcycleclock.cc"], + sha256 = "f368a8476f4e2e0eccf8a7318b98dafbe30b2600f4e3cf52636e5eb145aba06a", + strip_prefix = "abseil-cpp-df3ea785d8c30a9503321a3d35ee7d35808f190d", + urls = [ diff --git a/devel/bazel/files/patch-WORKSPACE b/devel/bazel/files/patch-WORKSPACE new file mode 100644 index 000000000000..314316c3579d --- /dev/null +++ b/devel/bazel/files/patch-WORKSPACE @@ -0,0 +1,14 @@ +--- WORKSPACE.orig 2021-10-11 09:54:26 UTC ++++ WORKSPACE +@@ -1232,7 +1232,10 @@ register_toolchains("//src/main/res:empty_rc_toolchain + http_archive( + name = "com_github_grpc_grpc", + patch_args = ["-p1"], +- patches = ["//third_party/grpc:grpc_1.33.1.patch"], ++ patches = [ ++ "//third_party/grpc:grpc_1.33.1.patch", ++ "//third_party/grpc:extra-patch-bazel_grpc__deps.bzl", ++ ], + sha256 = "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63", + strip_prefix = "grpc-1.33.1", + urls = [