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

Openssl 3.x.x conan v2 #16563

Closed
wants to merge 20 commits into from
Closed

Conversation

jngrb
Copy link
Contributor

@jngrb jngrb commented Mar 14, 2023

Specify library name and version: openssl/3.x.x

Port of the conan v2 compatibility of PR #14066 for OpenSSL 1.x.x to the OpenSSL 3.x.x recipe.

This PR also includes PR #14426 :

this extends the improvements of PR #12838 done for the 1.x.x recipe to the 3.x.x one; also there is a new 3.x.x test_package using the CMakeDeps generator


jngrb and others added 10 commits March 5, 2023 10:44
this extends the improvements of PR conan-io#12838 done for the 1.x.x recipe
to the 3.x.x one; also there is a new 3.x.x test_package using
the CMakeDeps generator
removed the _skip_test part taken from "v2 test package" for 1.x.x
as it was not in "v1 test package" for 3.x.x
…figurations

reason: see comments in the validate method of the 3.x.x's conanfile.py
also changed openssl 3.x.x test package to be compatible
with conan v1 and v2 (self.dependencies["openssl"].options
is not available in conan v1's test method)
@github-actions
Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/openssl//'.

👋 @Hopobcn @Croydon you might be interested. 😉

@ghost
Copy link

ghost commented Mar 14, 2023

I detected other pull requests that are modifying openssl/3.x.x recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@gegles
Copy link
Contributor

gegles commented Mar 20, 2023

Any update on this? It would be really cool to be able to use OpenSSL v3 with Conan v2... That's the only remaining thing for our project to upgrade to Conan v2. thx!

reason: with conan v2, transitive include paths are no longer set
automatically so the test pkg would need to directly depend on zlib.
@jngrb
Copy link
Contributor Author

jngrb commented Mar 20, 2023

Any update on this? It would be really cool to be able to use OpenSSL v3 with Conan v2... That's the only remaining thing for our project to upgrade to Conan v2. thx!

I haven't figured out why the MSVC build no longer generates providers/fips.pdb.

Given that I am a consumer of conan-center-index recipes just as you are, @gegles , maybe you have a tip or can help out to get this done?

@conan-center-bot

This comment has been minimized.

Configurations/10-main.conf defines /nologo and /debug flags
as default for Visual Studio that should be set by recipe
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit f5be79a
openssl/3.0.7
post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libssl.dylib, libssl.3.dylib, libcrypto.3.dylib, libcrypto.dylib
openssl/3.0.5
post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libssl.dylib, libssl.3.dylib, libcrypto.3.dylib, libcrypto.dylib
openssl/3.0.8
post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libssl.dylib, libssl.3.dylib, libcrypto.3.dylib, libcrypto.dylib

* re-enable the Apple changes in _patch_install_name
* do not test the "openssl" standalone tool for Conan v2
  (because of the complexity whether this test would work
   for deviating build and host profiles)
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 8 (3df73a2f1eef78ffc05c719d80656de4752ea150):

  • openssl/3.0.7@:
    Didn't run or was cancelled before finishing

  • openssl/3.0.8@:
    Didn't run or was cancelled before finishing

  • openssl/3.0.5@:
    CI failed to create some packages (All logs)

    Logs for packageID dca58cbd666cbfbfbc126dd5749f6149f15b0ee7:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.libcxx=libc++
    compiler.version=12.0
    os=Macos
    [options]
    openssl:shared=True
    
    [...]
            includes => add(),
            lflags => add("-m64 -isysroot /Applications/conan/xcode/12.0/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk"),
            
            
            
            cc => "/Applications/conan/xcode/12.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang",
            cxx => "/Applications/conan/xcode/12.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
            ar => "/Applications/conan/xcode/12.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar",
            ranlib => "/Applications/conan/xcode/12.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib",
            
        },
    );
    
    openssl/3.0.5: ['"conan-Release-Macos-x86_64-apple-clang-12.0"', 'shared', '--prefix=/', '--libdir=lib', '--openssldir="/Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/openssl/3.0.5/_/_/package/dca58cbd666cbfbfbc126dd5749f6149f15b0ee7/res"', 'no-unit-test', 'threads', 'PERL=perl', 'no-tests', '--release', '-fPIC', 'enable-fips', 'no-md2', 'zlib', '--with-zlib-include="/Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/zlib/1.2.13/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/include"', '--with-zlib-lib="/Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/zlib/1.2.13/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib"']
    
    ----Running------
    > . "/Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/openssl/3.0.5/_/_/build/dca58cbd666cbfbfbc126dd5749f6149f15b0ee7/build-release/conan/conanbuild.sh" && perl ./Configure "conan-Release-Macos-x86_64-apple-clang-12.0" shared --prefix=/ --libdir=lib --openssldir="/Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/openssl/3.0.5/_/_/package/dca58cbd666cbfbfbc126dd5749f6149f15b0ee7/res" no-unit-test threads PERL=perl no-tests --release -fPIC enable-fips no-md2 zlib --with-zlib-include="/Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/zlib/1.2.13/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/include" --with-zlib-lib="/Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/zlib/1.2.13/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib"
    -----------------
    Configuring OpenSSL version 3.0.5 for target conan-Release-Macos-x86_64-apple-clang-12.0
    Using os-specific seed configuration
    Created configdata.pm
    Running configdata.pm
    Created Makefile.in
    Created Makefile
    Created include/openssl/configuration.h
    
    **********************************************************************
    ***                                                                ***
    ***   OpenSSL has been successfully configured                     ***
    ***                                                                ***
    ***   If you encounter a problem while building, please open an    ***
    ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
    ***   and include the output from the following command:           ***
    ***                                                                ***
    ***       perl configdata.pm --dump                                ***
    ***                                                                ***
    ***   (If you are new to OpenSSL, you might want to consult the    ***
    ***   'Troubleshooting' section in the INSTALL.md file first)      ***
    ***                                                                ***
    **********************************************************************
    openssl/3.0.5: 
    openssl/3.0.5: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    openssl/3.0.5: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    openssl/3.0.5: ERROR: Package 'dca58cbd666cbfbfbc126dd5749f6149f15b0ee7' build failed
    openssl/3.0.5: WARN: Build folder /Users/jenkins/w/prod/BuildSingleReference@2/.conan/data/openssl/3.0.5/_/_/build/dca58cbd666cbfbfbc126dd5749f6149f15b0ee7/build-release
    ERROR: openssl/3.0.5: Error in build() method, line 613
    	self._patch_install_name()
    while calling '_patch_install_name', line 625
    	replace_in_file(self, "Makefile", old_str, new_str)
    	ConanException: replace_in_file didn't find pattern '-install_name $(INSTALLTOP)/$(LIBDIR)/' in 'Makefile' file.
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline (informative, not required for merge) ❌

