Xcode 11 GM Seed 2 Released

We have released an Xcode 11 GM Seed 2 image today. You can select the image by adding the following to a job in config.yml :

macos:
  xcode: 11.0.0

The only change from the Xcode 11 GM Seed 1 image is the version of Xcode:

  • Xcode is now version 11.0 GM Seed 2 Version 11A420a

Minor changes:

  • Fastlane 2.130.0 => 2.131.0

The full manifest of the installed software and SDKs is available here.

Known issues

  • There is an issue where a dialog appears for the first 30 seconds after the image boots reporting that the OS did not shut down cleanly on the last boot. This might impact UI tests. We pre-boot VMs so that builds can start as quickly as possible, so in many cases our VMs have been booted more than 30 seconds prior before to build running, which will reduce the rate of occurrence of this bug.

Upcoming deprecations / changes

1 Like

Help Please! Plans for the next image:

I’m going to start work on a new Xcode 11 image today, with which I hope to address some common requests. I hope to release this by the end of the week.

I will release a new image with Xcode GM Seed 2 unless Apple released another version in the mean time. Things I want to include:

Please let me know what changes you would like made to the image,.

Thanks,

Marc

2 Likes

I’m not seeing the manifest at the URL you linked to, only something like

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>image-manifest/v1158//index.html</Key>
<RequestId>F3CF852332B2A79D</RequestId>
<HostId>
juh53Io2aD03bV+bjI9M9o0AcCXvlpYp3iE/NwUxCfexs904MdAAp7ErR0Mg9BJecj4DoFnU2lo=
</HostId>
</Error>

Oops, I had an extra / in the URL. Fixed now - https://circle-macos-docs.s3.amazonaws.com/image-manifest/v1158/index.html

Just to be sure, the current deployed image still has issues with " Ruby headers" right?
I’m seeing issues while installing ruby gems that have native extensions.

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

current directory:
/Users/distiller/project/.bundle/ruby/2.3.0/gems/unf_ext-0.0.7.6/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r
./siteconf20190918-659-60u20p.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/distiller/project/.bundle/ruby/2.3.0/gems/unf_ext-0.0.7.6 for inspection.
Results logged to
/Users/distiller/project/.bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.6/gem_make.out

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

In Gemfile:
  danger-xcov was resolved to 0.4.1, which depends on
    xcov was resolved to 1.5.0, which depends on
      fastlane was resolved to 2.127.2, 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
Exited with code 5

The same job works fine on an xcode 10 macos image.

3 Likes

I have the same issue. I think it should be addressed in the next image.

In the meantime, I’m using a workflow with two steps… one that installs gems using xcode 10, caches them, and another that just uses the cache. It’s dirty, but it works.

1 Like
extconf failed, exit code 1

Gem files will remain installed in
/var/folders/1b/gl7yt7ds26vcyr1pkgld6l040000gn/T/bundler20190920-668-480jr1json-2.2.0/gems/json-2.2.0
for inspection.
Results logged to
/var/folders/1b/gl7yt7ds26vcyr1pkgld6l040000gn/T/bundler20190920-668-480jr1json-2.2.0/extensions/universal-darwin-18/2.3.0/json-2.2.0/gem_make.out

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

In Gemfile:
  fastlane was resolved to 2.131.0, which depends on
    json
Exited with code 5

I have same issue on xcode 11

2 Likes

issues when building with this image:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/distiller/code/vendor/bundle/ruby/2.3.0/gems/unf_ext-0.0.7.6/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r
./siteconf20190921-785-16ewadr.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/distiller/code/vendor/bundle/ruby/2.3.0/gems/unf_ext-0.0.7.6 for
inspection.
Results logged to
/Users/distiller/code/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.6/gem_make.out

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

same issue here with bundle install for Xcode 11 builds

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

1 Like

Same issue here on the gem installation. Is a new image in development to be released soon @marc? Or should we rely on using a custom ruby version for the time being…

GM 2 seems to be the same as the release version of Xcode 11.

Thanks for your work here @marc! Just a quick question: any idea when Catalina-based images might land? I’m starting to ship projects that use Combine and other iOS 13 / macOS 15 frameworks, and right now I can only run tests on the iOS Simulator because these frameworks aren’t available for macOS destinations yet.

So until there are adults in the room you can update (double) Ruby to latest and use it when installing native extensions.

brew install ruby
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile

worked in SSH shell prior to gem calls.

cc @Roykk, @AlexanderPan19920718

2 Likes

Getting this error soon after updating to XCode 11.

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

Any ETA for a fix?

Thanks in advance!

- run:
      name: Set up ruby latest version
      command: |
        brew install ruby
        echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile

I added , but still not work.

1 Like

Still having same issue… Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

@Roykk, @AlexanderPan19920718: you have to make sure the process that depends on ruby knows that it has to use one installed by Homebrew. /usr/local/opt/ruby/bin is the path to that executable. The echo command simply adds it to user’s settings and will not take effect until those settings are sourced, for example when the new shell session is opened or if you run source ~/.bash_profile. This is only helpful when you are debugging via SSH. If you want to use it in a pipeline/build step — you need to make sure the $PATH environment variable is already set to (includes) that directory when you run commands that need it. Look at the following documentation for more info on how to change the $PATH context for your commands:

https://circleci.com/docs/2.0/env-vars/#using-bash_env-to-set-environment-variables

For some commands that need ruby you may also be able to specify the --path-to-ruby in an argument to the command itself. Consult full documentation for tools like bundle and gem to see if that’s possible (I suspect it may be, but I don’t know).

@ermik , @AlexanderPan19920718 , thanks for the help… got it working when i

  - run:
          name: install Ruby and run bundleinstall
          command: |
            brew install ruby
            echo "export PATH=/usr/local/opt/ruby/bin:$PATH" >> $BASH_ENV
            source $BASH_ENV
            sudo gem install bundler -u -f
            bundle install --path vendor/bundle
1 Like

So it looks like Apple no longer ship the headers for the system Ruby with Xcode 11. We are building this image the same way as we built the Xcode 10.3 image, which does not exhibit this behaviour. I will build a new image where the version of Ruby is installed from homebrew, and I’ll make this be the default system Ruby.

In the team time, you can do the following to work around the Ruby issue:

version: 2.1
jobs:
  build:
    macos:
      xcode: 11.0.0
    shell: /bin/bash --login -eo pipefail
    steps:
      - checkout
      - run:
          name: Set Ruby Version
          command:  echo "ruby-2.6" > ~/.ruby-version
7 Likes

Thanks @marc This works for me!