Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc: add v1.60.0 #21593

Closed
wants to merge 3 commits into from
Closed

grpc: add v1.60.0 #21593

wants to merge 3 commits into from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Dec 4, 2023

@conan-center-bot

This comment has been minimized.

@AndreyMlashkin
Copy link
Contributor

@valgur , could you reopen this one, please?

@conan-center-bot

This comment has been minimized.

@valgur
Copy link
Contributor Author

valgur commented Jan 17, 2024

@AndreyMlashkin It requires

The current protobuf version is not compatible.

@ghost ghost mentioned this pull request Jan 19, 2024
3 tasks
@NoneOfUrBusiness12
Copy link

I tried running this on a pi 3 (armv7 raspbian, gcc/g++ 10.2.1 and it failed to build

Command: conan create . 1.60.0@user/stable

Output:

[ 16%] Linking CXX executable test_package
/usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(rls.cc.o): in function grpc_core::(anonymous namespace)::RlsLb::RlsRequest::StartCallLocked()': rls.cc:(.text+0x2d64): undefined reference to upb_strtable_remove2'
/usr/bin/ld: rls.cc:(.text+0x2d7c): undefined reference to upb_strtable_insert' /usr/bin/ld: rls.cc:(.text+0x2df0): undefined reference to _upb_Map_New'
/usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(status_helper.cc.o): in function void absl::lts_20230802::functional_internal::InvokeObject<grpc_core::internal::StatusToProto(absl::lts_20230802::Status const&, upb_Arena*)::{lambda(absl::lts_20230802::string_view, absl::lts_20230802::Cord const&)#1}, void, absl::lts_20230802::string_view, absl::lts_20230802::Cord const&>(absl::lts_20230802::functional_internal::VoidPtr, absl::lts_20230802::functional_internal::ForwardT<absl::lts_20230802::string_view>::type, absl::lts_20230802::functional_internal::ForwardT<absl::lts_20230802::Cord const&>::type)': status_helper.cc:(.text+0x3b8): undefined reference to _upb_array_realloc'
/usr/bin/ld: status_helper.cc:(.text+0xaa4): undefined reference to _upb_Message_GetOrCreateExtension' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(backend_metric_filter.cc.o): in function grpc_core::BackendMetricFilter::MaybeSerializeBackendMetricsabi:cxx11 const':
backend_metric_filter.cc:(.text+0x32c): undefined reference to upb_strtable_remove2' /usr/bin/ld: backend_metric_filter.cc:(.text+0x354): undefined reference to upb_strtable_insert'
/usr/bin/ld: backend_metric_filter.cc:(.text+0x3bc): undefined reference to _upb_Map_New' /usr/bin/ld: backend_metric_filter.cc:(.text+0x510): undefined reference to upb_strtable_remove2'
/usr/bin/ld: backend_metric_filter.cc:(.text+0x538): undefined reference to upb_strtable_insert' /usr/bin/ld: backend_metric_filter.cc:(.text+0x5a0): undefined reference to _upb_Map_New'
/usr/bin/ld: backend_metric_filter.cc:(.text+0x610): undefined reference to upb_strtable_remove2' /usr/bin/ld: backend_metric_filter.cc:(.text+0x638): undefined reference to upb_strtable_insert'
/usr/bin/ld: backend_metric_filter.cc:(.text+0x698): undefined reference to _upb_Map_New' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(load_balancer_api.cc.o): in function grpc_core::GrpcLbLoadReportRequestCreate(long long, long long, long long, long long, absl::lts_20230802::InlinedVector<grpc_core::GrpcLbClientStats::DropTokenCount, 10u, std::allocator<grpc_core::GrpcLbClientStats::DropTokenCount> > const*, upb_Arena*)':
load_balancer_api.cc:(.text+0x504): undefined reference to _upb_array_realloc' /usr/bin/ld: load_balancer_api.cc:(.text+0x6cc): undefined reference to _upb_Message_GetOrCreateExtension'
/usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function _upb_Decoder_NewSubMessage.isra.0': decode.c:(.text+0x340): undefined reference to _kUpb_MiniTable_Empty'
/usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function _upb_Decoder_CheckEnumSlow.constprop.0': decode.c:(.text+0x43c): undefined reference to _upb_Message_AddUnknown'
/usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function _upb_Decoder_CreateMap': decode.c:(.text+0x5c4): undefined reference to _upb_Map_New'
/usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function _upb_Decoder_GetDelimitedOp': decode.c:(.text+0x6f4): undefined reference to _kUpb_MiniTable_Empty'
/usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function _upb_Decoder_IsDoneFallback': decode.c:(.text+0x734): undefined reference to _upb_Message_AddUnknown'
/usr/bin/ld: decode.c:(.text+0x7dc): undefined reference to _upb_Message_AddUnknown' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function _upb_Decoder_DecodeEnumPacked.isra.0':
decode.c:(.text+0x908): undefined reference to _upb_array_realloc' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function upb_Decoder_AddMessageSetItem':
decode.c:(.text+0xb3c): undefined reference to upb_ExtensionRegistry_Lookup' /usr/bin/ld: decode.c:(.text+0xb58): undefined reference to _upb_Message_GetOrCreateExtension'
/usr/bin/ld: decode.c:(.text+0xc34): undefined reference to _upb_Message_AddUnknown' /usr/bin/ld: decode.c:(.text+0xc50): undefined reference to _upb_Message_AddUnknown'
/usr/bin/ld: decode.c:(.text+0xc6c): undefined reference to _upb_Message_AddUnknown' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(decode.c.o): in function _upb_Decoder_DecodeMessage':
decode.c:(.text+0xfe8): undefined reference to upb_Message_GetUnknown' /usr/bin/ld: decode.c:(.text+0x108c): undefined reference to _upb_Message_AddUnknown'
/usr/bin/ld: decode.c:(.text+0x10a8): undefined reference to _upb_Message_AddUnknown' /usr/bin/ld: decode.c:(.text+0x11bc): undefined reference to _upb_Message_AddUnknown'
/usr/bin/ld: decode.c:(.text+0x146c): undefined reference to utf8_naive' /usr/bin/ld: decode.c:(.text+0x1660): undefined reference to utf8_naive'
/usr/bin/ld: decode.c:(.text+0x1888): undefined reference to upb_strtable_remove2' /usr/bin/ld: decode.c:(.text+0x18a4): undefined reference to upb_strtable_insert'
/usr/bin/ld: decode.c:(.text+0x18c4): undefined reference to upb_ExtensionRegistry_Lookup' /usr/bin/ld: decode.c:(.text+0x1974): undefined reference to _upb_Message_GetOrCreateExtension'
/usr/bin/ld: decode.c:(.text+0x1a6c): undefined reference to _upb_array_realloc' /usr/bin/ld: decode.c:(.text+0x1bac): undefined reference to _upb_array_realloc'
/usr/bin/ld: decode.c:(.text+0x1c98): undefined reference to _kUpb_MiniTable_Empty' /usr/bin/ld: decode.c:(.text+0x1cf0): undefined reference to upb_Message_GetUnknown'
/usr/bin/ld: decode.c:(.text+0x21c0): undefined reference to _upb_array_realloc' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(encode.c.o): in function encode_message':
encode.c:(.text+0x398): undefined reference to _upb_Message_Getexts' /usr/bin/ld: encode.c:(.text+0x408): undefined reference to upb_Message_GetUnknown'
/usr/bin/ld: encode.c:(.text+0x4b4): undefined reference to _upb_mapsorter_pushexts' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(encode.c.o): in function encode_scalar':
encode.c:(.text+0xb14): undefined reference to _kUpb_MiniTable_Empty' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(encode.c.o): in function encode_field':
encode.c:(.text+0xd90): undefined reference to upb_strtable_next2' /usr/bin/ld: encode.c:(.text+0xdd8): undefined reference to _upb_mapsorter_pushmap'
/usr/bin/ld: encode.c:(.text+0x1ae4): undefined reference to _kUpb_MiniTable_Empty' /usr/bin/ld: /home/pi/.conan/data/grpc/1.60.0/user/stable/package/f945f002697ae9b0978a088adfea6d3a42b456cc/lib/libgrpc_unsecure.a(backend_metric.cc.o): in function grpc_core::ParseBackendMetricData(absl::lts_20230802::string_view, grpc_core::BackendMetricAllocatorInterface*)':
backend_metric.cc:(.text+0x818): undefined reference to upb_strtable_next' /usr/bin/ld: backend_metric.cc:(.text+0x828): undefined reference to upb_strtable_done'
/usr/bin/ld: backend_metric.cc:(.text+0xa64): undefined reference to upb_strtable_next' /usr/bin/ld: backend_metric.cc:(.text+0xa74): undefined reference to upb_strtable_done'
/usr/bin/ld: backend_metric.cc:(.text+0xcac): undefined reference to upb_strtable_next' /usr/bin/ld: backend_metric.cc:(.text+0xcbc): undefined reference to upb_strtable_done'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/test_package.dir/build.make:256: test_package] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test_package.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
ERROR: grpc/1.60.0@user/stable (test package): Error in build() method, line 58
cmake.build()
ConanException: Error 2 while executing cmake --build "/home/pi/grpc/all/test_package/build/Release" '--' '-j4'

@grmcdorman
Copy link

There is now a security issue in the current Conan package version, CVS-2023-44487 (a DoS attack, CVSS score 7.5). This is fixed by 1.59.2 or later. This means this issue should be increased in priority.

@Nazardo
Copy link

Nazardo commented Mar 11, 2024

@Ahajha @valgur I have tested this with protobuf built with the recipe in PR #21622 (4.25.3), but as @NoneOfUrBusiness12 reported there are linking errors related to missing upb_* calls. It is not clear to me whether it is a gRPC issue or not.

@Ahajha
Copy link
Contributor

Ahajha commented Mar 11, 2024

there are linking errors related to missing upb_* calls.

I'll investigate later today, thanks for proactively checking.

@Ahajha
Copy link
Contributor

Ahajha commented Mar 12, 2024

Currently I believe the link error is a gRPC issue. My working theory is that either it or upb (micro protobuf implementation, vendored since I don't see any other package using it, though maybe that could be changed) switched from one large "upb" library to some smaller ones.

I'm not entirely sure why it's using that package though if we supply protobuf.

@amerry
Copy link
Contributor

amerry commented Mar 28, 2024

i fixed the upb link issues with this diff (NB: this diff is based on merging this recipe with the latest grpc recipe on master):

diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py
index 58c8b0e1e..ce7372cf6 100644
--- a/recipes/grpc/all/conanfile.py
+++ b/recipes/grpc/all/conanfile.py
@@ -405,6 +405,30 @@ class GrpcConan(ConanFile):
                 },
             })

+        if Version(self.version) >= "1.60":
+            components.update({
+                "upb_collections_lib": {
+                    "lib": "upb_collections_lib",
+                    "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
+                },
+                "upb_json_lib": {
+                    "lib": "upb_json_lib",
+                    "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
+                },
+                "upb_textformat_lib": {
+                    "lib": "upb_textformat_lib",
+                    "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
+                },
+                "utf8_range_lib": {
+                    "lib": "utf8_range_lib",
+                    "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
+                },
+            })
+            extra_libs = ["upb_textformat_lib", "upb_json_lib", "utf8_range_lib", "upb_collections_lib"]
+            components["_grpc"]["requires"] += extra_libs
+            if not self.options.secure:
+                components["grpc_unsecure"]["requires"] += extra_libs
+
         return components

     def package_info(self):

EDIT: fixed typo in the diff - it turns out the test executable links without upb_json_lib, but the grpc project's pkgconfig files include it in the link, so i assume it's required
EDIT 2: added collections lib - again, the test executable doesn't need it, but it's in the grpc pkgconfig link lines

@Ahajha
Copy link
Contributor

Ahajha commented Mar 28, 2024

Thanks @amerry! I can fix the merge conflicts and add the patch :)

@amerry
Copy link
Contributor

amerry commented Mar 28, 2024

