Skip to content

Bad CPU type in executable #214

Open
@g3kk0

Description

I'm trying to run xcov on a MacBook Pro M1 but it keeps crashing with the following error:

Bad CPU type in executable - fork failed

Looks like it's something to do with the ARM architecture on the M1. Does xcov work with Apple silicon?

Installed with: gem install xcov
Run with: bundle exec fastlane run xcov workspace:"myproject.xcworkspace" scheme:"myscheme" output_directory:"xcov_output"

xcov: 1.8.1
macOS: 13.1

Full log:

[11:17:56]: $ /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core/bin/xcov-core -s xcov_output/xccovreport-0.xccovreport -o xcov_output/tmp/report.json20230113-26644-121m7q0 --ide-foundation-path /Applications/Xcode.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation
[11:17:56]: ▸ Loading...
Bad CPU type in executable - fork failed

Looking for related GitHub issues on fastlane/fastlane...

➡️  XCov failing to find .xccoverage file on 2.201.0
    https://github.com/fastlane/fastlane/issues/19824 [closed] 13 💬
    07 May 2022

🔗  You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/opt/homebrew/lib/ruby/gems/2.7.0/bin/fastlane)
Traceback (most recent call last):
  41: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/bundle:25:in `<main>'
  40: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/bundle:25:in `load'
  39: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/exe/bundle:36:in `<top (required)>'
  38: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
  37: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/exe/bundle:48:in `block in <top (required)>'
  36: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:25:in `start'
  35: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  34: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:31:in `dispatch'
  33: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  32: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  31: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  30: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:483:in `exec'
  29: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:23:in `run'
  28: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `kernel_load'
  27: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `load'
  26: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/fastlane:25:in `<top (required)>'
  25: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/fastlane:25:in `load'
  24: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/bin/fastlane:23:in `<top (required)>'
  23: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
  22: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
  21: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
  20: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
  19: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
  18: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
  17: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
  16: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
  15: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:226:in `block (2 levels) in run'
  14: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/one_off.rb:22:in `execute'
  13: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/one_off.rb:42:in `run'
  12: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
  11: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
  10: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
   9: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
   8: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
   7: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/actions/xcov.rb:13:in `run'
   6: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov/manager.rb:34:in `run'
   5: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov/manager.rb:97:in `parse_xccoverage'
   4: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core.rb:24:in `parse'
   3: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core.rb:30:in `execute_command'
   2: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/command_executor.rb:46:in `execute'
   1: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/fastlane_pty.rb:24:in `spawn'
/opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/fastlane_pty.rb:24:in `spawn': Bad CPU type in executable - fork failed (Errno::EBADARCH)
  41: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/bundle:25:in `<main>'
  40: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/bundle:25:in `load'
  39: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/exe/bundle:36:in `<top (required)>'
  38: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
  37: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/exe/bundle:48:in `block in <top (required)>'
  36: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:25:in `start'
  35: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  34: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:31:in `dispatch'
  33: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  32: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  31: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  30: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:483:in `exec'
  29: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:23:in `run'
  28: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `kernel_load'
  27: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `load'
  26: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/fastlane:25:in `<top (required)>'
  25: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/fastlane:25:in `load'
  24: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/bin/fastlane:23:in `<top (required)>'
  23: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
  22: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
  21: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
  20: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
  19: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
  18: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
  17: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
  16: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
  15: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:226:in `block (2 levels) in run'
  14: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/one_off.rb:22:in `execute'
  13: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/one_off.rb:42:in `run'
  12: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
  11: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
  10: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
   9: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
   8: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
   7: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/actions/xcov.rb:13:in `run'
   6: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov/manager.rb:34:in `run'
   5: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov/manager.rb:97:in `parse_xccoverage'
   4: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core.rb:24:in `parse'
   3: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core.rb:30:in `execute_command'
   2: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/command_executor.rb:46:in `execute'
   1: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/fastlane_pty.rb:24:in `spawn'
/opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/fastlane_pty.rb:24:in `spawn': Bad CPU type in executable - fork failed (FastlaneCore::FastlanePtyError)
  42: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/bundle:25:in `<main>'
  41: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/bundle:25:in `load'
  40: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/exe/bundle:36:in `<top (required)>'
  39: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
  38: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/exe/bundle:48:in `block in <top (required)>'
  37: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:25:in `start'
  36: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  35: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:31:in `dispatch'
  34: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  33: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  32: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  31: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli.rb:483:in `exec'
  30: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:23:in `run'
  29: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `kernel_load'
  28: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `load'
  27: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/fastlane:25:in `<top (required)>'
  26: from /opt/homebrew/lib/ruby/gems/2.7.0/bin/fastlane:25:in `load'
  25: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/bin/fastlane:23:in `<top (required)>'
  24: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
  23: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
  22: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
  21: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
  20: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
  19: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
  18: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
  17: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
  16: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/commands_generator.rb:226:in `block (2 levels) in run'
  15: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/one_off.rb:22:in `execute'
  14: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/one_off.rb:42:in `run'
  13: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
  12: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
  11: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
  10: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
   9: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
   8: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane/lib/fastlane/actions/xcov.rb:13:in `run'
   7: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov/manager.rb:34:in `run'
   6: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov/manager.rb:97:in `parse_xccoverage'
   5: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core.rb:24:in `parse'
   4: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core.rb:30:in `execute_command'
   3: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/command_executor.rb:45:in `execute'
   2: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/fastlane-2.210.1/fastlane_core/lib/fastlane_core/command_executor.rb:72:in `rescue in execute'
   1: from /opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov-core.rb:38:in `block in execute_command'
/opt/homebrew/lib/ruby/gems/2.7.0/gems/xcov-1.8.1/lib/xcov/error_handler.rb:20:in `handle_error': \e[31m[!] \e[31mError creating your coverage report - see the log above\e[0m (RuntimeError)

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