Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1
@ 2018-05-21  5:05 charles.hardin at storagecraft.com
  2018-05-21  5:05 ` [Buildroot] [PATCH 2/4] package/c-ares: enable the host variant for a c-ares install charles.hardin at storagecraft.com
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: charles.hardin at storagecraft.com @ 2018-05-21  5:05 UTC (permalink / raw)
  To: buildroot

From: Charles Hardin <charles.hardin@storagecraft.com>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>
---
 package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
 package/protobuf/protobuf.hash                     |  2 +-
 package/protobuf/protobuf.mk                       |  6 +++---
 3 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch

diff --git a/package/protobuf/0001-convert-mipsel-to-mips.patch b/package/protobuf/0001-convert-mipsel-to-mips.patch
new file mode 100644
index 0000000000..005d818d9d
--- /dev/null
+++ b/package/protobuf/0001-convert-mipsel-to-mips.patch
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h	2017-12-20 23:07:13.000000000 +0000
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h	2018-05-21 03:46:58.580000399 +0000
+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
diff --git a/package/protobuf/protobuf.hash b/package/protobuf/protobuf.hash
index fa02440a40..d86f9758f3 100644
--- a/package/protobuf/protobuf.hash
+++ b/package/protobuf/protobuf.hash
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
+sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk
index d2782ddcfd..6120d6030d 100644
--- a/package/protobuf/protobuf.mk
+++ b/package/protobuf/protobuf.mk
@@ -7,11 +7,11 @@
 # When bumping this package, make sure to also verify if the
 # python-protobuf package still works, as they share the same
 # version/site variables.
-PROTOBUF_VERSION = 3.4.1
-PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
-PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
+PROTOBUF_VERSION = v3.5.1
+PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))
 PROTOBUF_LICENSE = BSD-3-Clause
 PROTOBUF_LICENSE_FILES = LICENSE
+PROTOBUF_AUTORECONF = YES
 
 # N.B. Need to use host protoc during cross compilation.
 PROTOBUF_DEPENDENCIES = host-protobuf
-- 
2.15.1 (Apple Git-101)

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/4] package/c-ares: enable the host variant for a c-ares install
  2018-05-21  5:05 [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 charles.hardin at storagecraft.com
@ 2018-05-21  5:05 ` charles.hardin at storagecraft.com
  2018-05-21  5:05 ` [Buildroot] [PATCH 3/4] grpc: new package charles.hardin at storagecraft.com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: charles.hardin at storagecraft.com @ 2018-05-21  5:05 UTC (permalink / raw)
  To: buildroot

From: Charles Hardin <charles.hardin@storagecraft.com>

gRPC needs a c-ares library for the plugins to compile against,
and it isn't something that can be easily patched out. So,
allow c-ares to be compiled as a host tool.

Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>
---
 package/c-ares/c-ares.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/c-ares/c-ares.mk b/package/c-ares/c-ares.mk
index 67254244a1..76e9687b37 100644
--- a/package/c-ares/c-ares.mk
+++ b/package/c-ares/c-ares.mk
@@ -15,3 +15,4 @@ C_ARES_LICENSE = MIT
 C_ARES_LICENSE_FILES = ares_mkquery.c
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
2.15.1 (Apple Git-101)

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 3/4] grpc: new package
  2018-05-21  5:05 [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 charles.hardin at storagecraft.com
  2018-05-21  5:05 ` [Buildroot] [PATCH 2/4] package/c-ares: enable the host variant for a c-ares install charles.hardin at storagecraft.com
