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

Building fails with Mac 14, Xcode 11.2, ruby 2.3.7 #58

Closed
jayshah123 opened this issue Apr 21, 2020 · 1 comment
Closed

Building fails with Mac 14, Xcode 11.2, ruby 2.3.7 #58

jayshah123 opened this issue Apr 21, 2020 · 1 comment

Comments

@jayshah123
Copy link

When running bundle install with following, error occurs...
Xcode 11.2.1
Build version 11B500
macOS 10.14.6
ruby version ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
Bundler version 2.1.4

Installing unf_ext 0.0.7.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/myteam/.jenkins/workspace/myapp-fastlane-distribution/myaap/ios/vendor/bundle/ruby/2.3.0/gems/unf_ext-0.0.7.7/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r
./siteconf20200421-10002-1r7wtfv.rb extconf.rb
mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in
/Users/myteam/.jenkins/workspace/myapp-fastlane-distribution/myaap/ios/vendor/bundle/ruby/2.3.0/gems/unf_ext-0.0.7.7
for inspection.
Results logged to
/Users/myteam/.jenkins/workspace/myapp-fastlane-distribution/myaap/ios/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.7/gem_make.out

An error occurred while installing unf_ext (0.0.7.7), and Bundler cannot
continue.
Make sure that `gem install unf_ext -v '0.0.7.7' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  fastlane was resolved to 2.145.0, which depends on
    faraday-cookie_jar was resolved to 0.0.6, which depends on
      http-cookie was resolved to 1.0.3, which depends on
        domain_name was resolved to 0.5.20190701, which depends on
          unf was resolved to 0.1.4, which depends on
            unf_ext

@Krishna
Copy link

Krishna commented May 1, 2020

I was running into the same problem (on macOS Catalina 10.15.3 (19D76), Xcode 11.4 (11E146)).

My fix was to do the following in the shell:

$ export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
$ gem install unf_ext -v '0.0.7.5'

This worked for me.

I got the information about exporting SDKRoot from here.

Hope this helps someone.

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

No branches or pull requests

2 participants