-
Notifications
You must be signed in to change notification settings - Fork 389
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
Added grpc@1.70.1 #3671
Added grpc@1.70.1 #3671
Conversation
@bazel-io skip_check unstable_url |
Hello @bazelbuild/bcr-maintainers, modules without existing maintainers (grpc) have been updated in this PR. |
@mering and @meteorcloudy Would you take a look at this? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice! I'd still like @mering at least to take a look, though.
Require module maintainers' approval for newly pushed changes.
@veblush Please take a look at the failures on windows, you should be able to reproduce on a windows machine with
then follow the instruction. (Well, there is a small bug to fix #3694) |
I've got this error when running the command you mentioned above on Cloudtop.
|
Fix missing windows symbol linker errors found when adding gRPC to BCR (From bazelbuild/bazel-central-registry#3671). ``` C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\link.exe @bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting_6658ee4b.dll-0.params # Configuration: 5b453b61a931a5d60d186b4b1192045ad0e097a738f75edb2ec811e836145bd1 # Execution platform: @@platforms//host:host Creating library bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.lib and object bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.exp address_sorting.obj : error LNK2019: unresolved external symbol __imp_htonl referenced in function in6_is_addr_loopback address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_closesocket referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_connect referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_getsockname referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_socket referenced in function address_sorting_create_source_addr_factory_for_current_platform bazel-out\x64_windows-fastbuild\bin\external\grpc+\third_party\address_sorting\address_sorting_6658ee4b.dll : fatal error LNK1120: 5 unresolved externals ``` This issue wasn't caught by out CI, likely due to BCR presubmit's use of stricter layering_check. Regardless, it's good as it correctly defines the `address_sorting` Bazel target's dependency. Closes #38648 PiperOrigin-RevId: 721549737
Fix missing windows symbol linker errors found when adding gRPC to BCR (From bazelbuild/bazel-central-registry#3671). ``` C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\link.exe @bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting_6658ee4b.dll-0.params # Configuration: 5b453b61a931a5d60d186b4b1192045ad0e097a738f75edb2ec811e836145bd1 # Execution platform: @@platforms//host:host Creating library bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.lib and object bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.exp address_sorting.obj : error LNK2019: unresolved external symbol __imp_htonl referenced in function in6_is_addr_loopback address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_closesocket referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_connect referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_getsockname referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_socket referenced in function address_sorting_create_source_addr_factory_for_current_platform bazel-out\x64_windows-fastbuild\bin\external\grpc+\third_party\address_sorting\address_sorting_6658ee4b.dll : fatal error LNK1120: 5 unresolved externals ``` This issue wasn't caught by out CI, likely due to BCR presubmit's use of stricter layering_check. Regardless, it's good as it correctly defines the `address_sorting` Bazel target's dependency. Closes grpc#38648 PiperOrigin-RevId: 721549737
Yep, it solved this problem and I'm now able to run the test on both Cloudtop and Windows VM. |
@meteorcloudy I've resolved the initial Windows presubmit linking error (see grpc/grpc#38648), but came across a new one which is quite similar to the initial one.
Because this error came from Abseil, I'm unsure whether a code fix is required, or if I can resolve it by adjusting the Bazel build or test configuration. Note that this error occured when building this absl/base and it has a proper |
So, looks like this is dynamic linking error caused by Dynamic linking works very differently on Windows, basically all symbols are by default invisible and requires some operations to export them manually. You can check this doc for more details.
Bazel does offer a You can add this features to all corresponding Or you can add
TensorFlow implemented a custom solution to filter out unnecessary symbols. But that requires quite a bit of effort. I think for now, we could probably exclude /cc @pzembrod |
This version fails for us with the following error:
I am not completely sure where this comes from but it might be caused by the aliases in https://github.com/grpc/grpc/blob/master/third_party/BUILD. It might make sense to get rid of the aliases completely. FYI: Related to grpc/grpc#38626 It might also be better to declare dependencies which are not needed by external repos depending on grpc as |
A bunch of bazel_dep were removed, see the diff against the previous version at https://github.com/bazelbuild/bazel-central-registry/actions/runs/13076495269/job/36489869601?pr=3671 Do you actually need to depend on
Agree, some bazel_deps should probably be dev_dependency instead of being removed completely. |
We directly depend on the following targets: From the
|
Thanks for your investigation and that makes sense. gRPC is not meant for DLL so seeing errors when building DLLs is expected. I'll disable that test on Windows. |
My ultimate goal is a full migration to bzlmod. However, this isn't possible until all dependencies are available in the BCR. Therefore, my current focus is on making the key public targets available through the gRPC BCR package. |
A few changes to address comments from bazelbuild/bazel-central-registry#3671 - Reintroduced a few more dependencies in the gRPC Bazel modules since those turned out to be required for some public gRPC targets (e.g. `googletest` is needed for `grpc++_test`) - Removed `google_cloud_cpp` from the dependency as it's not yet registered to BCR and using it sometimes causes strange problems. - Added a few public Bazel targets to `bazel_build_with_bzlmod_linux.sh` to make sure those are actually buildable. Following-up of #38626 Closes #38675 PiperOrigin-RevId: 723192505
It looks like
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Fix missing windows symbol linker errors found when adding gRPC to BCR (From bazelbuild/bazel-central-registry#3671). ``` C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\link.exe @bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting_6658ee4b.dll-0.params # Configuration: 5b453b61a931a5d60d186b4b1192045ad0e097a738f75edb2ec811e836145bd1 # Execution platform: @@platforms//host:host Creating library bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.lib and object bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.exp address_sorting.obj : error LNK2019: unresolved external symbol __imp_htonl referenced in function in6_is_addr_loopback address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_closesocket referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_connect referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_getsockname referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_socket referenced in function address_sorting_create_source_addr_factory_for_current_platform bazel-out\x64_windows-fastbuild\bin\external\grpc+\third_party\address_sorting\address_sorting_6658ee4b.dll : fatal error LNK1120: 5 unresolved externals ``` This issue wasn't caught by out CI, likely due to BCR presubmit's use of stricter layering_check. Regardless, it's good as it correctly defines the `address_sorting` Bazel target's dependency. Closes grpc#38648 PiperOrigin-RevId: 721549737
A few changes to address comments from bazelbuild/bazel-central-registry#3671 - Reintroduced a few more dependencies in the gRPC Bazel modules since those turned out to be required for some public gRPC targets (e.g. `googletest` is needed for `grpc++_test`) - Removed `google_cloud_cpp` from the dependency as it's not yet registered to BCR and using it sometimes causes strange problems. - Added a few public Bazel targets to `bazel_build_with_bzlmod_linux.sh` to make sure those are actually buildable. Following-up of grpc#38626 Closes grpc#38675 PiperOrigin-RevId: 723192505
Based on 1.69.0, some changes are
grpc-java
from its dependency.add_module_bazel.patch
as the repo hasMODULE.bazel
.disable-layering-check.patch
since mac fixed this layering issue by [Backport-v1.70.x] Added missing absl/status to BUILD grpc/grpc#38585.grpc_deps.bzl
andbazel/cc_grpc_library.bzl
as the repo already got those changes.