@ 2018-05-21  5:05 ` charles.hardin at storagecraft.com
  2018-05-21  7:58   ` Thomas Petazzoni
  2018-05-21  5:05 ` [Buildroot] [PATCH 4/4] package/collectd: allow the grpc plugin to be configured charles.hardin at storagecraft.com
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: charles.hardin at storagecraft.com @ 2018-05-21  5:05 UTC (permalink / raw)
  To: buildroot

From: Charles Hardin <charles.hardin@storagecraft.com>

add the gRPC package from Google's github repo. This is
currently just installing the C and C++ libraries on the
target installation for now. Some effort could be made
to add the python bindings as a subsequent patch.

This also adds a patch to specify the protoc to use since
that is provided by buildroot and not the host in addition
to overriding the ldconfig command since that doesn't apply
to the buildroot compile.

NOTE: Consider this a reference port for anyone that is
looking to get grpc into buildroot.

Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>
---
 package/Config.in                                  |  1 +
 .../grpc/0001-use-defined-env-in-makefile.patch    | 51 ++++++++++++
 package/grpc/Config.in                             | 19 +++++
 package/grpc/grpc.hash                             |  2 +
 package/grpc/grpc.mk                               | 90 ++++++++++++++++++++++
 5 files changed, 163 insertions(+)
 create mode 100644 package/grpc/0001-use-defined-env-in-makefile.patch
 create mode 100644 package/grpc/Config.in
 create mode 100644 package/grpc/grpc.hash
 create mode 100644 package/grpc/grpc.mk

diff --git a/package/Config.in b/package/Config.in
index ecee4938c9..f4b9a7d7cd 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1506,6 +1506,7 @@ menu "Other"
 	source "package/glibmm/Config.in"
 	source "package/glm/Config.in"
 	source "package/gmp/Config.in"
+	source "package/grpc/Config.in"
 	source "package/gsl/Config.in"
 	source "package/gtest/Config.in"
 	source "package/jemalloc/Config.in"
diff --git a/package/grpc/0001-use-defined-env-in-makefile.patch b/package/grpc/0001-use-defined-env-in-makefile.patch
new file mode 100644
index 0000000000..9f5998404c
--- /dev/null
+++ b/package/grpc/0001-use-defined-env-in-makefile.patch
@@ -0,0 +1,51 @@
+diff -Naur grpc-1.11.1.orig/Makefile grpc-1.11.1/Makefile
+--- grpc-1.11.1.orig/Makefile	2018-05-15 05:36:44.000000000 +0000
++++ grpc-1.11.1/Makefile	2018-05-20 22:38:03.835389463 +0000
+@@ -240,6 +240,7 @@
+ 
+ PROTOC ?= protoc
+ DTRACE ?= dtrace
++LDCONFIG ?= ldconfig
+ CONFIG ?= opt
+ # Doing X ?= Y is the same as:
+ # ifeq ($(origin X), undefined)
+@@ -524,9 +525,9 @@
+ 
+ PERFTOOLS_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/perftools.c -lprofiler $(LDFLAGS)
+ 
+-PROTOC_CHECK_CMD = which protoc > /dev/null
+-PROTOC_CHECK_VERSION_CMD = protoc --version | grep -q libprotoc.3
+-DTRACE_CHECK_CMD = which dtrace > /dev/null
++PROTOC_CHECK_CMD = which $(PROTOC) > /dev/null
++PROTOC_CHECK_VERSION_CMD = $(PROTOC) --version | grep -q libprotoc.3
++DTRACE_CHECK_CMD = which $(DTRACE) > /dev/null
+ SYSTEMTAP_HEADERS_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/systemtap.c $(LDFLAGS)
+ 
+ ifndef REQUIRE_CUSTOM_LIBRARIES_$(CONFIG)
+@@ -2914,7 +2915,7 @@
+ endif
+ ifneq ($(SYSTEM),MINGW32)
+ ifneq ($(SYSTEM),Darwin)
+-	$(Q) ldconfig || true
++	$(Q) $(LDCONFIG) || true
+ endif
+ endif
+ 
+@@ -2967,7 +2968,7 @@
+ endif
+ ifneq ($(SYSTEM),MINGW32)
+ ifneq ($(SYSTEM),Darwin)
+-	$(Q) ldconfig || true
++	$(Q) $(LDCONFIG) || true
+ endif
+ endif
+ 
+@@ -2984,7 +2985,7 @@
+ endif
+ ifneq ($(SYSTEM),MINGW32)
+ ifneq ($(SYSTEM),Darwin)
+-	$(Q) ldconfig || true
++	$(Q) $(LDCONFIG) || true
+ endif
+ endif
+ 
diff --git a/package/grpc/Config.in b/package/grpc/Config.in
new file mode 100644
index 0000000000..feb7fb2de7
--- /dev/null
+++ b/package/grpc/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_GRPC
+	bool "grpc"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_GFLAGS
+	select BR2_PACKAGE_GTEST
+	select BR2_PACKAGE_GTEST_GMOCK
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_PROTOBUF
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB
+	help
+	  gRPC is Google's protocol buffer based implementation of a
+	  remote procedure call protocol.
+
+	  http://www.grpc.io
+
+comment "grpc needs a toolchain w/ C++, threads"
+	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS)
diff --git a/package/grpc/grpc.hash b/package/grpc/grpc.hash
new file mode 100644
index 0000000000..9f8e6869a5
--- /dev/null
+++ b/package/grpc/grpc.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 0068a0b11795ac89ba8f5cc7332cd8cd2870a2ee0016126f014ce0bc3004e590  grpc-v1.11.1.tar.gz
diff --git a/package/grpc/grpc.mk b/package/grpc/grpc.mk
new file mode 100644
index 0000000000..9febf8ffa3
--- /dev/null
+++ b/package/grpc/grpc.mk
@@ -0,0 +1,90 @@
+################################################################################
+#
+# grpc
+#
+################################################################################
+
+GRPC_VERSION = v1.11.1
+GRPC_SITE = $(call github,grpc,grpc,$(GRPC_VERSION))
+GRPC_LICENSE = BSD-3-Clause
+GRPC_LICENSE_FILES = LICENSE
+
+# Need a host c-ares for plugins and host-protobuf during
+# the compilation
+GRPC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl
+GRPC_DEPENDENCIES += gflags gtest c-ares openssl protobuf zlib
+HOST_GRPC_DEPENDENCIES = host-c-ares host-protobuf host-openssl
+
+GRPC_INSTALL_STAGING = YES
+
+GRPC_CROSS_MAKE_OPTS_BASE = \
+	GRPC_CROSS_COMPILE="true" \
+	LDCONFIG=/bin/true \
+	HOST_CC="$(HOSTCC_NOCCACHE)" \
+	HOST_CXX="$(HOSTCXX_NOCCACHE)" \
+	HOST_LD="$(HOSTCC)" \
+	HOST_LDXX="$(HOSTCXX)" \
+	HOST_CPPFLAGS="$(HOST_CPPFLAGS) -I$(@D) -I$(@D)/include" \
+	HOST_CFLAGS="$(HOST_CFLAGS)" \
+	HOST_LDFLAGS="$(HOST_LDFLAGS)" \
+	CC="$(TARGET_CC)" \
+	CXX="$(TARGET_CXX)" \
+	LD="$(TARGET_CC)" \
+	LDXX="$(TARGET_CXX)" \
+	CFLAGS="$(TARGET_CFLAGS)" \
+	LDFLAGS="$(TARGET_LDFLAGS)" \
+	STRIP=/bin/true
+
+GRPC_MAKE_OPTS = \
+	$(GRPC_CROSS_MAKE_OPTS_BASE) \
+	PROTOC="$(HOST_DIR)/usr/bin/protoc"
+
+GRPC_INSTALL_TARGET_OPTS = \
+	$(GRPC_CROSS_MAKE_OPTS_BASE) \
+	prefix="$(TARGET_DIR)/usr"
+
+GRPC_INSTALL_STAGING_OPTS = \
+	$(GRPC_CROSS_MAKE_OPTS_BASE) \
+	prefix="$(STAGING_DIR)/usr"
+
+define GRPC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(GRPC_MAKE_OPTS) -C $(@D) \
+		static shared plugins
+endef
+
+define GRPC_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(GRPC_INSTALL_STAGING_OPTS) -C $(@D) \
+		install_c install_cxx
+endef
+
+define GRPC_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(GRPC_INSTALL_TARGET_OPTS) -C $(@D) \
+		install-shared_cxx
+endef
+
+HOST_GRPC_MAKE_OPTS = \
+	CC="$(HOSTCC)" \
+	CXX="$(HOSTCXX)" \
+	LD="$(HOSTCC)" \
+	LDXX="$(HOSTCXX)" \
+	CPPLAGS="$(HOST_CPPFLAGS)" \
+	CFLAGS="$(HOST_CFLAGS)" \
+	CXXLAGS="$(HOST_CXXFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
+	STRIP=/bin/true \
+	PROTOC="$(HOST_DIR)/usr/bin/protoc" \
+	prefix="$(HOST_DIR)/usr"
+
+
+define HOST_GRPC_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_GRPC_MAKE_OPTS) -C $(@D) \
+		static plugins
+endef
+
+define HOST_GRPC_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_GRPC_MAKE_OPTS) -C $(@D) \
+		install-plugins
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
2.15.1 (Apple Git-101)

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 4/4] package/collectd: allow the grpc plugin to be configured
  2018-05-21  5:05 [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 charles.hardin at storagecraft.com
  2018-05-21  5:05 ` [Buildroot] [PATCH 2/4] package/c-ares: enable the host variant for a c-ares install charles.hardin at storagecraft.com
  2018-05-21  5:05 ` [Buildroot] [PATCH 3/4] grpc: new package charles.hardin at storagecraft.com
@ 2018-05-21  5:05 ` charles.hardin at storagecraft.com
  2018-05-21  8:00   ` Thomas Petazzoni
  2018-05-21  5:35 ` [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 Baruch Siach
  2018-05-21  7:49 ` Thomas Petazzoni
  4 siblings, 1 reply; 12+ messages in thread
From: charles.hardin at storagecraft.com @ 2018-05-21  5:05 UTC (permalink / raw)
  To: buildroot

From: Charles Hardin <charles.hardin@storagecraft.com>

Allow collectd to use the gRPC package since that package
can now be compiled as part of buildroot. This plugin can
be used to push collectd datasets over the network to
other instances as needed.

Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>
---
 package/collectd/Config.in   | 6 ++++++
 package/collectd/collectd.mk | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/collectd/Config.in b/package/collectd/Config.in
index ccd3fbe13f..0848e3c343 100644
--- a/package/collectd/Config.in
+++ b/package/collectd/Config.in
@@ -248,6 +248,12 @@ config BR2_PACKAGE_COLLECTD_GPS
 	  Reports the number of sattelites seen by and precision
 	  of a GPS receiver.
 
+config BR2_PACKAGE_COLLECTD_GRPC
+	bool "grpc"
+	select BR2_PACKAGE_GRPC
+	help
+	  Add support for the gRPC plugin for network communication
+
 config BR2_PACKAGE_COLLECTD_HUGEPAGES
 	bool "hugepages"
 	help
diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk
index 6c987b2e36..00efee4a18 100644
--- a/package/collectd/collectd.mk
+++ b/package/collectd/collectd.mk
@@ -15,7 +15,7 @@ COLLECTD_LICENSE_FILES = COPYING
 # These require unmet dependencies, are fringe, pointless or deprecated
 COLLECTD_PLUGINS_DISABLE = \
 	amqp apple_sensors aquaero ascent barometer dbi dpdkstat email \
-	gmond grpc hddtemp intel_rdt ipmi java libvirt lpar lvm \
+	gmond hddtemp intel_rdt ipmi java libvirt lpar lvm \
 	madwifi mbmon mic multimeter netapp notify_desktop numa \
 	nut onewire oracle perl pf pinba powerdns python redis routeros \
 	rrdcached sigrok tape target_v5upgrade teamspeak2 ted \
@@ -73,6 +73,7 @@ COLLECTD_CONF_OPTS += \
 	$(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \
 	$(if $(BR2_PACKAGE_COLLECTD_GPS),--enable-gps,--disable-gps) \
 	$(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \
+	$(if $(BR2_PACKAGE_COLLECTD_GRPC),--enable-grpc,--disable-grpc) \
 	$(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \
 	$(if $(BR2_PACKAGE_COLLECTD_HUGEPAGES),--enable-hugepages,--disable-hugepages) \
 	$(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \
@@ -148,6 +149,7 @@ COLLECTD_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \
 	$(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \
 	$(if $(BR2_PACKAGE_COLLECTD_GPS),gpsd) \
+	$(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \
 	$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
 	$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
 	$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
-- 
2.15.1 (Apple Git-101)

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1
  2018-05-21  5:05 [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 charles.hardin at storagecraft.com
                   ` (2 preceding siblings ...)
  2018-05-21  5:05 ` [Buildroot] [PATCH 4/4] package/collectd: allow the grpc plugin to be configured charles.hardin at storagecraft.com
@ 2018-05-21  5:35 ` Baruch Siach
  2018-05-21  5:51   ` Charles Hardin
  2018-05-21  7:49 ` Thomas Petazzoni
  4 siblings, 1 reply; 12+ messages in thread
From: Baruch Siach @ 2018-05-21  5:35 UTC (permalink / raw)
  To: buildroot

Hi Charles,

On Sun, May 20, 2018 at 10:05:47PM -0700, charles.hardin at storagecraft.com wrote:
> From: Charles Hardin <charles.hardin@storagecraft.com>
> 
> Also, add a patch to compile for mips big endian
> in addition to mips little endian.
> 
> Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>
> ---
>  package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
>  package/protobuf/protobuf.hash                     |  2 +-
>  package/protobuf/protobuf.mk                       |  6 +++---
>  3 files changed, 16 insertions(+), 4 deletions(-)
>  create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch
> 
> diff --git a/package/protobuf/0001-convert-mipsel-to-mips.patch b/package/protobuf/0001-convert-mipsel-to-mips.patch
> new file mode 100644
> index 0000000000..005d818d9d
> --- /dev/null
> +++ b/package/protobuf/0001-convert-mipsel-to-mips.patch
> @@ -0,0 +1,12 @@
> +diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
> +--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h	2017-12-20 23:07:13.000000000 +0000
> ++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h	2018-05-21 03:46:58.580000399 +0000

Patched need a description and your sign-off.

What is the upstream status of this patch? Please indicate in the patch 
description.

> +@@ -56,7 +56,7 @@
> + #elif defined(__aarch64__)
> + #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> +-#elif defined(__MIPSEL__)
> ++#elif defined(__mips__)
> + #if defined(__LP64__)
> + #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> diff --git a/package/protobuf/protobuf.hash b/package/protobuf/protobuf.hash
> index fa02440a40..d86f9758f3 100644
> --- a/package/protobuf/protobuf.hash
> +++ b/package/protobuf/protobuf.hash
> @@ -1,2 +1,2 @@
>  # Locally calculated
> -sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
> +sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
> diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk
> index d2782ddcfd..6120d6030d 100644
> --- a/package/protobuf/protobuf.mk
> +++ b/package/protobuf/protobuf.mk
> @@ -7,11 +7,11 @@
>  # When bumping this package, make sure to also verify if the
>  # python-protobuf package still works, as they share the same
>  # version/site variables.
> -PROTOBUF_VERSION = 3.4.1
> -PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
> -PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
> +PROTOBUF_VERSION = v3.5.1
> +PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))

Why are you switching to git fetch? We prefer tarballs whenever upstream 
provides them which is the case here.

>  PROTOBUF_LICENSE = BSD-3-Clause
>  PROTOBUF_LICENSE_FILES = LICENSE
> +PROTOBUF_AUTORECONF = YES

Upstream tarball includes a pre-generated configure script, so this should not 
be needed.

>  # N.B. Need to use host protoc during cross compilation.
>  PROTOBUF_DEPENDENCIES = host-protobuf

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1
  2018-05-21  5:35 ` [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 Baruch Siach
@ 2018-05-21  5:51   ` Charles Hardin
  2018-05-21  6:02     ` Baruch Siach
  0 siblings, 1 reply; 12+ messages in thread
From: Charles Hardin @ 2018-05-21  5:51 UTC (permalink / raw)
  To: buildroot

Inline.

On May 20, 2018, at 10:35 PM, Baruch Siach <baruch at tkos.co.il<mailto:baruch@tkos.co.il>> wrote:

Hi Charles,

On Sun, May 20, 2018 at 10:05:47PM -0700, charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com> wrote:
From: Charles Hardin <charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com>>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

Signed-off-by: Charles Hardin <charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com>>
---
package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
package/protobuf/protobuf.hash                     |  2 +-
package/protobuf/protobuf.mk                       |  6 +++---
3 files changed, 16 insertions(+), 4 deletions(-)
create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch

diff --git a/package/protobuf/0001-convert-mipsel-to-mips.patch b/package/protobuf/0001-convert-mipsel-to-mips.patch
new file mode 100644
index 0000000000..005d818d9d
--- /dev/null
+++ b/package/protobuf/0001-convert-mipsel-to-mips.patch
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h 2017-12-20 23:07:13.000000000 +0000
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h 2018-05-21 03:46:58.580000399 +0000

Patched need a description and your sign-off.

What is the upstream status of this patch? Please indicate in the patch
description.

I just did this locally with no git - there is no upstream, it was just for a local build
against Cavium. So, it would be nice if people upstream actually did mips - but
they don?t...


+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
diff --git a/package/protobuf/protobuf.hash b/package/protobuf/protobuf.hash
index fa02440a40..d86f9758f3 100644
--- a/package/protobuf/protobuf.hash
+++ b/package/protobuf/protobuf.hash
@@ -1,2 +1,2 @@
# Locally calculated
-sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
+sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk
index d2782ddcfd..6120d6030d 100644
--- a/package/protobuf/protobuf.mk
+++ b/package/protobuf/protobuf.mk
@@ -7,11 +7,11 @@
# When bumping this package, make sure to also verify if the
# python-protobuf package still works, as they share the same
# version/site variables.
-PROTOBUF_VERSION = 3.4.1
-PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
-PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
+PROTOBUF_VERSION = v3.5.1
+PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))

Why are you switching to git fetch? We prefer tarballs whenever upstream
provides them which is the case here.


Because I was pulling a specific commit before there was a release? it happens...

PROTOBUF_LICENSE = BSD-3-Clause
PROTOBUF_LICENSE_FILES = LICENSE
+PROTOBUF_AUTORECONF = YES

Upstream tarball includes a pre-generated configure script, so this should not
be needed.


Switch to GitHub is a flip to build from source - so?. if this is a release tarsal, then this
isn?t needed.

# N.B. Need to use host protoc during cross compilation.
PROTOBUF_DEPENDENCIES = host-protobuf

baruch

--
    http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
  - baruch at tkos.co.il<mailto:baruch@tkos.co.il> - tel: +972.2.679.5364, http://www.tkos.co.il<http://www.tkos.co.il/> -
_______________________________________________
buildroot mailing list
buildroot at busybox.net<mailto:buildroot@busybox.net>
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180521/8eb7544f/attachment.html>

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1
  2018-05-21  5:51   ` Charles Hardin
@ 2018-05-21  6:02     ` Baruch Siach
  2018-05-21  6:13       ` Charles Hardin
  0 siblings, 1 reply; 12+ messages in thread
From: Baruch Siach @ 2018-05-21  6:02 UTC (permalink / raw)
  To: buildroot

Hi Charles,

Please teach your email client (Outlook?) to do proper quoting on the 
plaintext multipart alternative of your email. If you can avoid HTML email 
entirely that would be be best.

My comment is inline below.

On Mon, May 21, 2018 at 05:51:47AM +0000, Charles Hardin wrote:
> Inline.
> 
> On May 20, 2018, at 10:35 PM, Baruch Siach <baruch at tkos.co.il<mailto:baruch@tkos.co.il>> wrote:
> 
> Hi Charles,
> 
> On Sun, May 20, 2018 at 10:05:47PM -0700, charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com> wrote:
> From: Charles Hardin <charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com>>
> 
> Also, add a patch to compile for mips big endian
> in addition to mips little endian.
> 
> Signed-off-by: Charles Hardin <charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com>>
> ---
> package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
> package/protobuf/protobuf.hash                     |  2 +-
> package/protobuf/protobuf.mk                       |  6 +++---
> 3 files changed, 16 insertions(+), 4 deletions(-)
> create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch
> 
> diff --git a/package/protobuf/0001-convert-mipsel-to-mips.patch b/package/protobuf/0001-convert-mipsel-to-mips.patch
> new file mode 100644
> index 0000000000..005d818d9d
> --- /dev/null
> +++ b/package/protobuf/0001-convert-mipsel-to-mips.patch
> @@ -0,0 +1,12 @@
> +diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
> +--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h 2017-12-20 23:07:13.000000000 +0000
> ++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h 2018-05-21 03:46:58.580000399 +0000
> 
> Patched need a description and your sign-off.
> 
> What is the upstream status of this patch? Please indicate in the patch
> description.
> 
> I just did this locally with no git - there is no upstream, it was just for a local build
> against Cavium. So, it would be nice if people upstream actually did mips - but
> they don?t...

