Skip to content

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

@InfinityCode777

Description

@InfinityCode777

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    helpQuestions or user problems that require more explanation rather than code changes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions