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: more conan v2 stuff + bump zlib #13817

Merged
merged 4 commits into from
Oct 28, 2022

Conversation

SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented Oct 27, 2022

  • use conan.tools.files.copy instead of self.copy
  • no more usage of msvc_version_to_vs_ide_version, it's not part of conan public API. Use check_min_vs instead.
  • access to dependencies options through self.dependencies
  • self.info in validate()
  • bump zlib to 1.2.13

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the conan-center hook activated.

- use conan.tools.files.copy instead of self.copy
- no more usage of msvc_version_to_vs_ide_version, it's not part of conan public API. Use check_min_vs instead.
- access to dependencies options through self.dependencies
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@SpaceIm
Copy link
Contributor Author

SpaceIm commented Oct 27, 2022

waiting for #13820

@SpaceIm SpaceIm closed this Oct 28, 2022
@SpaceIm SpaceIm reopened this Oct 28, 2022
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline

All green in build 6 (1a778855a6bb706d5e1d4a01a0459a48698af64f):

  • grpc/1.50.0@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py", line 8, in <module>
        from conans import CMake
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • grpc/1.46.3@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py", line 8, in <module>
        from conans import CMake
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • grpc/1.48.0@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py", line 8, in <module>
        from conans import CMake
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • grpc/1.47.1@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-13817/recipes/grpc/all/conanfile.py", line 8, in <module>
        from conans import CMake
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

@conan-center-bot conan-center-bot merged commit 3960437 into conan-io:master Oct 28, 2022
@SpaceIm SpaceIm deleted the grpc-more-conan-v2 branch October 28, 2022 19:14
@@ -95,35 +101,32 @@ def requirements(self):
self.requires("c-ares/1.18.1")
self.requires("openssl/1.1.1q")
self.requires("re2/20220601")
self.requires("zlib/1.2.12")
self.requires("zlib/1.2.13")
self.requires("protobuf/3.21.4")
Copy link

Choose a reason for hiding this comment

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

When cross compiling, shoulnd't the protoc binaries only be built for the host platform and not the target platform?

self.options["protobuf"].with_protoc_binaries = False

However, this will only work if protobuf recipe is updated fjp@cc59b53

Copy link
Contributor Author

@SpaceIm SpaceIm Nov 4, 2022

Choose a reason for hiding this comment

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

it doesn't matter for grpc recipe, so there is no reason to force this option in grpc recipe itself.

Copy link

Choose a reason for hiding this comment

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

Thanks for your quick response.

Sure, it can also be set in a profile or from the command line. But my point is that there seems to be an issue when cross building grpc. Cross-build from 'Linux:x86_64' to 'Linux:armv7hf' using -b missing I get build errors for protobuf:

...
usr/include/c++/v1/cstdlib:123:9: error: target of using declaration conflicts with declaration already in scope
using ::abs _LIBCPP_USING_IF_EXISTS;
...
protobuf/3.20.0: ERROR: Package '4c113c49faf2c4384d5b6d4b12ce3565050d800e' build failed
protobuf/3.20.0: WARN: Build folder /root/.conan/data/protobuf/3.20.0/_/_/build/4c113c49faf2c4384d5b6d4b12ce3565050d800e
root@0ec9a559fe37:~# conan or in build() method, line 203

        ConanException: Error 2 while executing cmake --build '/root/.conan/data/protobuf/3.20.0/_/_/build/4c113c49faf2c4384d5b6d4b12ce3565050d800e/build_subfolder' '--' '-j8'

Are there any build jobs on conan-center-index that run cross compilation? I have just seen #13817 (comment) which doesn't seem to use different host and build profiles, but please correct me if I am wrong.

Copy link
Contributor Author

@SpaceIm SpaceIm Nov 5, 2022

Choose a reason for hiding this comment

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

In c3i, there is one cross-build with 2 profiles: from macOS Intel to macOS M1.

From what I see from your log, it may be a protobuf recipe issue, when target is Linux armv7hf.

@AndreyMlashkin
Copy link
Contributor

@SpaceIm is there any particular reason for this line?

def package_id(self):
        del self.info.options.secure 

@SpaceIm
Copy link
Contributor Author

SpaceIm commented Feb 3, 2024

It doesn't come from this PR but from #9044

And it's quite obvious: this option doesn't change package content. See 132d924

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.

7 participants