Note: Conan v2 builds are informative and they are not required for the PR to be merged.

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Failure in build 8 (3df73a2f1eef78ffc05c719d80656de4752ea150):

  • openssl/3.0.8@:
    Didn't run or was cancelled before finishing

  • openssl/3.0.7@:
    CI failed to create some packages (All logs)

    Logs for packageID 1d3dd9b158ab5bdcdd2cfdaf818b5591c4783fda:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=gnu17
    compiler.libcxx=libc++
    compiler.version=13
    os=Macos
    [options]
    */*:shared=True
    
    [...]
            
            
            cc => "/Applications/conan/xcode/13.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang",
            cxx => "/Applications/conan/xcode/13.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
            ar => "/Applications/conan/xcode/13.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar",
            ranlib => "/Applications/conan/xcode/13.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib",
            
        },
    );
    
    openssl/3.0.7: ['"conan-Release-Macos-x86_64-apple-clang-13"', 'shared', '--prefix=/', '--libdir=lib', '--openssldir="/Users/jenkins/w/prod-v2/BuildSingleReference@2/p/t/opens4f33736132169/p/res"', 'no-unit-test', 'threads', 'PERL=perl', 'no-tests', '--release', '-fPIC', 'enable-fips', 'no-md2', 'zlib-dynamic', '--with-zlib-include="/Users/jenkins/w/prod-v2/BuildSingleReference@2/p/zlib8915dbf451493/p/include"', '--with-zlib-lib="/Users/jenkins/w/prod-v2/BuildSingleReference@2/p/zlib8915dbf451493/p/lib"']
    openssl/3.0.7: RUN: perl ./Configure "conan-Release-Macos-x86_64-apple-clang-13" shared --prefix=/ --libdir=lib --openssldir="/Users/jenkins/w/prod-v2/BuildSingleReference@2/p/t/opens4f33736132169/p/res" no-unit-test threads PERL=perl no-tests --release -fPIC enable-fips no-md2 zlib-dynamic --with-zlib-include="/Users/jenkins/w/prod-v2/BuildSingleReference@2/p/zlib8915dbf451493/p/include" --with-zlib-lib="/Users/jenkins/w/prod-v2/BuildSingleReference@2/p/zlib8915dbf451493/p/lib"
    Configuring OpenSSL version 3.0.7 for target conan-Release-Macos-x86_64-apple-clang-13
    Using os-specific seed configuration
    Created configdata.pm
    Running configdata.pm
    Created Makefile.in
    Created Makefile
    Created include/openssl/configuration.h
    
    **********************************************************************
    ***                                                                ***
    ***   OpenSSL has been successfully configured                     ***
    ***                                                                ***
    ***   If you encounter a problem while building, please open an    ***
    ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
    ***   and include the output from the following command:           ***
    ***                                                                ***
    ***       perl configdata.pm --dump                                ***
    ***                                                                ***
    ***   (If you are new to OpenSSL, you might want to consult the    ***
    ***   'Troubleshooting' section in the INSTALL.md file first)      ***
    ***                                                                ***
    **********************************************************************
    
    openssl/3.0.7: ERROR: 
    Package '1d3dd9b158ab5bdcdd2cfdaf818b5591c4783fda' build failed
    openssl/3.0.7: WARN: Build folder /Users/jenkins/w/prod-v2/BuildSingleReference@2/p/t/opens4f33736132169/b/build-release
    *********************************************************
    Recipe 'openssl/3.0.7' cannot build its binary
    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: openssl/3.0.7: Error in build() method, line 613
    	self._patch_install_name()
    while calling '_patch_install_name', line 625
    	replace_in_file(self, "Makefile", old_str, new_str)
    	ConanException: replace_in_file didn't find pattern '-install_name $(INSTALLTOP)/$(LIBDIR)/' in 'Makefile' file.
    
  • openssl/3.0.5@:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@jcar87
Copy link
Contributor

jcar87 commented Mar 22, 2023

Hi @jngrb - thanks for opening this PR - very good effort :D
I've had a chance to look at this today and it's on my priority stack. I have noticed some of the functions in the recipe are not used, so can be removed, and have found an issue (and a fix) for the installation on Windows (in the package() method) - as well as other things that can be removed for simplicity (while still working, hopefully).

I will most likely open a new PR, as there are quite a lot of changes that diverge from your PR. I'm adding you as a co-author, I'll be opening it later today. Have tested it on Windows, Linux and macOS - I'll test some of the more unusual ones (e.g. Android, iOS, mingw) to make sure pre-existing logic still works.

Thanks for championing this!

@jcar87
Copy link
Contributor

jcar87 commented Mar 24, 2023

Hi @jngrb - We've updated the recipe with Conan 2.0 compatibility in this PR: #16658.

As part of this, the recipe has undergone several maintenance changes, in particular regarding dead code that wasn't being called, and superfluous code (some things are unnecessary with the newer recipe tools). Please see the pull request description for a detailed list of changes.

I'll close this PR since the compatibility is now resolved, but if there are any changes that you wish to bring forward, please feel free to reopen the pull request or open a new one, assigning me as reviewer!

Thanks so much for your contribution!

@jcar87 jcar87 closed this Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants