realm / realm/SwiftLint

Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed zsh: illegal hardware instruction swiftlint

Open
#6,475 5 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help
Dominant language
Swift
Stars
19.7k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
11

Description

New Issue Checklist
Bug Description

I just upgraded to Xcode 26.2 and swiftLint to 0.63.2 (see more in environment section). The Xcode build phase script failed to execute.

(1) I tried the method mentioned in many comments

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

but it does not work for me, if you check the snapshot below, it shows the

SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed
Image

(2) Some folks mentioned that they got it work on Xcode 26.0 (17A324) and I am not sure this is a Xcode specific problem.

Build Phase Script
if [ "$CI_TEST" == true ]; then
    echo "Not local env, skip swiftLint"
    exit 0
else
    echo "Start swiftLint"
fi


if [[ "$(uname -m)" == arm64 ]]
then
    export PATH="/opt/homebrew/bin:$PATH"
fi

if which swiftlint >/dev/null; then
    swiftlint --fix && swiftlint
    # echo "swiftLint disabled"
else
    echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
    exit 1
fi
Environment
Image
.yml
disabled_rules:
  - statement_position # https://realm.github.io/SwiftLint/statement_position.html
  - colon
  - nesting
  - line_length
  - identifier_name
  - multiple_closures_with_trailing_closure
  - cyclomatic_complexity
  - function_body_length
  - type_name
  - file_length
  - type_body_length
  - function_parameter_count
  - large_tuple
  - redundant_discardable_let
  - for_where
  - unneeded_synthesized_initializer

included:
  - <MY_PROJECT>
  - <MY_PROJECT>Tests
  - <MY_PROJECT>UITests
  
excluded:
  - Packages/<MY_PROJECT>/Sources/<MY_PROJECT>/Hashids.swift

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing build phase script and the reported SourceKittenFramework/library_wrapper.swift:58 error under Xcode 26.2 and SwiftLint 0.63.2. Compare the Xcode 26.0 discussion in issue 6221, then reproduce the failure with the provided script and environment details. Done means identifying a reproducible project cause and a confirmed fix or documented compatibility outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.