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

fix libressl build error with Visual Studio 2022 #14729

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

xyz1001
Copy link
Contributor

@xyz1001 xyz1001 commented Dec 14, 2022

Specify library name and version: libressl/3.0.2

Compiling libressl/3.0.2 with Visuao Studio 2022 will fail. Here are part of error output.

C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_malloc.h(125,24): error C2485: 'constant': unrecognized extended attribute (compiling source file C:\Users\zgzf1\.conan\data\libressl\3.0.2\_\_\build\2b1be0a8976ecd1cd27d7c3d01af9a8d736344f8\source_subfolder\crypto\ui\ui_openssl_win.c) [C:\Users\zgzf1\.conan\data\libressl\3.0.2\_\_\build\2b1be0a8976ecd1 cd27d7c3d01af9a8d736344f8\source_subfolder\crypto\crypto.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_malloc.h(132,24): error C2485: 'constant': unrecognized extended attribute (compiling source file C:\Users\zgzf1\.conan\data\libressl\3.0.2\_\_\build\2b1be0a8976ecd1cd27d7c3d01af9a8d736344f8\source_subfolder\crypto\ui\ui_openssl_win.c) [C:\Users\zgzf1\.conan\data\libressl\3.0.2\_\_\build\2b1be0a8976ecd1 cd27d7c3d01af9a8d736344f8\source_subfolder\crypto\crypto.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_malloc.h(140,24): error C2485: 'constant': unrecognized extended attribute (compiling source file C:\Users\zgzf1\.conan\data\libressl\3.0.2\_\_\build\2b1be0a8976ecd1cd27d7c3d01af9a8d736344f8\source_subfolder\crypto\ui\ui_openssl_win.c) [C:\Users\zgzf1\.conan\data\libressl\3.0.2\_\_\build\2b1be0a8976ecd1 cd27d7c3d01af9a8d736344f8\source_subfolder\crypto\crypto.vcxproj]                                                                          

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline

All green in build 2 (59f4b332586d51bd9c99e6a683e70a5eb41a479a):

  • libressl/3.5.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-14729/recipes/libressl/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14729/recipes/libressl/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-14729/recipes/libressl/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • libressl/3.2.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-14729/recipes/libressl/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14729/recipes/libressl/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-14729/recipes/libressl/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • libressl/3.5.2@:
    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-14729/recipes/libressl/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14729/recipes/libressl/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-14729/recipes/libressl/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • libressl/3.0.2@:
    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-14729/recipes/libressl/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14729/recipes/libressl/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-14729/recipes/libressl/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • libressl/3.4.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-14729/recipes/libressl/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14729/recipes/libressl/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-14729/recipes/libressl/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • libressl/2.9.2@:
    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-14729/recipes/libressl/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14729/recipes/libressl/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-14729/recipes/libressl/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • libressl/3.2.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-14729/recipes/libressl/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-14729/recipes/libressl/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-14729/recipes/libressl/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

@uilianries
Copy link
Member

@xyz1001 Please, pass it directly to cmake definition in the recipe, as we a middle of a migration to Conan v2. The CMake wrapper is no longer used on Conan v2 and soon should be deprecated.

@xyz1001
Copy link
Contributor Author

xyz1001 commented Dec 15, 2022

@uilianries I do not know how to add a C/C++ macro in the recipe. Is there any example?

@uilianries
Copy link
Member

@xyz1001 No, because it should be patched to the upstream. Please, in case you identify a bug in the project, report directly to the upstream, so anyone, including the author, could have a proper hotfix.

@xyz1001
Copy link
Contributor Author

xyz1001 commented Dec 15, 2022

@uilianries This bug is fixed in libressl 3.5.x. But 3.0.2 may not be fixed.

@uilianries
Copy link
Member

@xyz1001 No problem, you can apply a patch here in CCI too. Please, take a look about patch policy: https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/sources_and_patches.md#policy-about-patching

@conan-center-bot conan-center-bot merged commit faa0728 into conan-io:master Dec 15, 2022
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.

5 participants