In upstream I meant the Protobuf project upstream which seems to be pretty 
much alive and active. Have you sent this patch upstream? If so, please add a 
link to your submission in the patch description.

baruch

> +@@ -56,7 +56,7 @@
> + #elif defined(__aarch64__)
> + #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> +-#elif defined(__MIPSEL__)
> ++#elif defined(__mips__)
> + #if defined(__LP64__)
> + #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> diff --git a/package/protobuf/protobuf.hash b/package/protobuf/protobuf.hash
> index fa02440a40..d86f9758f3 100644
> --- a/package/protobuf/protobuf.hash
> +++ b/package/protobuf/protobuf.hash
> @@ -1,2 +1,2 @@
> # Locally calculated
> -sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
> +sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
> diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk
> index d2782ddcfd..6120d6030d 100644
> --- a/package/protobuf/protobuf.mk
> +++ b/package/protobuf/protobuf.mk
> @@ -7,11 +7,11 @@
> # When bumping this package, make sure to also verify if the
> # python-protobuf package still works, as they share the same
> # version/site variables.
> -PROTOBUF_VERSION = 3.4.1
> -PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
> -PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
> +PROTOBUF_VERSION = v3.5.1
> +PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))
> 
> Why are you switching to git fetch? We prefer tarballs whenever upstream
> provides them which is the case here.
> 
> 
> Because I was pulling a specific commit before there was a release? it happens...
> 
> PROTOBUF_LICENSE = BSD-3-Clause
> PROTOBUF_LICENSE_FILES = LICENSE
> +PROTOBUF_AUTORECONF = YES
> 
> Upstream tarball includes a pre-generated configure script, so this should not
> be needed.
> 
> 
> Switch to GitHub is a flip to build from source - so?. if this is a release tarsal, then this
> isn?t needed.
> 
> # N.B. Need to use host protoc during cross compilation.
> PROTOBUF_DEPENDENCIES = host-protobuf
> 
> baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1
  2018-05-21  6:02     ` Baruch Siach
@ 2018-05-21  6:13       ` Charles Hardin
  0 siblings, 0 replies; 12+ messages in thread
From: Charles Hardin @ 2018-05-21  6:13 UTC (permalink / raw)
  To: buildroot

MSFT/Mimecast email filters in the cloud - not the client, it is very annoying. Have
not figured out a way to bypass yet. Corporate email policies are not always the
easiest thing to deal with.

> On May 20, 2018, at 11:02 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> 
> Hi Charles,
> 
> Please teach your email client (Outlook?) to do proper quoting on the 
> plaintext multipart alternative of your email. If you can avoid HTML email 
> entirely that would be be best.
> 
> My comment is inline below.
> 
> On Mon, May 21, 2018 at 05:51:47AM +0000, Charles Hardin wrote:
>> Inline.
>> 
>> On May 20, 2018, at 10:35 PM, Baruch Siach <baruch at tkos.co.il<mailto:baruch@tkos.co.il>> wrote:
>> 
>> Hi Charles,
>> 
>> On Sun, May 20, 2018 at 10:05:47PM -0700, charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com> wrote:
>> From: Charles Hardin <charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com>>
>> 
>> Also, add a patch to compile for mips big endian
>> in addition to mips little endian.
>> 
>> Signed-off-by: Charles Hardin <charles.hardin at storagecraft.com<mailto:charles.hardin@storagecraft.com>>
>> ---
>> package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
>> package/protobuf/protobuf.hash                     |  2 +-
>> package/protobuf/protobuf.mk                       |  6 +++---
>> 3 files changed, 16 insertions(+), 4 deletions(-)
>> create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch
>> 
>> diff --git a/package/protobuf/0001-convert-mipsel-to-mips.patch b/package/protobuf/0001-convert-mipsel-to-mips.patch
>> new file mode 100644
>> index 0000000000..005d818d9d
>> --- /dev/null
>> +++ b/package/protobuf/0001-convert-mipsel-to-mips.patch
>> @@ -0,0 +1,12 @@
>> +diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
>> +--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h 2017-12-20 23:07:13.000000000 +0000
>> ++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h 2018-05-21 03:46:58.580000399 +0000
>> 
>> Patched need a description and your sign-off.
>> 
>> What is the upstream status of this patch? Please indicate in the patch
>> description.
>> 
>> I just did this locally with no git - there is no upstream, it was just for a local build
>> against Cavium. So, it would be nice if people upstream actually did mips - but
>> they don?t...
> 
> In upstream I meant the Protobuf project upstream which seems to be pretty 
> much alive and active. Have you sent this patch upstream? If so, please add a 
> link to your submission in the patch description.
> 
> baruch
> 
>> +@@ -56,7 +56,7 @@
>> + #elif defined(__aarch64__)
>> + #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
>> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
>> +-#elif defined(__MIPSEL__)
>> ++#elif defined(__mips__)
>> + #if defined(__LP64__)
>> + #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
>> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
>> diff --git a/package/protobuf/protobuf.hash b/package/protobuf/protobuf.hash
>> index fa02440a40..d86f9758f3 100644
>> --- a/package/protobuf/protobuf.hash
>> +++ b/package/protobuf/protobuf.hash
>> @@ -1,2 +1,2 @@
>> # Locally calculated
>> -sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
>> +sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
>> diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk
>> index d2782ddcfd..6120d6030d 100644
>> --- a/package/protobuf/protobuf.mk
>> +++ b/package/protobuf/protobuf.mk
>> @@ -7,11 +7,11 @@
>> # When bumping this package, make sure to also verify if the
>> # python-protobuf package still works, as they share the same
>> # version/site variables.
>> -PROTOBUF_VERSION = 3.4.1
>> -PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
>> -PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
>> +PROTOBUF_VERSION = v3.5.1
>> +PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))
>> 
>> Why are you switching to git fetch? We prefer tarballs whenever upstream
>> provides them which is the case here.
>> 
>> 
>> Because I was pulling a specific commit before there was a release? it happens...
>> 
>> PROTOBUF_LICENSE = BSD-3-Clause
>> PROTOBUF_LICENSE_FILES = LICENSE
>> +PROTOBUF_AUTORECONF = YES
>> 
>> Upstream tarball includes a pre-generated configure script, so this should not
>> be needed.
>> 
>> 
>> Switch to GitHub is a flip to build from source - so?. if this is a release tarsal, then this
>> isn?t needed.
>> 
>> # N.B. Need to use host protoc during cross compilation.
>> PROTOBUF_DEPENDENCIES = host-protobuf
>> 
>> baruch
> 
> -- 
>     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1
  2018-05-21  5:05 [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 charles.hardin at storagecraft.com
                   ` (3 preceding siblings ...)
  2018-05-21  5:35 ` [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 Baruch Siach
@ 2018-05-21  7:49 ` Thomas Petazzoni
  4 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2018-05-21  7:49 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 20 May 2018 22:05:47 -0700, charles.hardin at storagecraft.com
wrote:
> From: Charles Hardin <charles.hardin@storagecraft.com>
> 
> Also, add a patch to compile for mips big endian
> in addition to mips little endian.
> 
> Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>

This bump is already in the next branch:
https://git.buildroot.org/buildroot/commit/?h=next&id=454aa2da5e79ec8627f1d66ac640ec7bb04025dc.

> diff --git a/package/protobuf/0001-convert-mipsel-to-mips.patch b/package/protobuf/0001-convert-mipsel-to-mips.patch
> new file mode 100644
> index 0000000000..005d818d9d
> --- /dev/null
> +++ b/package/protobuf/0001-convert-mipsel-to-mips.patch
> @@ -0,0 +1,12 @@
> +diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
> +--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h	2017-12-20 23:07:13.000000000 +0000
> ++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h	2018-05-21 03:46:58.580000399 +0000
> +@@ -56,7 +56,7 @@
> + #elif defined(__aarch64__)
> + #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> +-#elif defined(__MIPSEL__)
> ++#elif defined(__mips__)
> + #if defined(__LP64__)
> + #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
> + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1

All patches require a description and Signed-off-by. Since upstream
uses Git as its version control system, the patch should be generated
using "git format-patch".

>  # When bumping this package, make sure to also verify if the
>  # python-protobuf package still works, as they share the same
>  # version/site variables.

While doing the bump, you missed this comment. No a big deal since the
bump has already been done, but I thought I should point this out.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 3/4] grpc: new package
  2018-05-21  5:05 ` [Buildroot] [PATCH 3/4] grpc: new package charles.hardin at storagecraft.com
@ 2018-05-21  7:58   ` Thomas Petazzoni
  2018-05-21 16:12     ` Charles Hardin
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2018-05-21  7:58 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 20 May 2018 22:05:49 -0700, charles.hardin at storagecraft.com
wrote:
> From: Charles Hardin <charles.hardin@storagecraft.com>
> 
> add the gRPC package from Google's github repo. This is
> currently just installing the C and C++ libraries on the
> target installation for now. Some effort could be made
> to add the python bindings as a subsequent patch.
> 
> This also adds a patch to specify the protoc to use since
> that is provided by buildroot and not the host in addition
> to overriding the ldconfig command since that doesn't apply
> to the buildroot compile.
> 
> NOTE: Consider this a reference port for anyone that is
> looking to get grpc into buildroot.

I'm not sure what this paragraph means. Does it mean you don't consider
this patch to be appropriate for merging into Buildroot, and it's just
provided to help others who might have the same need ?

> diff --git a/package/grpc/0001-use-defined-env-in-makefile.patch b/package/grpc/0001-use-defined-env-in-makefile.patch
> new file mode 100644
> index 0000000000..9f5998404c
> --- /dev/null
> +++ b/package/grpc/0001-use-defined-env-in-makefile.patch

Please use "git format-patch" to generate this patch, and add a proper
description and Signed-off-by.

> diff --git a/package/grpc/Config.in b/package/grpc/Config.in
> new file mode 100644
> index 0000000000..feb7fb2de7
> --- /dev/null
> +++ b/package/grpc/Config.in
> @@ -0,0 +1,19 @@
> +config BR2_PACKAGE_GRPC
> +	bool "grpc"
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	select BR2_PACKAGE_GFLAGS
> +	select BR2_PACKAGE_GTEST
> +	select BR2_PACKAGE_GTEST_GMOCK
> +	select BR2_PACKAGE_C_ARES
> +	select BR2_PACKAGE_PROTOBUF
> +	select BR2_PACKAGE_OPENSSL
> +	select BR2_PACKAGE_ZLIB

Nit: alphabetic ordering of selects would be nice.

> diff --git a/package/grpc/grpc.mk b/package/grpc/grpc.mk
> new file mode 100644
> index 0000000000..9febf8ffa3
> --- /dev/null
> +++ b/package/grpc/grpc.mk
> @@ -0,0 +1,90 @@
> +################################################################################
> +#
> +# grpc
> +#
> +################################################################################
> +
> +GRPC_VERSION = v1.11.1
> +GRPC_SITE = $(call github,grpc,grpc,$(GRPC_VERSION))
> +GRPC_LICENSE = BSD-3-Clause
> +GRPC_LICENSE_FILES = LICENSE
> +
> +# Need a host c-ares for plugins and host-protobuf during
> +# the compilation
> +GRPC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl

You need all of those host dependencies to build the target grpc ?

> +GRPC_DEPENDENCIES += gflags gtest c-ares openssl protobuf zlib

You can use a single assignment instead:

GPRC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl \
	gflags gtest c-ares openssl protobuf zlib

> +GRPC_CROSS_MAKE_OPTS_BASE = \
> +	GRPC_CROSS_COMPILE="true" \
> +	LDCONFIG=/bin/true \
> +	HOST_CC="$(HOSTCC_NOCCACHE)" \
> +	HOST_CXX="$(HOSTCXX_NOCCACHE)" \

Why are you using the _NOCCACHE variant here ?

> +	HOST_LD="$(HOSTCC)" \
> +	HOST_LDXX="$(HOSTCXX)" \

And not here ?

> +define GRPC_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(GRPC_MAKE_OPTS) -C $(@D) \
> +		static shared plugins

You're unconditionally building some shared libraries it seems, this
most likely won't work in BR2_STATIC_LIBS configurations. Can you try
to make sure that your package builds fine with ./utils/test-pkg ?

> +HOST_GRPC_MAKE_OPTS = \
> +	CC="$(HOSTCC)" \
> +	CXX="$(HOSTCXX)" \
> +	LD="$(HOSTCC)" \
> +	LDXX="$(HOSTCXX)" \
> +	CPPLAGS="$(HOST_CPPFLAGS)" \
> +	CFLAGS="$(HOST_CFLAGS)" \
> +	CXXLAGS="$(HOST_CXXFLAGS)" \
> +	LDFLAGS="$(HOST_LDFLAGS)" \
> +	STRIP=/bin/true \
> +	PROTOC="$(HOST_DIR)/usr/bin/protoc" \
> +	prefix="$(HOST_DIR)/usr"

Prefix should be just $(HOST_DIR)

> +
> +

One too many empty line.

> +define HOST_GRPC_BUILD_CMDS
> +	$(HOST_MAKE_ENV) $(MAKE) $(HOST_GRPC_MAKE_OPTS) -C $(@D) \
> +		static plugins

Why are you not installing the shared version here ? We generally
prefer to use the shared version of libraries for host packages.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 4/4] package/collectd: allow the grpc plugin to be configured
  2018-05-21  5:05 ` [Buildroot] [PATCH 4/4] package/collectd: allow the grpc plugin to be configured charles.hardin at storagecraft.com
@ 2018-05-21  8:00   ` Thomas Petazzoni
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2018-05-21  8:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 20 May 2018 22:05:50 -0700, charles.hardin at storagecraft.com
wrote:
> From: Charles Hardin <charles.hardin@storagecraft.com>
> 
> Allow collectd to use the gRPC package since that package
> can now be compiled as part of buildroot. This plugin can
> be used to push collectd datasets over the network to
> other instances as needed.
> 
> Signed-off-by: Charles Hardin <charles.hardin@storagecraft.com>
> ---
>  package/collectd/Config.in   | 6 ++++++
>  package/collectd/collectd.mk | 4 +++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/collectd/Config.in b/package/collectd/Config.in
> index ccd3fbe13f..0848e3c343 100644
> --- a/package/collectd/Config.in
> +++ b/package/collectd/Config.in
> @@ -248,6 +248,12 @@ config BR2_PACKAGE_COLLECTD_GPS
>  	  Reports the number of sattelites seen by and precision
>  	  of a GPS receiver.
>  
> +config BR2_PACKAGE_COLLECTD_GRPC
> +	bool "grpc"
> +	select BR2_PACKAGE_GRPC

You need to propagate the dependencies of the gprc package here. For
example, collectd doesn't need C++ support, while gprc needs C++
support.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 3/4] grpc: new package
  2018-05-21  7:58   ` Thomas Petazzoni
@ 2018-05-21 16:12     ` Charles Hardin
  0 siblings, 0 replies; 12+ messages in thread
