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

GMP Conan 2.0 compatibilty #15025

Merged
merged 15 commits into from
Feb 14, 2023

Conversation

System-Arch
Copy link
Contributor

Specify library name and version: gmp/6.2.1

This pull requests builds upon @SpaceIm's work in PR #14103 and is my effort to help move it forward. I have gmp building with Conan 2.0 on Linux and Windows in my own build environment. Hopefully the fixes will apply with v1 in CCI as well.


@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Why do merged commits always cause a GitHub merge failure the first time they execute? Is there a race condition somewhere in the implementation?
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@SpaceIm
Copy link
Contributor

SpaceIm commented Jan 16, 2023

@System-Arch I think recipe is correct. I see regressions in your PR. What do you want to fix?

@System-Arch
Copy link
Contributor Author

System-Arch commented Jan 16, 2023

@System-Arch I think recipe is correct. I see regressions in your PR. What do you want to fix?

Hi @SpaceIm,
Thanks for your message. It was certainly not my intent to introduce any regressions. Please let me know what you are seeing.
The goal of my PR was to get the recipe to work with Conan 2.0. I observed two issues:

  1. Conan 2.0 doesn't support self.deps_user_info (see [question] What is the disposition of deps_user_info and user_info_build in Conan 2.0 conan#12812)
  2. The test_package test does not pass with Conan 2.0 due to use of self.options["gmp"]

The PR attempts to address both of these issues. Thanks

@SpaceIm
Copy link
Contributor

SpaceIm commented Jan 16, 2023

Conan 2.0 doesn't support self.deps_user_info (see [question] What is the disposition of deps_user_info and user_info_build in Conan 2.0 conan#12812)

Ok, automake recipe has been updated and it's now possible to query custom conf for msvc wrappers

The test_package test does not pass with Conan 2.0 due to use of self.options["gmp"]

For this one there is a nice trick proposed by @jcar87 based on ctest. It requires to add extra stuff in CMakeLists of test package (enable_testing(), add_test() for each executable). Then you don't need to test recipes options anymore in test(), just run ctest once with few appropriate flags. See test package of boost recipe.

It was certainly not my intent to introduce any regressions. Please let me know what you are seeing.

At least removal of extra double quotes around lib -nologo, from my experience this one must be protected. And removal of str() while testing Visual Studio/msvc, this part is intentional to support conan v1 & v2.

@conan-center-bot

This comment has been minimized.

@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 0c264a8
gmp/6.1.2
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgmpxx.so' links to system library 'm' but it is not in cpp_info.system_libs.
gmp/6.2.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgmpxx.so' links to system library 'm' but it is not in cpp_info.system_libs.
gmp/6.2.0
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgmpxx.so' links to system library 'm' but it is not in cpp_info.system_libs.

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

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 15 (29a64015018de07e759244750b0da2b2f298a26e):

  • gmp/6.2.0@:
    All packages built successfully! (All logs)

  • gmp/6.2.1@:
    All packages built successfully! (All logs)

  • gmp/6.1.2@:
    All packages built successfully! (All logs)


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 15 (29a64015018de07e759244750b0da2b2f298a26e):

  • gmp/6.2.1@:
    Didn't run or was cancelled before finishing

  • gmp/6.2.0@:
    CI failed to create some packages (All logs)

    Logs for packageID 6ad4752aed95b478e6db39eb1fbf655a8673a61e:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=msvc
    compiler.runtime=static
    compiler.runtime_type=Release
    compiler.version=192
    os=Windows
    [options]
    */*:shared=False
    
    [...]
    Decompressing conan_export.tgz
    automake/1.16.5: Downloaded recipe revision 891f585a736bce951cc0e7109aa5ffee
    autoconf/2.71: Not found in local cache, looking in remotes...
    autoconf/2.71: Checking remote: conan-center-v2
    autoconf/2.71: Trying with 'conan-center-v2'...
    Downloading conan_export.tgz
    Downloading conanfile.py
    Downloading conanmanifest.txt
    Decompressing conan_export.tgz
    autoconf/2.71: Downloaded recipe revision 053e3879948e44d44a511554854ffbe9
    Graph root
        virtual
    Requirements
        gmp/6.2.0#b71c5a395007b903e1f8ae960b376737 - Cache
    Build requirements
        autoconf/2.71#053e3879948e44d44a511554854ffbe9 - Cache
        automake/1.16.5#891f585a736bce951cc0e7109aa5ffee - Downloaded (conan-center-v2)
        m4/1.4.19#e7735846d9a3de132d712cb458519daf - Cache
        msys2/cci.latest#567331f1604f3c584f04feade960f06e - Cache
        yasm/1.3.0#2a3d4e934b903c33d380b47bdf7f45be - Downloaded (conan-center-v2)
    
    -------- Computing necessary packages --------
    gmp/6.2.0: Forced build from source
    Requirements
        gmp/6.2.0#b71c5a395007b903e1f8ae960b376737:6ad4752aed95b478e6db39eb1fbf655a8673a61e - Build
    Build requirements
        autoconf/2.71#053e3879948e44d44a511554854ffbe9:da39a3ee5e6b4b0d3255bfef95601890afd80709#b1d8ba7f536ba0dbb6c55c5ed249f4db - Skip (conan-center-v2)
        automake/1.16.5#891f585a736bce951cc0e7109aa5ffee:ebec3dc6d7f6b907b3ada0c3d3cdc83613a2b715 - Missing
        m4/1.4.19#e7735846d9a3de132d712cb458519daf:723257509aee8a72faf021920c2874abc738e029#833593978ff30d99db63dd61cd848ec0 - Skip (conan-center-v2)
        msys2/cci.latest#567331f1604f3c584f04feade960f06e:956a88975bda9dfcc485e2861d71e74bd7e2b9a5#bdcbf947acc81c6003d136a28a0ad7ef - Skip (conan-center-v2)
        yasm/1.3.0#2a3d4e934b903c33d380b47bdf7f45be:723257509aee8a72faf021920c2874abc738e029 - Missing
    
    -------- Installing packages --------
    
    -------- Installing (downloading, building) binaries... --------
    ERROR: Missing binary: automake/1.16.5:ebec3dc6d7f6b907b3ada0c3d3cdc83613a2b715
    ERROR: Missing binary: yasm/1.3.0:723257509aee8a72faf021920c2874abc738e029
    
    yasm/1.3.0: WARN: Can't find a 'yasm/1.3.0' package binary '723257509aee8a72faf021920c2874abc738e029' for the configuration:
    [settings]
    arch=x86_64
    build_type=Release
    os=Windows
    
    ERROR: Missing prebuilt package for 'automake/1.16.5', 'yasm/1.3.0'
    Use 'conan list packages yasm/1.3.0 --format=html -r=remote > table.html' and open the table.html file to see available packages
    Or try to build locally from sources with '--build=automake/1.16.5 --build=yasm/1.3.0'
    
    More Info at 'https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'
    
    
  • gmp/6.1.2@:
    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.

@System-Arch System-Arch requested a review from SpaceIm February 7, 2023 00:13
@conan-center-bot conan-center-bot merged commit 03a899d into conan-io:master Feb 14, 2023
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.

7 participants