Uploaded image for project: 'Puppet Agent'
  1. Puppet Agent
  2. PA-2274

Unable to add gem with C extensions to Ruby built from puppet-runtime

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Template:
    • Team:
      Platform OS
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      The Ruby built by https://github.com/puppetlabs/puppet-runtime is unable to install the ed25519 gem (even when done as part of one of the runtime builds). This appears to be an issue with how we configure Ruby.

      The gem build fails to find ruby.h. This appears to happen because the include dir generated by Ruby (mkmf.rb) or the gem extension uses a cygwin path that mingw doesn't understand. That seems to be controlled by RbConfig::CONFIG['target_os'] and RbConfig::CONFIG['build_os'].

      I tried patching the gem's extconf.rb to set

      RbConfig::MAKEFILE_CONFIG['target_os'] = 'cygwin'
      

      which seemed like it should disable mkmf generating the cygpath calls, but it didn't seem to work. Manually editing the generated Makefile to fix the cygwin path and re-running make seemed to work.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              michael.smith Michael Smith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support