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

[bug] unable to install openssl recipe with conan 2 #16402

Closed
Wayonb opened this issue Mar 3, 2023 · 19 comments
Closed

[bug] unable to install openssl recipe with conan 2 #16402

Wayonb opened this issue Mar 3, 2023 · 19 comments
Assignees

Comments

@Wayonb
Copy link

Wayonb commented Mar 3, 2023

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)
@AbrilRBS AbrilRBS self-assigned this Mar 3, 2023
@AbrilRBS
Copy link
Member

AbrilRBS commented Mar 3, 2023

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)

@andrewssobral
Copy link

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)

@Mikephii
Copy link

Mikephii commented Mar 6, 2023

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

@memsharded
Copy link
Member

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.

@memsharded memsharded transferred this issue from conan-io/conan Mar 6, 2023
@andrewssobral
Copy link

Thank you @memsharded ,
Could you please share the link to the issue so that we can follow up and see if a solution has been posted?

@andrewssobral
Copy link

Sorry, ignore my last message.

@uilianries
Copy link
Member

Hello, OpenSSL 3.x is still not ported to Conan 2.x but there is a current effort on porting it. The version 1.1.x is ported already BTW

@musialny
Copy link

@uilianries Hello, OpenSSL 3.x is still not ported to Conan 2.x but there is a current effort on porting it. The version 1.1.x is ported already BTW

I'm not sure
image

@hargtholan
Copy link

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?

@musialny
Copy link

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

@AbrilRBS
Copy link
Member

AbrilRBS commented Mar 22, 2023

@hargtholan if you're impacted by a specific recipe not being ported yet, please feel free to submit the issue requesting it so we can properly prioritize our work over there, as in fact there are some recipes have not yet been ported for Conan 2. If you need those right at this moment, then yes I'd suggest to stick to 1.59.0 for now until your recipes are ready. We're still commited to support Conan 1 for some time now so the change does not need to be imeditate (But no new features are planned for that branch)

As for Openssl 1.1.1t having missing @musialny, this is unexpected. As @uilianries mentioned, 1.X.X is already Conan 2 compatible and has been since launchday (See #15860) (We are having problems with two Windows binaries, but that does not seem to be affecting you) so it's surprising to see that error pop up. We would appreciate if you could submit a separate issue with reproduction steps so we can track that there and fix it :)

@musialny
Copy link

@RubenRBS In my case openssl 1.1.1t was a dependency of libcurl. Should I assign issue to that package or try to reproduce it via manually pulling 1.1.1t?

@AbrilRBS
Copy link
Member

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 :)

@musialny
Copy link

musialny commented Mar 24, 2023

@RubenRBS
image
On libcurl 7.88.1 is identical. When I removed openssl3 from conanfile it builds well

OpenSSL 3.1.0/3.0.8 hopefully works :D

@AbrilRBS
Copy link
Member

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!

@musialny
Copy link

@RubenRBS Isn't conan supporting multiple versions of package as dependencies?

@AbrilRBS
Copy link
Member

AbrilRBS commented Mar 27, 2023

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!

@musialny
Copy link

Thanks :D

@uilianries
Copy link
Member

uilianries commented Feb 26, 2024

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

#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.

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

No branches or pull requests

8 participants