Skip to content

Can't build on GHA arm64 - Gem::Ext::BuildError: ERROR: Failed to build gem native extension #104

@rogerluan

Description

@rogerluan

Description

I haven't been able to get this to run on GHA CI for a while now. You can see the error message here: https://github.com/rogerluan/arkana/actions/runs/9119560632/job/25075184013?pr=58

Click here to expand a copy/paste version of the logs above, in case GHA expires those logs a few years from now

/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/bin/bundle config --local path /Users/runner/work/arkana/arkana/vendor/bundle
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/bin/bundle config --local deployment true
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Cache key: setup-ruby-bundler-cache-v6-macos-14-arm64-ruby-3.1.5-wd-/Users/runner/work/arkana/arkana-with--without--only--Gemfile.lock-db433a8d767d49eb7ebb066514d7faf6f11d511b2e1dd2f7b070930f527f88d3
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/bin/bundle install --jobs 4
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Fetching gem metadata from https://rubygems.org/.........
Fetching rake 13.0.6
Installing rake 13.0.6
Fetching dotenv 2.8.1
Fetching rainbow 3.1.1
Fetching ast 2.4.2
Fetching yaml 0.3.0
Installing rainbow 3.1.1
Installing dotenv 2.8.1
Installing yaml 0.3.0
Installing ast 2.4.2
Using base64 0.1.1
Using bundler 2.2.32
Fetching diff-lcs 1.5.0
Fetching docile 1.4.0
Fetching json 2.6.3
Fetching language_server-protocol 3.17.0.3
Installing docile 1.4.0
Installing diff-lcs 1.5.0
Fetching parallel 1.23.0
Installing json 2.6.3 with native extensions
Installing language_server-protocol 3.17.0.3
Installing parallel 1.23.0
Fetching racc 1.7.1
Fetching tty-color 0.6.0
Installing racc 1.7.1 with native extensions
Installing tty-color 0.6.0
Fetching regexp_parser 2.8.1
Installing regexp_parser 2.8.1
Fetching strscan 3.1.0
Fetching rspec-support 3.12.1
Installing strscan 3.1.0 with native extensions
Installing rspec-support 3.12.1
Fetching ruby-progressbar 1.13.0
Installing ruby-progressbar 1.13.0
Fetching unicode-display_width 2.4.2
Installing unicode-display_width 2.4.2
Fetching simplecov-html 0.12.3
Installing simplecov-html 0.12.3
Fetching simplecov_json_formatter 0.1.4
Installing simplecov_json_formatter 0.1.4
Fetching tty-cursor 0.7.1
Installing tty-cursor 0.7.1
Fetching tty-screen 0.8.1
Installing tty-screen 0.8.1
Fetching wisper 2.0.1
Installing wisper 2.0.1
Using arkana 2.0.0 from source at `.` and installing its executables
Fetching pastel 0.8.0
Installing pastel 0.8.0
Fetching rspec-core 3.12.2
Installing rspec-core 3.12.2
Fetching rspec-expectations 3.12.3
Installing rspec-expectations 3.12.3
Fetching rspec-mocks 3.12.6
Fetching simplecov 0.22.0
Fetching tty-reader 0.9.0
Installing simplecov 0.22.0
Results logged to
/Users/runner/work/arkana/arkana/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-22/3.1.0-static/strscan-3.1.0/gem_make.out

/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/3.1.0/rubygems/ext/builder.rb:102:in
`run'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:28:in
`build'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/3.1.0/rubygems/ext/builder.rb:171:in
`build_extension'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/3.1.0/rubygems/ext/builder.rb:205:in
`block in build_extensions'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in
`each'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in
`build_extensions'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/3.1.0/rubygems/installer.rb:843:in
`build_extensions'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/source/rubygems.rb:200:in
`install'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/installer/gem_installer.rb:54:in
`install'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/worker.rb:62:in
`apply_func'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/worker.rb:57:in
`block in process_queue'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in
`loop'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in
`process_queue'
/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.2.32/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing strscan (3.1.0), and Bundler cannot continue.

In Gemfile:
  rubocop-rspec was resolved to 2.24.0, which depends on
    rubocop-capybara was resolved to 2.18.0, which depends on
      rubocop was resolved to 1.56.3, which depends on
        rexml was resolved to 3.2.8, which depends on
          strscan
Error: The process '/Users/runner/hostedtoolcache/Ruby/3.1.5/arm64/bin/bundle' failed with exit code 5

The only change in that PR is that it's updating rexml to fix a vuln, but I double checked to see if the issue was rexml or strscan and it's strscan. You can verify that here: rogerluan/arkana@40baa41

Also, since rexml doesn't enforce any version of strscan, I tried using v1, but got the same result: rogerluan/arkana@3c3e51e

Do notice that a bunch of those tests in other envs do succeed. Just 1 particular env setup doesn't. (You can see all the workflows matrices that are running)

I wasn't able to reproduce that locally, just in GHA's CI.

Any way I can help debug this further?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions