diff options
| author | Jens Rehsack <sno@netbsd.org> | 2018-08-28 16:29:02 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-08-28 09:37:49 -0700 |
| commit | 948a85f85fcfeaed3f05310de7069a105340dd0e (patch) | |
| tree | ac97b3930fcb1d8bf43b3f0a0c3bb5a9f5c0494f | |
| parent | 46aa68deaf5770d2254401f8dd55098e07ae81fa (diff) | |
| download | meta-openembedded-948a85f85fcfeaed3f05310de7069a105340dd0e.tar.gz | |
grpc: update from 1.8.5 -> 1.14.1
Update gRPC to 1.14.1 and fix cause for issues like
https://stackoverflow.com/questions/49975541/how-to-port-grpc-helloworldcpp-example-on-yocto
For release notes check https://github.com/grpc/grpc/releases
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch | 8 | ||||
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch | 61 | ||||
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch | 42 | ||||
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc_1.14.1.bb (renamed from meta-networking/recipes-devtools/grpc/grpc_1.8.5.bb) | 14 |
4 files changed, 46 insertions, 79 deletions
diff --git a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch index 5774e62eb1..a83d854072 100644 --- a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch +++ b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch | |||
| @@ -14,7 +14,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt | |||
| 14 | index f9cd630..9663934 100644 | 14 | index f9cd630..9663934 100644 |
| 15 | --- a/CMakeLists.txt | 15 | --- a/CMakeLists.txt |
| 16 | +++ b/CMakeLists.txt | 16 | +++ b/CMakeLists.txt |
| 17 | @@ -328,6 +328,13 @@ function(protobuf_generate_grpc_cpp) | 17 | @@ -170,6 +170,13 @@ function(protobuf_generate_grpc_cpp) |
| 18 | return() | 18 | return() |
| 19 | endif() | 19 | endif() |
| 20 | 20 | ||
| @@ -25,7 +25,7 @@ index f9cd630..9663934 100644 | |||
| 25 | + set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) | 25 | + set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) |
| 26 | + endif() | 26 | + endif() |
| 27 | + | 27 | + |
| 28 | set(_protobuf_include_path -I . -I ${PROTOBUF_WELLKNOWN_IMPORT_DIR}) | 28 | set(_protobuf_include_path -I . -I ${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}) |
| 29 | foreach(FIL ${ARGN}) | 29 | foreach(FIL ${ARGN}) |
| 30 | get_filename_component(ABS_FIL ${FIL} ABSOLUTE) | 30 | get_filename_component(ABS_FIL ${FIL} ABSOLUTE) |
| 31 | @@ -345,7 +352,7 @@ function(protobuf_generate_grpc_cpp) | 31 | @@ -345,7 +352,7 @@ function(protobuf_generate_grpc_cpp) |
| @@ -41,7 +41,7 @@ diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.templa | |||
| 41 | index 64daf04..a7e8629 100644 | 41 | index 64daf04..a7e8629 100644 |
| 42 | --- a/templates/CMakeLists.txt.template | 42 | --- a/templates/CMakeLists.txt.template |
| 43 | +++ b/templates/CMakeLists.txt.template | 43 | +++ b/templates/CMakeLists.txt.template |
| 44 | @@ -373,6 +373,13 @@ | 44 | @@ -209,6 +209,13 @@ |
| 45 | return() | 45 | return() |
| 46 | endif() | 46 | endif() |
| 47 | 47 | ||
| @@ -52,7 +52,7 @@ index 64daf04..a7e8629 100644 | |||
| 52 | + set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) | 52 | + set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>) |
| 53 | + endif() | 53 | + endif() |
| 54 | + | 54 | + |
| 55 | set(_protobuf_include_path -I . -I <%text>${PROTOBUF_WELLKNOWN_IMPORT_DIR}</%text>) | 55 | set(_protobuf_include_path -I . -I <%text>${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}</%text>) |
| 56 | foreach(FIL <%text>${ARGN}</%text>) | 56 | foreach(FIL <%text>${ARGN}</%text>) |
| 57 | get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE) | 57 | get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE) |
| 58 | @@ -390,7 +397,7 @@ | 58 | @@ -390,7 +397,7 @@ |
diff --git a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch index f8d965294a..459dc45a41 100644 --- a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch +++ b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 8e9bf962a45a82f1c2eb5858e29fa89a3a60b564 Mon Sep 17 00:00:00 2001 | 1 | From 2279e30be5796e9b185545543ea54fe68633cbdd Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexey Firago <alexey_firago@mentor.com> | 2 | From: Alexey Firago <alexey_firago@mentor.com> |
| 3 | Date: Mon, 30 Oct 2017 23:24:49 +0300 | 3 | Date: Mon, 30 Oct 2017 23:24:49 +0300 |
| 4 | Subject: [PATCH 1/4] CMakeLists.txt: Fix libraries installation for Linux | 4 | Subject: [PATCH] CMakeLists.txt: Fix libraries installation for Linux |
| 5 | 5 | ||
| 6 | * Set libs versions as in Makefile | 6 | * Set libs versions as in Makefile |
| 7 | 7 | ||
| @@ -9,21 +9,19 @@ Signed-off-by: Alexey Firago <alexey_firago@mentor.com> | |||
| 9 | 9 | ||
| 10 | %% original patch: 0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch | 10 | %% original patch: 0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch |
| 11 | --- | 11 | --- |
| 12 | CMakeLists.txt | 55 +++++++++++++++++++++++++++++++++++ | 12 | CMakeLists.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 13 | CMakeLists.txt => CMakeLists.txt.orig | 0 | 13 | 1 file changed, 59 insertions(+) |
| 14 | 2 files changed, 55 insertions(+) | ||
| 15 | copy CMakeLists.txt => CMakeLists.txt.orig (100%) | ||
| 16 | 14 | ||
| 17 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 15 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 18 | index b1a49df..13e64ac 100644 | 16 | index a59fd818e3..5066f44a32 100644 |
| 19 | --- a/CMakeLists.txt | 17 | --- a/CMakeLists.txt |
| 20 | +++ b/CMakeLists.txt | 18 | +++ b/CMakeLists.txt |
| 21 | @@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") | 19 | @@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") |
| 22 | set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") | 20 | set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") |
| 23 | project(${PACKAGE_NAME} C CXX) | 21 | project(${PACKAGE_NAME} C CXX) |
| 24 | 22 | ||
| 25 | +set (CORE_VERSION_MAJOR "4") | 23 | +set (CORE_VERSION_MAJOR "6") |
| 26 | +set (CORE_VERSION "4.0.0") | 24 | +set (CORE_VERSION "6.0.0") |
| 27 | + | 25 | + |
| 28 | +set (CPP_VERSION_MAJOR "1") | 26 | +set (CPP_VERSION_MAJOR "1") |
| 29 | +set (CPP_VERSION "${PACKAGE_VERSION}") | 27 | +set (CPP_VERSION "${PACKAGE_VERSION}") |
| @@ -31,10 +29,21 @@ index b1a49df..13e64ac 100644 | |||
| 31 | +set (CSHARP_VERSION_MAJOR "1") | 29 | +set (CSHARP_VERSION_MAJOR "1") |
| 32 | +set (CSHARP_VERSION "${PACKAGE_VERSION}") | 30 | +set (CSHARP_VERSION "${PACKAGE_VERSION}") |
| 33 | + | 31 | + |
| 34 | set(gRPC_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") | 32 | set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables") |
| 35 | set(gRPC_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") | 33 | set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries") |
| 36 | set(gRPC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") | 34 | set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers") |
| 37 | @@ -841,6 +850,10 @@ if(WIN32 AND MSVC) | 35 | @@ -702,6 +711,10 @@ if(WIN32 AND MSVC) |
| 36 | endif() | ||
| 37 | endif() | ||
| 38 | |||
| 39 | +if(_gRPC_PLATFORM_LINUX) | ||
| 40 | + set_property(TARGET address_sorting PROPERTY VERSION ${CORE_VERSION}) | ||
| 41 | + set_property(TARGET address_sorting PROPERTY SOVERSION ${CORE_VERSION_MAJOR}) | ||
| 42 | +endif() | ||
| 43 | |||
| 44 | target_include_directories(address_sorting | ||
| 45 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| 46 | @@ -825,6 +838,10 @@ if(WIN32 AND MSVC) | ||
| 38 | endif() | 47 | endif() |
| 39 | endif() | 48 | endif() |
| 40 | 49 | ||
| @@ -45,7 +54,7 @@ index b1a49df..13e64ac 100644 | |||
| 45 | 54 | ||
| 46 | target_include_directories(gpr | 55 | target_include_directories(gpr |
| 47 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 56 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 48 | @@ -1221,6 +1234,10 @@ if(WIN32 AND MSVC) | 57 | @@ -1259,6 +1276,10 @@ if(WIN32 AND MSVC) |
| 49 | endif() | 58 | endif() |
| 50 | endif() | 59 | endif() |
| 51 | 60 | ||
| @@ -56,7 +65,7 @@ index b1a49df..13e64ac 100644 | |||
| 56 | 65 | ||
| 57 | target_include_directories(grpc | 66 | target_include_directories(grpc |
| 58 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 67 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 59 | @@ -1535,6 +1552,10 @@ if(WIN32 AND MSVC) | 68 | @@ -1633,6 +1654,10 @@ if(WIN32 AND MSVC) |
| 60 | endif() | 69 | endif() |
| 61 | endif() | 70 | endif() |
| 62 | 71 | ||
| @@ -67,7 +76,7 @@ index b1a49df..13e64ac 100644 | |||
| 67 | 76 | ||
| 68 | target_include_directories(grpc_cronet | 77 | target_include_directories(grpc_cronet |
| 69 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 78 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 70 | @@ -2377,6 +2398,10 @@ if(WIN32 AND MSVC) | 79 | @@ -2575,6 +2600,10 @@ if(WIN32 AND MSVC) |
| 71 | endif() | 80 | endif() |
| 72 | endif() | 81 | endif() |
| 73 | 82 | ||
| @@ -78,7 +87,7 @@ index b1a49df..13e64ac 100644 | |||
| 78 | 87 | ||
| 79 | target_include_directories(grpc_unsecure | 88 | target_include_directories(grpc_unsecure |
| 80 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 89 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 81 | @@ -2592,6 +2617,10 @@ if(WIN32 AND MSVC) | 90 | @@ -2791,6 +2820,10 @@ if(WIN32 AND MSVC) |
| 82 | endif() | 91 | endif() |
| 83 | endif() | 92 | endif() |
| 84 | 93 | ||
| @@ -89,7 +98,7 @@ index b1a49df..13e64ac 100644 | |||
| 89 | 98 | ||
| 90 | target_include_directories(grpc++ | 99 | target_include_directories(grpc++ |
| 91 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 100 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 92 | @@ -3078,6 +3107,10 @@ if(WIN32 AND MSVC) | 101 | @@ -3357,6 +3390,10 @@ if(WIN32 AND MSVC) |
| 93 | endif() | 102 | endif() |
| 94 | endif() | 103 | endif() |
| 95 | 104 | ||
| @@ -100,7 +109,7 @@ index b1a49df..13e64ac 100644 | |||
| 100 | 109 | ||
| 101 | target_include_directories(grpc++_cronet | 110 | target_include_directories(grpc++_cronet |
| 102 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 111 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 103 | @@ -3282,6 +3315,11 @@ protobuf_generate_grpc_cpp( | 112 | @@ -3630,6 +3667,11 @@ protobuf_generate_grpc_cpp( |
| 104 | src/proto/grpc/status/status.proto | 113 | src/proto/grpc/status/status.proto |
| 105 | ) | 114 | ) |
| 106 | 115 | ||
| @@ -112,7 +121,7 @@ index b1a49df..13e64ac 100644 | |||
| 112 | target_include_directories(grpc++_error_details | 121 | target_include_directories(grpc++_error_details |
| 113 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 122 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 114 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | 123 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} |
| 115 | @@ -3408,6 +3446,11 @@ protobuf_generate_grpc_cpp( | 124 | @@ -3762,6 +3804,11 @@ protobuf_generate_grpc_cpp( |
| 116 | src/proto/grpc/reflection/v1alpha/reflection.proto | 125 | src/proto/grpc/reflection/v1alpha/reflection.proto |
| 117 | ) | 126 | ) |
| 118 | 127 | ||
| @@ -124,7 +133,7 @@ index b1a49df..13e64ac 100644 | |||
| 124 | target_include_directories(grpc++_reflection | 133 | target_include_directories(grpc++_reflection |
| 125 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 134 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 126 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | 135 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} |
| 127 | @@ -3827,6 +3870,10 @@ if(WIN32 AND MSVC) | 136 | @@ -4265,6 +4312,10 @@ if(WIN32 AND MSVC) |
| 128 | endif() | 137 | endif() |
| 129 | endif() | 138 | endif() |
| 130 | 139 | ||
| @@ -135,7 +144,7 @@ index b1a49df..13e64ac 100644 | |||
| 135 | 144 | ||
| 136 | target_include_directories(grpc++_unsecure | 145 | target_include_directories(grpc++_unsecure |
| 137 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 146 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 138 | @@ -4140,6 +4187,10 @@ if(WIN32 AND MSVC) | 147 | @@ -4649,6 +4700,10 @@ if(WIN32 AND MSVC) |
| 139 | endif() | 148 | endif() |
| 140 | endif() | 149 | endif() |
| 141 | 150 | ||
| @@ -146,7 +155,7 @@ index b1a49df..13e64ac 100644 | |||
| 146 | 155 | ||
| 147 | target_include_directories(grpc_plugin_support | 156 | target_include_directories(grpc_plugin_support |
| 148 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 157 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 149 | @@ -4649,6 +4700,10 @@ if(WIN32 AND MSVC) | 158 | @@ -5184,6 +5239,10 @@ if(WIN32 AND MSVC) |
| 150 | endif() | 159 | endif() |
| 151 | endif() | 160 | endif() |
| 152 | 161 | ||
| @@ -157,10 +166,6 @@ index b1a49df..13e64ac 100644 | |||
| 157 | 166 | ||
| 158 | target_include_directories(grpc_csharp_ext | 167 | target_include_directories(grpc_csharp_ext |
| 159 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 168 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 160 | diff --git a/CMakeLists.txt b/CMakeLists.txt.orig | ||
| 161 | similarity index 100% | ||
| 162 | copy from CMakeLists.txt | ||
| 163 | copy to CMakeLists.txt.orig | ||
| 164 | -- | 169 | -- |
| 165 | 2.16.1 | 170 | 2.17.1 |
| 166 | 171 | ||
diff --git a/meta-networking/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch b/meta-networking/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch deleted file mode 100644 index 8985022fad..0000000000 --- a/meta-networking/recipes-devtools/grpc/grpc/0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | From a498b56ba96948015f0f2784b2ab8296946716ee Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 1 Feb 2018 23:28:17 -0800 | ||
| 4 | Subject: [PATCH 4/4] CMakeLists.txt: Find c-ares in target sysroot alone | ||
| 5 | |||
| 6 | Current code lets it look into native sysroot as well | ||
| 7 | which is then preferred during cross compile and it adds | ||
| 8 | absolute path to libcares into linker flags | ||
| 9 | on heterogenous architectures linker complains and build | ||
| 10 | fails | ||
| 11 | |||
| 12 | | /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/grpc/1.8.5-r0/recipe-sysroot-native/usr/lib/lib | ||
| 13 | cares.so.2.2.0: file not recognized: File format not recognized | ||
| 14 | | collect2: error: ld returned 1 exit status | ||
| 15 | |||
| 16 | Upstream-Status: Pending | ||
| 17 | |||
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 19 | --- | ||
| 20 | CMakeLists.txt | 6 ++---- | ||
| 21 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 24 | index 1d7eef1..058423d 100644 | ||
| 25 | --- a/CMakeLists.txt | ||
| 26 | +++ b/CMakeLists.txt | ||
| 27 | @@ -153,10 +153,8 @@ if("${gRPC_CARES_PROVIDER}" STREQUAL "module") | ||
| 28 | set(gRPC_INSTALL FALSE) | ||
| 29 | endif() | ||
| 30 | elseif("${gRPC_CARES_PROVIDER}" STREQUAL "package") | ||
| 31 | - find_package(c-ares REQUIRED CONFIG) | ||
| 32 | - if(TARGET c-ares::cares) | ||
| 33 | - set(_gRPC_CARES_LIBRARIES c-ares::cares) | ||
| 34 | - endif() | ||
| 35 | + find_package(c-ares REQUIRED) | ||
| 36 | + set(_gRPC_CARES_LIBRARIES cares) | ||
| 37 | set(_gRPC_FIND_CARES "if(NOT c-ares_FOUND)\n find_package(c-ares CONFIG)\nendif()") | ||
| 38 | endif() | ||
| 39 | |||
| 40 | -- | ||
| 41 | 2.16.1 | ||
| 42 | |||
diff --git a/meta-networking/recipes-devtools/grpc/grpc_1.8.5.bb b/meta-networking/recipes-devtools/grpc/grpc_1.14.1.bb index 3e44f99c16..784e0d2b4b 100644 --- a/meta-networking/recipes-devtools/grpc/grpc_1.8.5.bb +++ b/meta-networking/recipes-devtools/grpc/grpc_1.14.1.bb | |||
| @@ -10,11 +10,10 @@ DEPENDS = "gflags c-ares protobuf protobuf-native protobuf-c protobuf-c-native o | |||
| 10 | DEPENDS_append_class-target = " gtest grpc-native " | 10 | DEPENDS_append_class-target = " gtest grpc-native " |
| 11 | 11 | ||
| 12 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
| 13 | SRCREV = "db68cb3652cc7697647e9934b5316d98a6ba04d1" | 13 | SRCREV = "d8020cb6daa87f1a3bb3b0c299bc081c4a3de1e8" |
| 14 | BRANCH = "v1.8.x" | 14 | BRANCH = "v1.14.x" |
| 15 | SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;branch=${BRANCH} \ | 15 | SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;branch=${BRANCH} \ |
| 16 | file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ | 16 | file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ |
| 17 | file://0004-CMakeLists.txt-Find-c-ares-in-target-sysroot-alone.patch \ | ||
| 18 | " | 17 | " |
| 19 | SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" | 18 | SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" |
| 20 | 19 | ||
| @@ -26,8 +25,13 @@ EXTRA_OECMAKE = " \ | |||
| 26 | -DgRPC_SSL_PROVIDER=package \ | 25 | -DgRPC_SSL_PROVIDER=package \ |
| 27 | -DgRPC_PROTOBUF_PROVIDER=package \ | 26 | -DgRPC_PROTOBUF_PROVIDER=package \ |
| 28 | -DgRPC_GFLAGS_PROVIDER=package \ | 27 | -DgRPC_GFLAGS_PROVIDER=package \ |
| 29 | -DgRPC_INSTALL=1 \ | 28 | -DgRPC_INSTALL=ON \ |
| 29 | -DCMAKE_CROSSCOMPILING=ON \ | ||
| 30 | -DBUILD_SHARED_LIBS=ON \ | 30 | -DBUILD_SHARED_LIBS=ON \ |
| 31 | " | 31 | " |
| 32 | 32 | ||
| 33 | BBCLASSEXTEND = "native" | 33 | BBCLASSEXTEND = "native nativesdk" |
| 34 | |||
| 35 | SYSROOT_DIRS_BLACKLIST_append_class-target = "${libdir}/cmake/grpc" | ||
| 36 | |||
| 37 | FILES_${PN}-dev += "${bindir}" | ||