From: Charles Hardin @ 2018-05-21 16:12 UTC (permalink / raw)
  To: buildroot

Ok.

> On May 21, 2018, at 12:58 AM, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 
> Hello,
> 
> On Sun, 20 May 2018 22:05:49 -0700, charles.hardin at storagecraft.com
> wrote:
>> From: Charles Hardin <charles.hardin@storagecraft.com>
>> 
>> add the gRPC package from Google's github repo. This is
>> currently just installing the C and C++ libraries on the
>> target installation for now. Some effort could be made
>> to add the python bindings as a subsequent patch.
>> 
>> This also adds a patch to specify the protoc to use since
>> that is provided by buildroot and not the host in addition
>> to overriding the ldconfig command since that doesn't apply
>> to the buildroot compile.
>> 
>> NOTE: Consider this a reference port for anyone that is
>> looking to get grpc into buildroot.
> 
> I'm not sure what this paragraph means. Does it mean you don't consider
> this patch to be appropriate for merging into Buildroot, and it's just
> provided to help others who might have the same need ?
> 


There wasn?t an exisiting gRPC package that was up to date and this wasn?t
a ?full? python, go, all the bindings - that?s what the reference was for to just
get the C and C++, since that was all we needed for another application.

And since this wasn?t in buildroot - I make no assumption if it ?should? be in
buildroot.


