From patchwork Tue Jul 21 21:45:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1333366 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=HyAi6HBp; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BBBwb1n4Rz9sRN for ; Wed, 22 Jul 2020 07:45:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DE77A22782; Tue, 21 Jul 2020 21:45:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kkj9EMTAP2BI; Tue, 21 Jul 2020 21:45:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A359F204C2; Tue, 21 Jul 2020 21:45:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 45B9F1BF2CB for ; Tue, 21 Jul 2020 21:45:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4172088618 for ; Tue, 21 Jul 2020 21:45:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QhWDXYajnvht for ; Tue, 21 Jul 2020 21:45:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6AEB588615 for ; Tue, 21 Jul 2020 21:45:25 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id cv18so1932844pjb.1 for ; Tue, 21 Jul 2020 14:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cNDkPwCB6zADxmCizwUgiUujsmk70M47477I4B+eAN8=; b=HyAi6HBp5DAB/Rxt3dr7VPUbjKnWq2laCEV8SUGaXtdnGy60Q+Ubgyw8B/kMNuWZs7 CM0rXQ0LRXyZMAk/i/Ox/vVNQFZjau8LsgYKo3bzMB32ejhacTmjoQTqYdS98ed2udV1 3Isvtr849/IqUvPzJ4SmBD0tLqc0ezrWRp9YvW4DOjIOHHSS27Mktp1NwC2DwXfh1Vcn NSB9tXXNLQSgiQR/J+owTARXMV6HqjRXFjG0E2Fuqru1f3ZnxI9E+SGtylCcNbRLsbcv iyDcN7+/m121vsyGS+8TidFaRruX+JPrk+PMa2UQ5xIUf9htu4M8Tpk+F0lDc7clmjj2 TaAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cNDkPwCB6zADxmCizwUgiUujsmk70M47477I4B+eAN8=; b=DmWUEMH2TvP9SQrWyE5hFoZNpha/HsTRXfFMz9fel8OX1ylZQs1a0Y5DfyDwWZd6gL iSiR5fJHe2bfLHOVmHlUobY2b+zRYbg0EWRsiSGD21Eu7Rhgcv6scHqfQtNJBcrv3a9i F1wOi9w+nDyIVZzDbwZosFwrHghmwea3CIqMs2TImjAzqij2TKu4MyvJIzgZL8zfxTcB A3TeER1WyFwG696mP3onqnI6sqUfKCAONr8nVPocj/s79cILjqRoB0Ud/ujkBlsBXBPr qBTpYGtv7bGj4XUq1P/hcVd+p2JZPGtyo2V6G5Ujk57XDy+AkPKH2vC/NRGXfCH2jyn1 Spxg== X-Gm-Message-State: AOAM533y0zwlgP1ReoLrfY6K2oKqVbXFN3/NscFCe1NqsHiAxHjI1p1o dqh2AHFPkkq487UyQJDdRNViiQbbG6s= X-Google-Smtp-Source: ABdhPJyXScQb3dajnLjkvBizwPPP8psnAj3F+YKofGC3HpS5ijOom+U3TJ3hvQRaFlSK7Q0hDepXXQ== X-Received: by 2002:a17:90a:a68:: with SMTP id o95mr7523941pjo.64.1595367924651; Tue, 21 Jul 2020 14:45:24 -0700 (PDT) Received: from localhost.localdomain ([47.149.8.172]) by smtp.gmail.com with ESMTPSA id ga7sm4051517pjb.50.2020.07.21.14.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 14:45:23 -0700 (PDT) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Tue, 21 Jul 2020 14:45:21 -0700 Message-Id: <20200721214522.3719304-1-aduskett@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/2] package/libabseil-cpp new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Asaf Kahlon , Adam Duskett , Robert Rose Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett This package is a new dependency on grpc versions > 1.25.0 Tested with the following distributions: - Debian 9 - CentOS 7 - Fedora 32 Signed-off-by: Adam Duskett --- Changes v1 -> v2: - Add a dependency on BR2_TOOLCHAIN_USES_GLIBC - Replace the patch that force -fPIC in favor of set_property(TARGET ${_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) (Thomas) DEVELOPERS | 1 + package/Config.in | 1 + ...0001-force-position-independent-code.patch | 38 +++++++++++++++++++ package/libabseil-cpp/Config.in | 17 +++++++++ package/libabseil-cpp/libabseil-cpp.hash | 3 ++ package/libabseil-cpp/libabseil-cpp.mk | 24 ++++++++++++ 6 files changed, 84 insertions(+) create mode 100644 package/libabseil-cpp/0001-force-position-independent-code.patch create mode 100644 package/libabseil-cpp/Config.in create mode 100644 package/libabseil-cpp/libabseil-cpp.hash create mode 100644 package/libabseil-cpp/libabseil-cpp.mk diff --git a/DEVELOPERS b/DEVELOPERS index 043e8ce3f4..f30645aaa4 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -43,6 +43,7 @@ F: package/gstreamer1/gst1-vaapi/ F: package/imx-usb-loader/ F: package/janus-gateway/ F: package/json-for-modern-cpp/ +F: package/libabseil-cpp/ F: package/libcpprestsdk/ F: package/libcutl/ F: package/libodb/ diff --git a/package/Config.in b/package/Config.in index e6500123f6..03be2b0587 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1824,6 +1824,7 @@ menu "Other" source "package/gtest/Config.in" source "package/jemalloc/Config.in" source "package/lapack/Config.in" + source "package/libabseil-cpp/Config.in" source "package/libargtable2/Config.in" source "package/libatomic_ops/Config.in" source "package/libavl/Config.in" diff --git a/package/libabseil-cpp/0001-force-position-independent-code.patch b/package/libabseil-cpp/0001-force-position-independent-code.patch new file mode 100644 index 0000000000..997d75597e --- /dev/null +++ b/package/libabseil-cpp/0001-force-position-independent-code.patch @@ -0,0 +1,38 @@ +From d170b19e500d85381369e379771be8d7816bcc92 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Tue, 21 Jul 2020 13:08:50 -0700 +Subject: [PATCH] force position independent code + +Without this option, programs building for arm64 or x86-64 will fail when +attempting to link to the built libraries with the following (abbreviated) +error: + +"relocation against `.rodata' can not be used when making a shared object; +recompile with -fPIC." + +Because libabseil-cpp builds static libraries, it is better to set the +POSITION_INDEPENDENT_CODE to ON instead of forcing fPIC, as forcing fPIC may +cause relocation errors when shared libraries link against the built static +libraries. + +Signed-off-by: Adam Duskett +--- + CMake/AbseilHelpers.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake +index 86ff9eb..bdb7a89 100644 +--- a/CMake/AbseilHelpers.cmake ++++ b/CMake/AbseilHelpers.cmake +@@ -207,6 +207,8 @@ function(absl_cc_library) + set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD ${ABSL_CXX_STANDARD}) + set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) + ++ # Without this setting, other programs such as GRPC will fail when linking. ++ set_property(TARGET ${_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) + # When being installed, we lose the absl_ prefix. We want to put it back + # to have properly named lib files. This is a no-op when we are not being + # installed. +-- +2.26.2 + diff --git a/package/libabseil-cpp/Config.in b/package/libabseil-cpp/Config.in new file mode 100644 index 0000000000..c37506dde1 --- /dev/null +++ b/package/libabseil-cpp/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBABSEIL_CPP + bool "libabseil-cpp" + depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Abseil is an open-source collection of C++ library code + designed to augment the C++ standard library. The Abseil + library code is collected from Google's own C++ code base, has + been extensively tested and used in production, and is the + same code we depend on in our daily coding lives. + + https://github.com/abseil/abseil-cpp + +comment "grpc needs a glibc toolchain w/ C++, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libabseil-cpp/libabseil-cpp.hash b/package/libabseil-cpp/libabseil-cpp.hash new file mode 100644 index 0000000000..7f0b5fc394 --- /dev/null +++ b/package/libabseil-cpp/libabseil-cpp.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 728a813291bdec2aa46eab8356ace9f75ac2ed9dfe2df5ab603c4e6c09f1c353 libabseil-cpp-20200225.tar.gz +sha256 c79a7fea0e3cac04cd43f20e7b648e5a0ff8fa5344e644b0ee09ca1162b62747 LICENSE diff --git a/package/libabseil-cpp/libabseil-cpp.mk b/package/libabseil-cpp/libabseil-cpp.mk new file mode 100644 index 0000000000..92cbb0051d --- /dev/null +++ b/package/libabseil-cpp/libabseil-cpp.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libabseil-cpp +# +################################################################################ + +LIBABSEIL_CPP_VERSION = 20200225 +LIBABSEIL_CPP_SITE = $(call github,abseil,abseil-cpp,$(LIBABSEIL_CPP_VERSION)) +LIBABSEIL_CPP_LICENSE = Apache-2.0 +LIBABSEIL_CPP_LICENSE_FILES = LICENSE +LIBABSEIL_CPP_INSTALL_STAGING = YES + +LIBABSEIL_CPP_CONF_OPTS = \ + -DABSL_ENABLE_INSTALL=ON \ + -DABSL_USE_GOOGLETEST_HEAD=OFF \ + -DABSL_RUN_TESTS=OFF + +HOST_LIBABSEIL_CPP_CONF_OPTS = \ + -DABSL_ENABLE_INSTALL=ON \ + -DABSL_USE_GOOGLETEST_HEAD=OFF \ + -DABSL_RUN_TESTS=OFF + +$(eval $(cmake-package)) +$(eval $(host-cmake-package)) From patchwork Tue Jul 21 21:45:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1333367 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rej/CL+d; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BBBws2LpZz9sRN for ; Wed, 22 Jul 2020 07:45:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D8A77227D1; Tue, 21 Jul 2020 21:45:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EKZI94GQZXRL; Tue, 21 Jul 2020 21:45:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A365D2273B; Tue, 21 Jul 2020 21:45:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6D03A1BF2CB for ; Tue, 21 Jul 2020 21:45:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 65B2D86A3C for ; Tue, 21 Jul 2020 21:45:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gGzez5AuOKi6 for ; Tue, 21 Jul 2020 21:45:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A1A7D86A35 for ; Tue, 21 Jul 2020 21:45:26 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id gc15so1933930pjb.0 for ; Tue, 21 Jul 2020 14:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wXjBLvAYbzR2QwV/tpujIluYDsrDl6CUPqL+a2ocZ7o=; b=rej/CL+dOBRYQi7q4tuRgeLdKZXdsTQaOjCW4H3dTQovwIsp/4tQUIusbrvUOYBt1h Y9RDpCAAGokqGRMWnuJU0xCvreSJBZtRi6S/TZqfRdjpMiAY+t9Z+tbBnZLyH4yqfyHn CxcuDvMjeCmT0rXK99zq7FgOF8b3voMFePJfAia+/vsWJzbBI2A9o7ZN5S+We21CD5Yj 7xchCdTvLUpPzkg7AEQod7Gj8wnXaoJACyx6hoZCLeOfob+PPLVBH08syUmN6fMabRGP Rtciar5n96S8NjEirm6YIczb0dqXoCUPaHMpIbqmwhvLA66k+2MVYnOtk0Q7hafvHc6N 25xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wXjBLvAYbzR2QwV/tpujIluYDsrDl6CUPqL+a2ocZ7o=; b=cF2xoKkhY2Dka6g4rZyS1Ojfh6xb4Q1orAGd25HqGleIpBSq90YADbNG70vT8QeMq4 zXlZHuodrAjrDSDf6i1Y1GK1TJEC+r9bNQcyChww9Td1LGvXQu7JHeAUFL29LbzmHQdr Gp8DJwVs++NRGmnx6/a6+XHTPKfpcAur0gvZ4O5hqtS/cuSnT3BHZRPta2RDhYygE7Gx VBMoqNpc+7MWsro8byXopL7ARazIYGoc6BaERYGJ/t17cwDGS+XANGbXaU2qHbVdbNDo nJ9CcoUbKAS+msMyoSvOvEfWHfjJKjKogmsWKBicqGgcV40FjMRxHREpKgUXNdFN2sDz YlXg== X-Gm-Message-State: AOAM5322NI+wQAztjRdALTgOQ8PQd5lGYDeTGjcSF1XKYFiX6Ba6TX3T 3dY3bAKhtT+nzqYJVauJYGDPc2cA/6Q= X-Google-Smtp-Source: ABdhPJzdn0OdClbqTnLi6Ai5TjgJqu3w9sG2wNKrxODs0XpVQR6zwLStGEPRpFYaigVIq0IctQfWdQ== X-Received: by 2002:a17:902:e993:: with SMTP id f19mr24072782plb.305.1595367925694; Tue, 21 Jul 2020 14:45:25 -0700 (PDT) Received: from localhost.localdomain ([47.149.8.172]) by smtp.gmail.com with ESMTPSA id ga7sm4051517pjb.50.2020.07.21.14.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 14:45:25 -0700 (PDT) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Tue, 21 Jul 2020 14:45:22 -0700 Message-Id: <20200721214522.3719304-2-aduskett@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200721214522.3719304-1-aduskett@gmail.com> References: <20200721214522.3719304-1-aduskett@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 2/2] package/grpc: bump version to 1.30.2 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Asaf Kahlon , Adam Duskett , Robert Rose Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Other changes: - Add a dependency on libabseil-cpp - Update the patches to apply properly. - Add a dependency for BR2_TOOLCHAIN_USES_GLIBC. libabseil-cpp uses execinfo.h for stacktracing, which uclibc and musl do not provide by default. As such, a dependency on BR2_TOOLCHAIN_USES_GLIBC as been added to the grpc package and to the grpc option for collectd. Tested with the following distributions: - Debian 9 - CentOS 7 - Fedora 32 Signed-off-by: Adam Duskett --- Changes v1 -> v2: - Add a dependency on BR2_TOOLCHAIN_USES_GLIBC package/collectd/Config.in | 6 ++++-- .../0001-target-build-using-host-plugin.patch | 16 ++++++++-------- ...ct-the-availability-of-pthread_setname_.patch | 16 ++++++++-------- package/grpc/Config.in | 7 +++++-- package/grpc/grpc.hash | 4 ++-- package/grpc/grpc.mk | 11 +++++++---- 6 files changed, 34 insertions(+), 26 deletions(-) diff --git a/package/collectd/Config.in b/package/collectd/Config.in index 188be3c0fb..bff0694684 100644 --- a/package/collectd/Config.in +++ b/package/collectd/Config.in @@ -566,6 +566,7 @@ config BR2_PACKAGE_COLLECTD_GRAPHITE config BR2_PACKAGE_COLLECTD_GRPC bool "grpc" depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc + depends on BR2_TOOLCHAIN_USES_GLIBC # libabseil-cpp -> execinfo.h depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # grpc -> protobuf @@ -573,8 +574,9 @@ config BR2_PACKAGE_COLLECTD_GRPC help Send/receive values using the gRPC protocol. -comment "grpc needs a toolchain w/ C++, gcc >= 4.8" - depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC +comment "grpc needs a glibc toolchain w/ C++, gcc >= 4.8" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC || \ + !BR2_TOOLCHAIN_USES_GLIBC depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS diff --git a/package/grpc/0001-target-build-using-host-plugin.patch b/package/grpc/0001-target-build-using-host-plugin.patch index 2da657762f..ac2bf8cc38 100644 --- a/package/grpc/0001-target-build-using-host-plugin.patch +++ b/package/grpc/0001-target-build-using-host-plugin.patch @@ -17,12 +17,12 @@ Signed-off-by: Robert Rose 1 file changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc76cf5..7a22b08 100644 +index be695c2..45c2fcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -13420,6 +13420,18 @@ target_link_libraries(grpc_cli - endif (gRPC_BUILD_TESTS) - if (gRPC_BUILD_CODEGEN) +@@ -10844,6 +10844,18 @@ target_link_libraries(grpc_cli + endif() + if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_CPP_PLUGIN) +if (gRPC_NATIVE_CPP_PLUGIN) + @@ -39,14 +39,14 @@ index fc76cf5..7a22b08 100644 add_executable(grpc_cpp_plugin src/compiler/cpp_plugin.cc ) -@@ -13457,6 +13469,7 @@ if (gRPC_INSTALL) +@@ -10877,6 +10889,7 @@ if(gRPC_INSTALL) ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ) endif() +endif() - endif (gRPC_BUILD_CODEGEN) - if (gRPC_BUILD_CODEGEN) + endif() + if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_CSHARP_PLUGIN) -- -2.20.0.rc0.387.gc7a69e6b6c-goog +2.26.2 diff --git a/package/grpc/0002-Properly-detect-the-availability-of-pthread_setname_.patch b/package/grpc/0002-Properly-detect-the-availability-of-pthread_setname_.patch index 86586d850b..4b7253f7aa 100644 --- a/package/grpc/0002-Properly-detect-the-availability-of-pthread_setname_.patch +++ b/package/grpc/0002-Properly-detect-the-availability-of-pthread_setname_.patch @@ -17,12 +17,12 @@ Signed-off-by: Thomas Petazzoni 2 files changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 89e834b..c7bd2ad 100644 +index 45c2fcb..0b2be4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -97,6 +97,12 @@ endif() - - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) +@@ -177,6 +177,12 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") +include(CheckSymbolExists) +check_symbol_exists(pthread_setname_np pthread.h HAVE_PTHREAD_SETNAME_NP) @@ -30,14 +30,14 @@ index 89e834b..c7bd2ad 100644 + add_definitions(-DHAVE_PTHREAD_SETNAME_NP) +endif () + - if (MSVC) + if(MSVC) include(cmake/msvc_static_runtime.cmake) add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h -index 031c0c3..a29a9dc 100644 +index 4f213ff..55ecd9d 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h -@@ -181,7 +181,9 @@ +@@ -195,7 +195,9 @@ #endif /* _LP64 */ #ifdef __GLIBC__ #define GPR_POSIX_CRASH_HANDLER 1 @@ -48,5 +48,5 @@ index 031c0c3..a29a9dc 100644 #else /* musl libc */ #define GPR_MUSL_LIBC_COMPAT 1 -- -2.14.4 +2.26.2 diff --git a/package/grpc/Config.in b/package/grpc/Config.in index 43f446d8dc..5d24d6745f 100644 --- a/package/grpc/Config.in +++ b/package/grpc/Config.in @@ -2,11 +2,13 @@ config BR2_PACKAGE_GRPC bool "grpc" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf + depends on BR2_TOOLCHAIN_USES_GLIBC # libabseil-cpp -> execinfo.h depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf depends on !BR2_STATIC_LIBS # protobuf depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC select BR2_PACKAGE_C_ARES + select BR2_PACKAGE_LIBABSEIL_CPP select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_PROTOBUF select BR2_PACKAGE_ZLIB @@ -16,8 +18,9 @@ config BR2_PACKAGE_GRPC http://github.com/grpc/grpc -comment "grpc needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.8" - depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC +comment "grpc needs a glibc toolchain w/ C++, threads, dynamic library, gcc >= 4.8" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC || \ + !BR2_TOOLCHAIN_USES_GLIBC depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS diff --git a/package/grpc/grpc.hash b/package/grpc/grpc.hash index 5201f72106..f0586e4b18 100644 --- a/package/grpc/grpc.hash +++ b/package/grpc/grpc.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 ffbe61269160ea745e487f79b0fd06b6edd3d50c6d9123f053b5634737cf2f69 grpc-1.25.0.tar.gz -sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE +sha256 ba74b97a2f1b4e22ec5fb69d639d849d2069fb58ea7d6579a31f800af6fe3b6c grpc-1.30.2.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/grpc/grpc.mk b/package/grpc/grpc.mk index 39f6123792..087deac0c6 100644 --- a/package/grpc/grpc.mk +++ b/package/grpc/grpc.mk @@ -4,7 +4,7 @@ # ################################################################################ -GRPC_VERSION = 1.25.0 +GRPC_VERSION = 1.30.2 GRPC_SITE = $(call github,grpc,grpc,v$(GRPC_VERSION)) GRPC_LICENSE = Apache-2.0 GRPC_LICENSE_FILES = LICENSE @@ -12,8 +12,9 @@ GRPC_LICENSE_FILES = LICENSE GRPC_INSTALL_STAGING = YES # Need to use host grpc_cpp_plugin during cross compilation. -GRPC_DEPENDENCIES = c-ares host-grpc openssl protobuf zlib -HOST_GRPC_DEPENDENCIES = host-c-ares host-openssl host-protobuf host-zlib +GRPC_DEPENDENCIES = c-ares host-grpc openssl protobuf zlib libabseil-cpp +HOST_GRPC_DEPENDENCIES = host-c-ares host-openssl host-protobuf host-zlib \ + host-libabseil-cpp # gRPC_CARES_PROVIDER=package won't work because it requires c-ares to have # installed a cmake config file, but buildroot uses c-ares' autotools build, @@ -25,6 +26,7 @@ GRPC_CONF_OPTS = \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package \ + -DgRPC_ABSL_PROVIDER=package \ -DgRPC_NATIVE_CPP_PLUGIN=$(HOST_DIR)/bin/grpc_cpp_plugin # grpc can use __atomic builtins, so we need to link with @@ -65,7 +67,8 @@ HOST_GRPC_CONF_OPTS = \ -DgRPC_CARES_PROVIDER=none \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ - -DgRPC_ZLIB_PROVIDER=package + -DgRPC_ZLIB_PROVIDER=package \ + -DgRPC_ABSL_PROVIDER=package $(eval $(cmake-package)) $(eval $(host-cmake-package))