package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
From a1922eadfc87da3dd221ff631f94ddd4a8ee7049 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
|
|
|
|
Date: Tue, 25 May 2021 14:55:23 +0200
|
|
|
|
Subject: [PATCH] Add option to restrict building of (host-)grpc to
|
|
|
|
grpc_cpp_plugin only.
|
|
|
|
|
|
|
|
This avoids unnecessary dependencies on big packages like libabseil-cpp and
|
|
|
|
others.
|
|
|
|
|
|
|
|
Upstream-status: not accepted (see https://github.com/grpc/grpc/issues/25322)
|
|
|
|
|
|
|
|
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
|
2022-02-08 23:23:56 +01:00
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
2022-07-27 10:37:30 +02:00
|
|
|
|
|
|
|
Updated for 1.48.0:
|
|
|
|
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
---
|
|
|
|
CMakeLists.txt | 43 +++++++++++++++++++++++++++++++++++--------
|
|
|
|
1 file changed, 35 insertions(+), 8 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2022-07-27 10:37:30 +02:00
|
|
|
index d3963b074b..51cef83141 100644
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -49,12 +49,16 @@ option(gRPC_BUILD_TESTS "Build tests" OFF)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
option(gRPC_BUILD_CODEGEN "Build codegen" ON)
|
|
|
|
option(gRPC_BUILD_CSHARP_EXT "Build C# extensions" ON)
|
|
|
|
option(gRPC_BACKWARDS_COMPATIBILITY_MODE "Build libraries that are binary compatible across a larger number of OS and libc versions" OFF)
|
|
|
|
+option(gRPC_BUILD_PLUGIN_SUPPORT_ONLY "Build plugin support only" OFF)
|
|
|
|
|
|
|
|
set(gRPC_INSTALL_default ON)
|
|
|
|
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
|
|
# Disable gRPC_INSTALL by default if building as a submodule
|
|
|
|
set(gRPC_INSTALL_default OFF)
|
|
|
|
endif()
|
|
|
|
+if(gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
+ set(gRPC_INSTALL_default OFF)
|
|
|
|
+endif()
|
|
|
|
set(gRPC_INSTALL ${gRPC_INSTALL_default} CACHE BOOL
|
|
|
|
"Generate installation target")
|
|
|
|
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -555,6 +559,8 @@ add_custom_target(plugins
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
DEPENDS ${_gRPC_PLUGIN_LIST}
|
|
|
|
)
|
|
|
|
|
|
|
|
+if (NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
+
|
|
|
|
add_custom_target(tools_c
|
|
|
|
DEPENDS
|
2022-07-27 10:37:30 +02:00
|
|
|
)
|
|
|
|
@@ -567,6 +573,8 @@ add_custom_target(tools_cxx
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
add_custom_target(tools
|
|
|
|
DEPENDS tools_c tools_cxx)
|
|
|
|
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
+
|
2022-07-27 10:37:30 +02:00
|
|
|
protobuf_generate_grpc_cpp_with_import_path_correction(
|
|
|
|
src/proto/grpc/channelz/channelz.proto src/proto/grpc/channelz/channelz.proto
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
)
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -1228,6 +1236,7 @@ if(gRPC_BUILD_TESTS)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
DEPENDS buildtests_c buildtests_cxx)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if (NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
|
|
|
|
add_library(address_sorting
|
|
|
|
third_party/address_sorting/address_sorting.c
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -1280,6 +1289,8 @@ if(gRPC_INSTALL)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
+
|
|
|
|
if(gRPC_BUILD_TESTS)
|
|
|
|
|
2022-07-27 10:37:30 +02:00
|
|
|
add_library(end2end_tests
|
|
|
|
@@ -1451,6 +1462,8 @@ endforeach()
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
+
|
|
|
|
add_library(gpr
|
2022-07-27 10:37:30 +02:00
|
|
|
src/core/ext/upb-generated/google/protobuf/any.upb.c
|
|
|
|
src/core/ext/upb-generated/google/rpc/status.upb.c
|
|
|
|
@@ -2373,6 +2386,8 @@ if(gRPC_INSTALL)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
+
|
2022-07-27 10:37:30 +02:00
|
|
|
if(gRPC_BUILD_TESTS)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
2022-07-27 10:37:30 +02:00
|
|
|
add_library(grpc_test_util
|
|
|
|
@@ -2511,6 +2526,8 @@ endif()
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
+
|
|
|
|
add_library(grpc_unsecure
|
|
|
|
src/core/ext/filters/census/grpc_context.cc
|
2022-07-27 10:37:30 +02:00
|
|
|
src/core/ext/filters/channel_idle/channel_idle_filter.cc
|
|
|
|
@@ -2916,6 +2933,8 @@ if(gRPC_INSTALL)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
+
|
|
|
|
if(gRPC_BUILD_TESTS)
|
|
|
|
|
|
|
|
if(gRPC_BUILD_CODEGEN)
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -2987,6 +3006,8 @@ endif()
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
+
|
|
|
|
add_library(grpc++
|
2022-07-27 10:37:30 +02:00
|
|
|
src/core/ext/transport/binder/client/binder_connector.cc
|
|
|
|
src/core/ext/transport/binder/client/channel_create.cc
|
|
|
|
@@ -3463,6 +3484,7 @@ if(gRPC_INSTALL)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
|
|
|
|
if(gRPC_BUILD_CODEGEN)
|
|
|
|
add_library(grpc++_reflection
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -3705,6 +3727,8 @@ target_link_libraries(grpc++_test_util
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
+
|
|
|
|
add_library(grpc++_unsecure
|
|
|
|
src/cpp/client/channel_cc.cc
|
|
|
|
src/cpp/client/client_callback.cc
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -4023,6 +4047,7 @@ if(gRPC_INSTALL)
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
|
|
|
|
add_library(grpc_plugin_support
|
|
|
|
src/compiler/cpp_generator.cc
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -4082,7 +4107,7 @@ foreach(_hdr
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
|
|
-if(gRPC_INSTALL)
|
|
|
|
+if(gRPC_INSTALL OR gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
install(TARGETS grpc_plugin_support EXPORT gRPCTargets
|
|
|
|
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
|
2022-07-27 10:37:30 +02:00
|
|
|
BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
|
|
@@ -4166,6 +4191,8 @@ endif()
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
+
|
|
|
|
add_library(upb
|
2022-07-27 10:37:30 +02:00
|
|
|
third_party/upb/third_party/utf8_range/naive.c
|
|
|
|
third_party/upb/third_party/utf8_range/range2-neon.c
|
|
|
|
@@ -4256,6 +4283,8 @@ target_link_libraries(gen_hpack_tables
|
|
|
|
gpr
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
+
|
|
|
|
|
|
|
|
if(gRPC_BUILD_TESTS)
|
|
|
|
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -11228,7 +11257,7 @@ target_link_libraries(grpc_cli
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
endif()
|
|
|
|
-if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_CPP_PLUGIN)
|
|
|
|
+if(gRPC_BUILD_GRPC_CPP_PLUGIN)
|
|
|
|
|
|
|
|
add_executable(grpc_cpp_plugin
|
|
|
|
src/compiler/cpp_plugin.cc
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -11258,7 +11287,7 @@ target_link_libraries(grpc_cpp_plugin
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-if(gRPC_INSTALL)
|
|
|
|
+if(gRPC_INSTALL OR gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets
|
|
|
|
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
|
2022-07-27 10:37:30 +02:00
|
|
|
BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
|
|
@@ -19803,7 +19832,7 @@ endif()
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
+if (NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
|
|
|
|
if(gRPC_INSTALL)
|
|
|
|
install(EXPORT gRPCTargets
|
2022-07-27 10:37:30 +02:00
|
|
|
@@ -19900,3 +19929,5 @@ generate_pkgconfig(
|
|
|
|
"-lgrpc++_unsecure"
|
package/grpc: restrict host-grpc to the absolute minimum
Currently, grpc depends on the full host-grpc, which in turn depends on host
versions of many other libraries. One of these, host-libabseil-cpp, also
requires a host gcc 4.9 or larger, a dependency which is not met on CentOS
7.
But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from
host-grpc. And that binary does not depend on host-libabseil-cpp or other
libraries, only on host-protobuf.
Given the above, simplify the grpc/host-grpc situation.
- Add a patch to the (host-)grpc CMakeLists.txt file to add an option to
only build grpc_cpp_plugin.
- Update grpc.mk and Config.in to remove the unnecessary dependencies, and
change the host-grpc configure options to make cmake happy.
The advantages of these changes are:
- making grpc available to older hosts with gcc < 4.8, like CentOS 7
- significantly reducing the build time of host-grpc and its dependencies
The patch was proposed upstream but not accepted with below rationale.
Perhaps input from others can help in persuading upstream in a future
attempt.
'What you're doing sounds like quite a narrow use case. But we simply
cannot provide a cmake option for every possible scenario in the world.
Introducing a new cmake option isn't for free and requires careful
design and maintenance.'
Nevertheless, given the benefits in terms of build time and dependency
reduction, it makes sense to apply this patch in spite of the disadvantage
of a local non-upstreamed patch.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[Arnout: propagate removed dependency to collectd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-25 20:20:44 +02:00
|
|
|
""
|
|
|
|
"grpc++_unsecure.pc")
|
|
|
|
+
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|