>> diff --git a/package/grpc/0001-use-defined-env-in-makefile.patch b/package/grpc/0001-use-defined-env-in-makefile.patch
>> new file mode 100644
>> index 0000000000..9f5998404c
>> --- /dev/null
>> +++ b/package/grpc/0001-use-defined-env-in-makefile.patch
> 
> Please use "git format-patch" to generate this patch, and add a proper
> description and Signed-off-by.
> 

So, i normally have to patch off the tarball - I don?t patch from the upstream
git repos. Which means I just do the old style ?orig dir? and ?new dir? with a
diff -Naur. Do folks always checkout from github and do ?git patches? all
the time now? Seems like alot of overhead.

>> diff --git a/package/grpc/Config.in b/package/grpc/Config.in
>> new file mode 100644
>> index 0000000000..feb7fb2de7
>> --- /dev/null
>> +++ b/package/grpc/Config.in
>> @@ -0,0 +1,19 @@
>> +config BR2_PACKAGE_GRPC
>> +	bool "grpc"
>> +	depends on BR2_INSTALL_LIBSTDCPP
>> +	depends on BR2_TOOLCHAIN_HAS_THREADS
>> +	select BR2_PACKAGE_GFLAGS
>> +	select BR2_PACKAGE_GTEST
>> +	select BR2_PACKAGE_GTEST_GMOCK
>> +	select BR2_PACKAGE_C_ARES
>> +	select BR2_PACKAGE_PROTOBUF
>> +	select BR2_PACKAGE_OPENSSL
>> +	select BR2_PACKAGE_ZLIB
> 
> Nit: alphabetic ordering of selects would be nice.
> 
>> diff --git a/package/grpc/grpc.mk b/package/grpc/grpc.mk
>> new file mode 100644
>> index 0000000000..9febf8ffa3
>> --- /dev/null
>> +++ b/package/grpc/grpc.mk
>> @@ -0,0 +1,90 @@
>> +################################################################################
>> +#
>> +# grpc
>> +#
>> +################################################################################
>> +
>> +GRPC_VERSION = v1.11.1
>> +GRPC_SITE = $(call github,grpc,grpc,$(GRPC_VERSION))
>> +GRPC_LICENSE = BSD-3-Clause
>> +GRPC_LICENSE_FILES = LICENSE
>> +
>> +# Need a host c-ares for plugins and host-protobuf during
>> +# the compilation
>> +GRPC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl
> 
> You need all of those host dependencies to build the target grpc ?
> 

No, just the host-grpc, this list kind of got built during the debug cycle and
compiles.

>> +GRPC_DEPENDENCIES += gflags gtest c-ares openssl protobuf zlib
> 
> You can use a single assignment instead:
> 
> GPRC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl \
> 	gflags gtest c-ares openssl protobuf zlib
> 
>> +GRPC_CROSS_MAKE_OPTS_BASE = \
>> +	GRPC_CROSS_COMPILE="true" \
>> +	LDCONFIG=/bin/true \
>> +	HOST_CC="$(HOSTCC_NOCCACHE)" \
>> +	HOST_CXX="$(HOSTCXX_NOCCACHE)" \
> 
> Why are you using the _NOCCACHE variant here ?
> 

Just some debug - was shortening the command line to figure out some
errors during the compile.


>> +	HOST_LD="$(HOSTCC)" \
>> +	HOST_LDXX="$(HOSTCXX)" \
> 
> And not here ?
> 

Wasn?t debugging here.

>> +define GRPC_BUILD_CMDS
>> +	$(TARGET_MAKE_ENV) $(MAKE) $(GRPC_MAKE_OPTS) -C $(@D) \
>> +		static shared plugins
> 
> You're unconditionally building some shared libraries it seems, this
> most likely won't work in BR2_STATIC_LIBS configurations. Can you try
> to make sure that your package builds fine with ./utils/test-pkg ?
> 

Yeah - not, sure the gRPC makefile does this.

>> +HOST_GRPC_MAKE_OPTS = \
>> +	CC="$(HOSTCC)" \
>> +	CXX="$(HOSTCXX)" \
>> +	LD="$(HOSTCC)" \
>> +	LDXX="$(HOSTCXX)" \
>> +	CPPLAGS="$(HOST_CPPFLAGS)" \
>> +	CFLAGS="$(HOST_CFLAGS)" \
>> +	CXXLAGS="$(HOST_CXXFLAGS)" \
>> +	LDFLAGS="$(HOST_LDFLAGS)" \
>> +	STRIP=/bin/true \
>> +	PROTOC="$(HOST_DIR)/usr/bin/protoc" \
>> +	prefix="$(HOST_DIR)/usr"
> 
> Prefix should be just $(HOST_DIR)
> 
>> +
>> +
> 
> One too many empty line.
> 
>> +define HOST_GRPC_BUILD_CMDS
>> +	$(HOST_MAKE_ENV) $(MAKE) $(HOST_GRPC_MAKE_OPTS) -C $(@D) \
>> +		static plugins
> 
> Why are you not installing the shared version here ? We generally
> prefer to use the shared version of libraries for host packages.
> 
> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-05-21 16:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-21  5:05 [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 charles.hardin at storagecraft.com
2018-05-21  5:05 ` [Buildroot] [PATCH 2/4] package/c-ares: enable the host variant for a c-ares install charles.hardin at storagecraft.com
2018-05-21  5:05 ` [Buildroot] [PATCH 3/4] grpc: new package charles.hardin at storagecraft.com
2018-05-21  7:58   ` Thomas Petazzoni
2018-05-21 16:12     ` Charles Hardin
2018-05-21  5:05 ` [Buildroot] [PATCH 4/4] package/collectd: allow the grpc plugin to be configured charles.hardin at storagecraft.com
2018-05-21  8:00   ` Thomas Petazzoni
2018-05-21  5:35 ` [Buildroot] [PATCH 1/4] protobuf, python-protobuf: bump to v3.5.1 Baruch Siach
2018-05-21  5:51   ` Charles Hardin
2018-05-21  6:02     ` Baruch Siach
2018-05-21  6:13       ` Charles Hardin
2018-05-21  7:49 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox