conan-center-index icon indicating copy to clipboard operation
conan-center-index copied to clipboard

openssl: Make debug build renaming optional

Open Sil3ntStorm opened this issue 3 years ago • 13 comments

Specify library name and version: openssl/>=1.1.0

Make debug build library renaming optional for openssl >= 1.1.0 which for some inexplicable reason was explicitly added despite it not being there in upstream.

It's especially useless in a conan environment as every build has its own directory and actually makes it extremely painful to work with such libraries.

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

Sil3ntStorm avatar May 24 '22 17:05 Sil3ntStorm

It comes from an old commit: https://github.com/conan-community/conan-openssl/commit/e565e0589c9d326db5e0ce9722449d80d9c91e29

/cc @SSE4

Anyway this debug_suffix option has no effect for many compilers and openssl versions, so it should be deleted in these cases.

SpaceIm avatar May 24 '22 18:05 SpaceIm

Anyway this debug_suffix option has no effect for many compilers and openssl versions, so it should be deleted in these cases.

It is already deleted for versions where it is not used. Deleting it for other compilers, will make it more complicated to use the option, as conan will complain about the option not existing when you simply specify that as an option in a consumer conanfile.

One would have to replicate the checks, or could possibly check if the option exists before setting it. In any case it would require a configure function, rather than just being able to use default_options

Sil3ntStorm avatar May 24 '22 19:05 Sil3ntStorm

well, it came from the bug in the FindOpenSSL.cmake in some old(er) cmake version from ~3 years ago. maybe it's already fixed in latest release and no longer an issue? I think it's worth checking. if so, I guess the workaround could be removed altogether, without adding a new option. UPD: I think the right issue is https://gitlab.kitware.com/cmake/cmake/-/issues/17604

SSE4 avatar May 25 '22 04:05 SSE4

I don't really care either way, was just trying to go for "as little impact as required" which in this instance is basically no impact for those who continue to want to run it the way it has been.

Ultimately I don't care much about how this is solved, so long as it is (and continues to be with future updates) possible to have output files that are named exactly the same regardless of configuration.

Unless I missed something it seems like conan provides its own FindOpenSSL.cmake file anyway that is then used by cmake?

Happy to do changes that help reach the goal.

Sil3ntStorm avatar May 25 '22 07:05 Sil3ntStorm

Failure in build 2 (159d5a1b03e94b49b78bfbe6bf67ea90d7c902fd):

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

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

    Logs for packageID f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=Visual Studio
    compiler.runtime=MD
    compiler.version=16
    os=Windows
    [options]
    openssl:shared=False
    
    [...]
    [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK
    openssl/1.1.1o: Calling build()
    **********************************************************************
    ** Visual Studio 2019 Developer Command Prompt v16.11.9
    ** Copyright (c) 2021 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x64'
    openssl/1.1.1o: using target: VC-conan-Release-Windows-x86_64-Visual Studio-16 -> VC-WIN64A
    openssl/1.1.1o: my %targets = (
        "VC-conan-Release-Windows-x86_64-Visual Studio-16" => {
            inherit_from => [ "VC-WIN64A" ],
            cflags => add("-O2 -Ob2 -MD"),
            cxxflags => add("-O2 -Ob2 -MD"),
            defines => add("NDEBUG"),
            includes => add(),
            lflags => add(""),
    
    
    
    
    
    
    
    
        },
    );
    
    openssl/1.1.1o: activated option: debug_suffix
    openssl/1.1.1o: activated option: debug_suffix
    openssl/1.1.1o: ['"VC-conan-Release-Windows-x86_64-Visual Studio-16"', 'no-shared', '--prefix="C:\\J\\w\\prod\\BuildSingleReference@4\\.conan\\data\\openssl\\1.1.1o\\_\\_\\package\\f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c"', '--openssldir="C:\\J\\w\\prod\\BuildSingleReference@4\\.conan\\data\\openssl\\1.1.1o\\_\\_\\package\\f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c\\res"', 'no-unit-test', 'threads', 'PERL=C:\\J\\w\\prod\\BuildSingleReference@4/s\\abfdcb\\1\\bin\\perl.exe', 'no-tests', '--release', 'debug-suffix']
    
    ----Running------
    > C:\J\w\prod\BuildSingleReference@4/s\abfdcb\1\bin\perl.exe ./Configure "VC-conan-Release-Windows-x86_64-Visual Studio-16" no-shared --prefix="C:\J\w\prod\BuildSingleReference@4\.conan\data\openssl\1.1.1o\_\_\package\f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c" --openssldir="C:\J\w\prod\BuildSingleReference@4\.conan\data\openssl\1.1.1o\_\_\package\f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c\res" no-unit-test threads PERL=C:\J\w\prod\BuildSingleReference@4/s\abfdcb\1\bin\perl.exe no-tests --release debug-suffix
    -----------------
    openssl/1.1.1o: 
    
    Failure!  build file wasn't produced.
    Please read INSTALL and associated NOTES files.  You may also have to look over
    your available compiler tool chain or change your configuration.
    
    target already defined - VC-conan-Release-Windows-x86_64-Visual Studio-16 (offending arg: debug-suffix)
    WARN: replace_in_file didn't find pattern '/MTd ' in 'Configurations\10-main.conf' file.
    WARN: replace_in_file didn't find pattern '/MTd"' in 'Configurations\10-main.conf' file.
    openssl/1.1.1o: ERROR: Package 'f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c' build failed
    openssl/1.1.1o: WARN: Build folder C:\J\w\prod\BuildSingleReference@4\.conan\data\openssl\1.1.1o\_\_\build\f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c
    ERROR: openssl/1.1.1o: Error in build() method, line 763
    	self._make()
    while calling '_make', line 685
    	self.run('{perl} ./Configure {args}'.format(perl=self._perl, args=args), win_bash=self._win_bash)
    	ConanException: Error 255 while executing C:\J\w\prod\BuildSingleReference@4/s\abfdcb\1\bin\perl.exe ./Configure "VC-conan-Release-Windows-x86_64-Visual Studio-16" no-shared --prefix="C:\J\w\prod\BuildSingleReference@4\.conan\data\openssl\1.1.1o\_\_\package\f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c" --openssldir="C:\J\w\prod\BuildSingleReference@4\.conan\data\openssl\1.1.1o\_\_\package\f9ac3e3eecc9e556aa7e9849b20cb9f894f07f2c\res" no-unit-test threads PERL=C:\J\w\prod\BuildSingleReference@4/s\abfdcb\1\bin\perl.exe no-tests --release debug-suffix
    
  • openssl/1.1.1k@: Didn't run or was cancelled before finishing

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • openssl/1.1.1f@: 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.

conan-center-bot avatar May 27 '22 18:05 conan-center-bot

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 29 '22 10:06 stale[bot]

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

  • #14580
  • #14066
  • #11725

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

ghost avatar Jun 29 '22 14:06 ghost

Any update on this? Is there any chance of merging this?

Sil3ntStorm avatar Jul 12 '22 15:07 Sil3ntStorm

There's a lot of PRs open, you can see https://github.com/prince-chrismc/conan-center-index-pending-review/issues/1 to track the status of CCI

there's a few minor things out of date with the bot so the results are not perfect 🤞 we can get those fixed soon ish

prince-chrismc avatar Jul 12 '22 22:07 prince-chrismc

The original behavior matches upstream and the official find module https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/FindOpenSSL.cmake#L282

Unless I missed something it seems like conan provides its own FindOpenSSL.cmake file anyway that is then used by cmake?

If you are installing the binaries built by conan center why not just use conan to consume them? as you point the generators provide the correct targets so you should not have any problems. 🤔

prince-chrismc avatar Jul 12 '22 22:07 prince-chrismc

It doesn't match upstream actually.

SpaceIm avatar Jul 12 '22 22:07 SpaceIm

All green in build 5 (e2b65ee1a8db25b563ad5930e504f402c4528fc7):

  • openssl/1.1.1p@: All packages built successfully! (All logs)

    :small_orange_diamond: 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-10939/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-10939/recipes/openssl/1.x.x/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-10939/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.1.1q@: All packages built successfully! (All logs)

    :small_orange_diamond: 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-10939/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-10939/recipes/openssl/1.x.x/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-10939/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.1.0l@: All packages built successfully! (All logs)

    :small_orange_diamond: 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-10939/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-10939/recipes/openssl/1.x.x/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-10939/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.0.2u@: All packages built successfully! (All logs)

    :small_orange_diamond: 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-10939/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-10939/recipes/openssl/1.x.x/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-10939/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • openssl/1.1.1o@: All packages built successfully! (All logs)

    :small_orange_diamond: 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-10939/recipes/openssl/1.x.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-10939/recipes/openssl/1.x.x/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-10939/recipes/openssl/1.x.x/conanfile.py", line 5, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

conan-center-bot avatar Jul 21 '22 12:07 conan-center-bot

there are some conflicts as notified by github

danimtb avatar Sep 20 '22 08:09 danimtb

This branch has conflicts that must be resolved

danimtb avatar Oct 19 '22 15:10 danimtb

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 05 '23 01:01 stale[bot]

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Feb 04 '23 20:02 stale[bot]