Just to highlight that I updated the original diff - the version I originally posted allowed the test to link, but might cause issues for code that uses more of the grpc library (eg: JSON exports).

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 1 (aa715ed4af6235954d4c04d6aaa62dfe69ebf8eb):

  • grpc/1.50.2:
    Error running command conan info grpc/1.50.2@#a0fded070007e6dba640feb4f0d87201 --json {jsonName} -pr {profileName}:

    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=5
    os=Linux
    [options]
    grpc:shared=False
    
    ...
    WARN: openssl/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by grpc/1.50.2 to zlib/1.3.1 
    ERROR: Failed requirement 'protobuf/3.25.1' from 'grpc/1.50.2'
    ERROR: Unable to find 'protobuf/3.25.1' in remotes
    
  • grpc/1.54.3:
    Didn't run or was cancelled before finishing

  • grpc/1.60.0:
    Didn't run or was cancelled before finishing

  • grpc/1.48.4:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 1 (aa715ed4af6235954d4c04d6aaa62dfe69ebf8eb):

  • grpc/1.60.0:
    Error running command conan graph info --requires grpc/1.60.0@#5300483a5d6d2f9c274f396b2b47ce62 -f json -pr:h /home/conan/workspace/prod-v2/bsr/9800/caacb/profile_linux_11_libstdcpp11_17_gcc_release_64.-shared-False.txt -pr:b /home/conan/workspace/prod-v2/bsr/9800/caacb/profile_linux_11_libstdcpp11_17_gcc_release_64..txt:

    ======== Computing dependency graph ========
    abseil/20230802.1: Not found in local cache, looking in remotes...
    abseil/20230802.1: Checking remote: conan-center
    abseil/20230802.1: Downloaded recipe revision 23433dff31577773ed569fcf7d6dabe6
    c-ares/1.22.1: Not found in local cache, looking in remotes...
    c-ares/1.22.1: Checking remote: conan-center
    c-ares/1.22.1: Downloaded recipe revision b6ab29ad86a60006bb07c1fc1b7fabd1
    openssl/3.2.1: Not found in local cache, looking in remotes...
    openssl/3.2.1: Checking remote: conan-center
    openssl/3.2.1: Downloaded recipe revision 00ea0b8246cb6a0d086d8817ac9ac048
    zlib/1.3.1: Not found in local cache, looking in remotes...
    zlib/1.3.1: Checking remote: conan-center
    zlib/1.3.1: Downloaded recipe revision f52e03ae3d251dec704634230cd806a2
    re2/20231101: Not found in local cache, looking in remotes...
    re2/20231101: Checking remote: conan-center
    re2/20231101: Downloaded recipe revision a058827fe3c171fd948be386dea1921d
    protobuf/3.25.1: Not found in local cache, looking in remotes...
    protobuf/3.25.1: Checking remote: conan-center
    protobuf/3.25.1: Checking remote: c3i_PR-v2-21593
    Graph root
        cli
    Requirements
        abseil/20230802.1#23433dff31577773ed569fcf7d6dabe6 - Downloaded (conan-center)
        c-ares/1.22.1#b6ab29ad86a60006bb07c1fc1b7fabd1 - Downloaded (conan-center)
        grpc/1.60.0#5300483a5d6d2f9c274f396b2b47ce62 - Cache
        openssl/3.2.1#00ea0b8246cb6a0d086d8817ac9ac048 - Downloaded (conan-center)
        re2/20231101#a058827fe3c171fd948be386dea1921d - Downloaded (conan-center)
        zlib/1.3.1#f52e03ae3d251dec704634230cd806a2 - Downloaded (conan-center)
    Resolved version ranges
        openssl/[>=1.1 <4]: openssl/3.2.1
        zlib/[>=1.2.11 <2]: zlib/1.3.1
    Graph error
        Package 'protobuf/3.25.1' not resolved: Unable to find 'protobuf/3.25.1' in remotes.
    ERROR: Package 'protobuf/3.25.1' not resolved: Unable to find 'protobuf/3.25.1' in remotes.
    
  • grpc/1.50.2:
    Didn't run or was cancelled before finishing

  • grpc/1.48.4:
    Didn't run or was cancelled before finishing

  • grpc/1.54.3:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@grmcdorman
Copy link

Blocked by #21622 which is currently blocked by an error building the recipe with Conan 2, it appears.

@valgur
Copy link
Contributor Author

valgur commented May 30, 2024

#24165

@valgur valgur closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants