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

Ruby: support conan v2 and expose more configuration options for native extension gems #18338

Closed
wants to merge 31 commits into from

Commits on Feb 2, 2024

  1. Ruby: support conan v2 and expose more configuration options for nati…

    …ve extension gems. Reboots conan-io#12456 and conan-io#12208
    
    * conan v2 support (work done by myself + a merge of @SpaceIm 's branch from PR conan-io#12208 to reconcile both)
    
    * Extend testing to require one of the native extensions
    
    * ```
    post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/ruby/3.1.0/x86_64-linux/pty.so' links to system library 'util' but it is not in cpp_info.system_libs.
    ```
    
    * Use `--with-opt-dir` instead of `--with-xx-dir` that ruby isn't respecting.
    
    conanio/gccXX (eg 10) removed the libxxx-dev (eg libgmp-dev) from the image. This made me realize that the conan deps weren't being picked up by the build. The openssl was, because --with-openssl-dir is explicitly used in ruby config.
    
    So here, we rely on --with-opt-dir.
    
    cf: https://bugs.ruby-lang.org/issues/19014#change-99241 (--with-gmp-dir was added on September 14, 2022, wrote this in Sep 22, 2022)
    
    * Pass both --with-opt-dir and --with-xxx-dir
    
    https://gist.github.com/mrkn/6647630
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    cbef5f3 View commit details
    Browse the repository at this point in the history
  2. Make changes for 2.0.7

    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    53d7922 View commit details
    Browse the repository at this point in the history
  3. Delete option instead of forcing it to false

    CI Complains: "ConanException: Incorrect attempt to modify option 'with_readline' from 'True' to 'False'"
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    ec79200 View commit details
    Browse the repository at this point in the history
  4. Remove pylint: skip-file

    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    e551968 View commit details
    Browse the repository at this point in the history
  5. Adjust testing for conan v2

    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    367787b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5eed047 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f683111 View commit details
    Browse the repository at this point in the history
  8. Improve testing

    Thanks to Sam on Slack.
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    a0a0c43 View commit details
    Browse the repository at this point in the history
  9. Fixup removing frameworks dir on mac

    On my machine, M1 mac with conan 1.61.0 it's not `-F <path>` but `-F"<path>"`
    eg: `-F"/Users/julien/.conan/data/readline/8.1.2/_/_/package/9fcc18689922974ad28edb46b427da2559f4e6c8/Frameworks ...`
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    2798b4f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    80fc1a5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    175a786 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    581ed33 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a63e33a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    44dce48 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5bd4ff0 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    63f190c View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b35b422 View commit details
    Browse the repository at this point in the history
  18. try with debug 1.6.3 now...

    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    cb560ce View commit details
    Browse the repository at this point in the history
  19. Cross building: pass DESTDIR as arg to make install-local

    Note: ruby has a `--with-destdir=DESTDIR  specify default directory to install` option, maybe I should use that?
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    b50d916 View commit details
    Browse the repository at this point in the history
  20. remove tool_requires

    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    fe49bed View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d88e0eb View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6277fba View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    f406535 View commit details
    Browse the repository at this point in the history
  24. Don't link to conan libyaml on msvc, it fails to link

    For libffi and libyaml, starting at 3.2.x ruby supports:
    * Downloading the SOURCES to libyaml / libffi
    * Configure with --with-libyaml-source-dir / --with-libffi-source-dir
    * It then builds the libffi / libyaml itself
    
    https://bugs.ruby-lang.org/issues/18571
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    2576083 View commit details
    Browse the repository at this point in the history
  25. Pass DESTDIR to nmake

    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    333c63d View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    219f191 View commit details
    Browse the repository at this point in the history
  27. Adjust test_package

    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    445df2a View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    ee3a932 View commit details
    Browse the repository at this point in the history
  29. Actually just assumes that the current libffi bundled in source is up…

    … to date, and don't do extract-extlibs
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    c986810 View commit details
    Browse the repository at this point in the history
  30. Use fix_apple_shared_install_name to shush KB-H077?

    > post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libruby.3.1.dylib, libruby.dylib
    
    conan-io#18338 (comment)
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    0178690 View commit details
    Browse the repository at this point in the history
  31. Backport --add-gmp-dir in an attempt to fix miniruby not loading gmp lib

    During the build, miniruby is built, then it is actually used to build the extension libs.
    
    The c3i v2 runner on macOS is failing
    
    ```
    linking miniruby
    dyld[16179]: Library not loaded: @rpath/libgmp.10.dylib
      Referenced from: <BC0A8868-CFAE-3B40-A112-FCAC741169E4> /Users/jenkins/w/prod-v2/bsr@2/80054/defbf/p/b/ruby1af0f3d020f64/b/build-release/miniruby
      Reason: tried: '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file, not in dyld cache)
    make: *** [exe/ruby] Abort trap: 6
    make: *** Deleting file `exe/ruby'
    ```
    jmarrec committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    7ddb85e View commit details
    Browse the repository at this point in the history