conan-center-index: [bug] unable to install openssl recipe with conan 2

Environment details

  • Operating System+version: Ubuntu 22.04
  • Compiler+version: gcc 12
  • Conan version: 2
  • Python version: 3.10

Steps to reproduce

  1. trying to install deps
  2. conan install /src -pr=default --build=missing

Logs

b2/4.9.3: Downloaded recipe revision 5445210661950ce568cfd76158d9e117
openssl/3.0.8: Not found in local cache, looking in remotes...
openssl/3.0.8: Checking remote: conancenter
Decompressing conan_export.tgz
openssl/3.0.8: Downloaded recipe revision ca3322d8d61268d02305a0aa9ea67a50
Graph root
    conanfile.txt: /catapult-src/client/catapult/conanfile.txt
Requirements
    boost/1.80.0#b82a0c7e718a8b6133f66d28d02e5c4d - Downloaded (conancenter)
Build requirements
    b2/4.9.3#5445210661950ce568cfd76158d9e117 - Downloaded (conancenter)
*********************************************************
Recipe 'openssl/3.0.8' seems broken.
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check it is updated to 2.0
*********************************************************

ERROR: Package 'openssl/3.0.8' not resolved: openssl/3.0.8: Cannot load recipe.
Error loading conanfile at '/conan/.conan2/p/opensbbde1837daa6f/e/conanfile.py': Unable to load conanfile in /conan/.conan2/p/opensbbde1837daa6f/e/conanfile.py
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/conan/.conan2/p/opensbbde1837daa6f/e/conanfile.py", line 6, in <module>
    from conans import AutoToolsBuildEnvironment, tools
ImportError: cannot import name 'AutoToolsBuildEnvironment' from 'conans' (/usr/local/lib/python3.10/dist-packages/conans/__init__.py)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

What is the recommended way to proceed in this situation in which we have conan2? do we need to downgrade to conan1? what are the workarounds?

@andrewssobral +1 I literally have the exact same error as you, for opencv/4.5.5.

Hi! Thanks for taking the time to open the issue.

Work in porting recipes to Conan 2 in Conan Center Index is still underway, and at the moment OpenSSL version 3 is still not compatible, sorry 😦. You can check this discussion to get an up-to-date list of the recipes we have confirmed work in Conan 2 (And more to come! We are still processing some of the recipes to it’s probable we have missed some already-compatible recipes)

Hello all! Openssl is available for both Conan 1.x and 2.x since many months ago.

https://github.com/conan-io/conan-center-index/pull/16658

https://conan.io/center/recipes/openssl

I’m closing this issue now. Please, feel free to re-open in case Openssl is not working only.

See https://docs.conan.io/2/tutorial/versioning/conflicts.html for info about version conflicts, there’s some great info in there regarding on how to deal with these conflicts!

Hi! What you’re now seeing is a version conflict on your. As you mention, you have OpenSSL 3 as a requirement, and then libcurl transitively depends on a different version of OpenSSL. This error is thus expected 😃

The good news is that it seems like the Conan 2 packages are now properly available so that’s great!

Hi @musialny. Can you please try now? The issue arose from some CI upgrades that affected the OpenSSL build and made it not finish successfully. It should work now.

@Wayonb @hargtholan OpenSSL 3 is also now available, so we would appreciate it if you could also give it a try 😃

@hargtholan You can downgrade to conan1 gratefully experiencing issues with already ported to conan2 packages. Or use vcpkg (that what I did)

Lets transfer this issue to conan-center-index repo, as this is a matter of upgrading recipes there, not a client issue, thanks for the feedback.

Same for me concerning the installation of the opencv/4.5.5 package, it requires ‘ffmpeg/4.4’ that seems broken 😦

*********************************************************
Recipe 'ffmpeg/4.4' seems broken.
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: Package 'ffmpeg/4.4' not resolved: ffmpeg/4.4: Cannot load recipe.
Error loading conanfile at '/Users/andrewssobral/.conan2/p/ffmpe19190b02ff197/e/conanfile.py': Unable to load conanfile in /Users/andrewssobral/.conan2/p/ffmpe19190b02ff197/e/conanfile.py
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/andrewssobral/.conan2/p/ffmpe19190b02ff197/e/conanfile.py", line 7, in <module>
    from conans import AutoToolsBuildEnvironment, tools
ImportError: cannot import name 'AutoToolsBuildEnvironment' from 'conans' (/usr/local/lib/python3.9/site-packages/conans/__init__.py)