8000 update to 1.62.2 by cbouss · Pull Request #14 · AnacondaRecipes/grpcio-tools-feedstock · GitHub
[go: up one dir, main page]

Skip to content

update to 1.62.2 #14

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

Merged
merged 5 commits into from
Jul 25, 2024
Merged

update to 1.62.2 #14

merged 5 commits into from
Jul 25, 2024

Conversation

cbouss
Copy link
@cbouss cbouss commented Jul 22, 2024

grpcio-tools 1.62.2

Destination channel: main

Links

Added patch to "unvendor" protobuf and abseil. I did not enable it for windows though as I still had issues and do not wish to spend a large amount of time on this (i.e. deferring to later). But, that is still an improvement from before.

- pip
- setuptools
- wheel
- protobuf 3.20.3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting... grpcio_tools "vendors" protobuf (https://github.com/grpc/grpc/blob/v1.62.2/tools/distrib/python/grpcio_tools/setup.py#L193-L200). Fedora patches that so that it uses the system protobuf instead: https://src.fedoraproject.org/rpms/grpc/blob/rawhide/f/grpc.spec#_758.

They also hardcode C++14 (https://github.com/grpc/grpc/blob/v1.62.2/tools/distrib/python/grpcio_tools/setup.py#L140-L151) (though I don't think it matters here).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

third_party/abseil-cpp is also vendored, https://github.com/grpc/grpc/tree/v1.62.2/third_party

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added patch to "unvendor" protobuf and abseil. I did not enable it for windows though as I still had issues and do not wish to spend a large amount of time on this (i.e. deferring to later). But, that is still an improvement from before.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's perfect @cbouss. Thanks a lot for giving it a try! Linux + macOS is already a good start.

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_62l6n05i2o/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
  • clone/recipe/meta.yaml:32: host_section_needs_exact_pinnings: Linked libraries host should have exact version pinnings.
    ===== Final Report: =====
    0 Errors and 2 Warnings were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_3bz2w07q7t/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
    ===== Final Report: =====
    0 Errors and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_acg4ao_bx8/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
    ===== Final Report: =====
    0 Errors and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_cel6ejcmqc/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
    ===== Final Report: =====
    0 Errors and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_850956vql2/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
    ===== Final Report: =====
    0 Errors and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_074jkvkg_m/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
    ===== Final Report: =====
    0 Errors and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_9cicoz50d4/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
    ===== Final Report: =====
    0 Errors and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_5cv0wz06p1/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:38: python_build_tool_in_run: The python build tool setuptools is in run depends
    ===== Final Report: =====
    0 Errors and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_dcjrw_5vf0/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:39: python_build_tool_in_run: The python build tool setuptools is in run depends

===== ERRORS =====

  • clone/recipe/meta.yaml:19: patch_unnecessary: patch should not be in build when source/patches is not set
    ===== Final Report: =====
    1 Error and 1 Warning were found

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_acpk_ee9hh/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:39: python_build_tool_in_run: The python build tool setuptools is in run depends

===== ERRORS =====

  • clone/recipe/meta.yaml:19: patch_unnecessary: patch should not be in build when source/patches is not set
    ===== Final Report: =====
    1 Error and 1 Warning were found

recipe/meta.yaml Outdated
- cython
- libabseil 20240116.2
- libprotobuf 4.25.3
- protobuf 4.25.3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I have seen, protobuf (the python package) is not required at build time.

recipe/meta.yaml Outdated
- python
# through run_exports
- libabseil
Copy link
@JeanChristopheMorinPerso JeanChristopheMorinPerso Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libabseil is not needed. The only abseil type used directly is absl::string_view (https://github.com/grpc/grpc/blob/master/tools/distrib/python/grpcio_tools/grpc_tools/main.cc#L114-L121) which is an alias to std::string_view in our case. This means that the library will use the std symbols and not the abseil symbols:

(test) jcmorin-mac-anac:work jcmorin$ nm ../_h_env/lib/python3.12/site-packages/grpc_tools/_protoc_compiler.cpython-312-darwin.so | c++filt | grep -e RecordError -e RecordWarning
000000000002492c t grpc_tools::internal::ErrorCollectorImpl::RecordError(std::__1::basic_string_view<char, std::__1::char_traits<char>>, int, int, std::__1::basic_string_view<char, std::__1::char_traits<char>>)
0000000000024b34 t grpc_tools::internal::ErrorCollectorImpl::RecordWarning(std::__1::basic_string_view<char, std::__1::char_traits<char>>, int, int, std::__1::basic_string_view<char, std::__1::char_traits<char>>)

So we can use ignore_run_exports on libabseil to ignore the DSO warning.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As grpcio-tools relies on -std=c++14 https://github.com/grpc/grpc/blob/v1.62.2/tools/distrib/python/grpcio_tools/setup.py#L93 then libabseil is not needed but for c++17 and protobuf >=22 I guess it will be required, see opencv/opencv#24369

Copy link
@skupr-anaconda skupr-anaconda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but LC's comment about protobuf in host

recipe/meta.yaml Outdated
- python
# through run_exports
- libabseil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As grpcio-tools relies on -std=c++14 https://github.com/grpc/grpc/blob/v1.62.2/tools/distrib/python/grpcio_tools/setup.py#L93 then libabseil is not needed but for c++17 and protobuf >=22 I guess it will be required, see opencv/opencv#24369

@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_22p4qufi95/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:44: python_build_tool_in_run: The python build tool setuptools is in run depends

===== ERRORS =====

  • clone/recipe/meta.yaml:25: patch_unnecessary: patch should not be in build when source/patches is not set
    ===== Final Report: =====
    1 Error and 1 Warning were found

@JeanChristopheMorinPerso

As grpcio-tools relies on -std=c++14 https://github.com/grpc/grpc/blob/v1.62.2/tools/distrib/python/grpcio_tools/setup.py#L93 then libabseil is not needed but for c++17 and protobuf >=22 I guess it will be required, see opencv/opencv#24369

The inverse in this case @skupr-anaconda. Also Charles patched up grpcio-tools to compiled with C++17. TO add more details, grpcio-tools today only needs absl::string_view which in our case is intentionally aliased to std::string_view because we built abseil with C++17. So what that means is that we just need abseil at compile time (else it's fail to find abseil) but the produce library won't need abseil since the compiler will replace absl::string_view with std:string_view symbols.

Copy link
@JeanChristopheMorinPerso JeanChristopheMorinPerso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @cbouss and thank you for taking the time to unvendor stuff on linux and macos!

@cbouss cbouss merged commit 82712aa into master Jul 25, 2024
6 of 8 checks passed
@cbouss cbouss deleted the PKG-2713 branch July 25, 2024 13:57
@anaconda-pkg-build
Copy link
Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_baoq3jny9s/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:44: python_build_tool_in_run: The python build tool setuptools is in run depends

===== ERRORS =====

  • clone/recipe/meta.yaml:25: patch_unnecessary: patch should not be in build when source/patches is not set
    ===== Final Report: =====
    1 Error and 1 Warning were found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0