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

[macOS 15 Arm64] - "bundle install" is failing #11096

Open
1 of 15 tasks
SamirNEddine opened this issue Dec 4, 2024 · 5 comments
Open
1 of 15 tasks

[macOS 15 Arm64] - "bundle install" is failing #11096

SamirNEddine opened this issue Dec 4, 2024 · 5 comments

Comments

@SamirNEddine
Copy link

Description

Running bundle install is failing on the macos-15 runner

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Image: macos-15-arm64
Version: 20241125.405

Is it regression?

yes

Expected behavior

bundle install should work

Actual behavior

bundle install don't work. The error I'm getting:

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

current directory:
/Users/runner/work/ios-app/ios-app/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0/ext/nkf
/Users/runner/hostedtoolcache/Ruby/3.2.2/arm64/bin/ruby extconf.rb
creating Makefile

current directory:
/Users/runner/work/ios-app/ios-app/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0/ext/nkf
make DESTDIR\= sitearchdir\=./.gem.[202](https://github.com/kartoon-ai/ios-app/actions/runs/12163537928/job/33922978016#step:6:208)41204-7443-4mjq8s
sitelibdir\=./.gem.20241204-7443-4mjq8s clean

current directory:
/Users/runner/work/ios-app/ios-app/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0/ext/nkf
make DESTDIR\= sitearchdir\=./.gem.20241[204](https://github.com/kartoon-ai/ios-app/actions/runs/12163537928/job/33922978016#step:6:210)-7443-4mjq8s
sitelibdir\=./.gem.20241204-7443-4mjq8s
compiling nkf.c
In file included from nkf.c:14:
In file included from
/Users/runner/hostedtoolcache/Ruby/3.2.2/arm64/include/ruby-3.2.0/ruby/ruby.h:25:
/Users/runner/hostedtoolcache/Ruby/3.2.2/arm64/include/ruby-3.2.0/ruby/defines.h:16:10:
fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^~~~~~~~~
1 error generated.
make: *** [nkf.o] Error 1

make failed, exit code 2

Repro steps

The workflow steps we're using:

jobs:
  build:
    name: Build and Upload app on TestFlight
    runs-on: macos-15

    steps:
      - name: Select Xcode version
        run: sudo xcode-select -s '/Applications/Xcode_16.app/Contents/Developer'

      - name: Select Swift version
        uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
        with:
          swift-version: "5.8"

      - name: Install bundler
        run: gem install bundler -v 2.5.16

      - name: Checkout
        uses: actions/checkout@v3

      - name: Install dependencies
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically
@susmitamane
Copy link
Contributor

Hi @SamirNEddine

We will look into the issue and keep you posted with updates.

Thank You.

@susmitamane
Copy link
Contributor

Hi @SamirNEddine Tested same workflow which you have provided but i am not seeing any issues related to the bundle install failure. For me the workflow is working fine and bundle install is working fine with all required steps.

Could you please check and confirm once if you are still facing the same issue.

Please find below screenshots of successful workflows:
Screenshot 2024-12-05 at 2 32 10 PM
Screenshot 2024-12-05 at 2 31 23 PM

Thank you.

@SamirNEddine
Copy link
Author

Hi @susmitamane
Thank you for getting back to me.

I just tested and I'm unfortunately still facing the same issue.
Screenshot 2024-12-06 at 16 24 16

Below is the exact wokflow that we're using:

name: Build

on:
  workflow_dispatch:
    inputs:
      environment:
        type: choice
        description: 'App environement'
        required: true
        options:
          - prod
          - staging

concurrency:
  group: beta-${{ github.ref }}
  cancel-in-progress: true

env:
  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

jobs:
  build:
    name: Build and Upload app on TestFlight
    runs-on: macos-15-xlarge

    steps:
      - name: Select Xcode version
        run: sudo xcode-select -s '/Applications/Xcode_16.app/Contents/Developer'

      - name: Select Swift version
        uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
        with:
          swift-version: "5.8"

      - name: Install bundler
        run: gem install bundler -v 2.5.16

      - name: Checkout
        uses: actions/checkout@v3

      - name: Install dependencies
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically

      - name: Global dependencies versions
        run: |
          ruby --version
          gem --version
          bundler --version
          swift --version
      - name: Run beta lane
        working-directory: ./App
        run: bundle exec fastlane beta env:${{ inputs.environement }}
        env:
          APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ vars.APP_STORE_CONNECT_API_KEY_KEY_ID }}
          APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ vars.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
          APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64: ${{ vars.APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64 }}
          APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
          MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
          MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
          SENTRY_ORG: ${{ vars.SENTRY_ORG }}
          SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

      - name: Success Slack message
        if: ${{ success() }}
        uses: slackapi/slack-github-action@v1.24.0
        with:
          payload: |
            {
              "text": "✅ New TestFlight version sent - ${{ github.ref_name }}"
            }
      - name: Failure Slack message
        if: ${{ failure() }}
        uses: slackapi/slack-github-action@v1.24.0
        with:
          payload: |
            {
              "text": "❌ Could not create new TestFlight version - ${{ github.ref_name }}"
            }
              

@SamirNEddine
Copy link
Author

@susmitamane I'd like to point out is that what's puzzeling is that we have another workflow that looks kind of similar but it's working (you can find it below). I'm unable to find any difference between the two. I even tried by elimination to remove everything else like the slack module with no luck.

name: CI

on:
  pull_request:
    branches:
      - develop

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    name: Build and Test app scheme
    runs-on: macos-15-xlarge

    steps:
      - name: Select Xcode version
        run: sudo xcode-select -s '/Applications/Xcode_16.app/Contents/Developer'

      - name: Select Swift version
        uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
        with:
          swift-version: "5.8"

      - name: Install bundler
        run: gem install bundler -v 2.5.16

      - name: Checkout
        uses: actions/checkout@v3

      - name: Install dependencies
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically

      - name: Global dependencies versions
        run: |
          ruby --version
          gem --version
          bundler --version
          swift --version

      - name: Run tests
        working-directory: ./App
        run: bundle exec fastlane tests

@susmitamane
Copy link
Contributor

Hi @SamirNEddine I tried executing both workflows without app related data both are working fine. Attached screenshots below please check.

  • As per my understanding and analysis the error is related to the nkf which is used or externally accessed through gemfiles which you are maintaining for your application.
  • The error occurs during the compilation of the native extension in this directory. Specifically:
    /Users/runner/work/ios-app/ios-app/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0/ext/nkf This is where extconf.rb is located, and it's trying to compile the nkf.c file. The process fails because it cannot find stdio.h, which is a critical system header for C programs.
  • Below is the file from where may be the ruby related nkf is accessible. I tried checking this as well but that gemfile which is mentioned in the screenshot by you which is not searchable. Also i have checked bundle/worker.rb but no reference to the nkf 0.2.0. https://github.com/ruby/rbs/blob/master/test/stdlib/NKF_test.rb , https://github.com/ruby/rbs/blob/master/stdlib/nkf/0/nkf.rbs
  • If you are using nkf please ensure that the nkf gem is properly installed in your environment. You can install it with
    gem install nkf
Screenshot 2024-12-11 at 3 28 50 PM
  • Could you please provide application repo url if it is not private? so that i can check more on this, for now from my end every possible way i have tested above workflows but for me bundle install working fine. The issue is more related to the gemfile and nkf which is used or getting installed related to the application.

Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants