Closed kaankoken closed 1 year ago
You'll need to have all the shared libraries available where SwiftLint expects them to be. You can inspect the Docker image or the script we use to build it to find out exactly what those are: https://github.com/realm/SwiftLint/blob/main/Dockerfile
The Linux binary isn't designed to be portable because of this dependency on shared libraries. So your options are:
I am using
Swiftlint
package on linux machine forCI
(gh action) withpre-commit
. It seems that cannot loading the the wrapper.Issue on
Swiftlint
Error: Program crashed: Illegal instruction at 0x00007fb3db563470
Error with stacktrace
```bash Run pre-commit/action@v3.0.0 with: extra_args: --all-files Run python -m pip install pre-commit python -m pip install pre-commit shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} Defaulting to user installation because normal site-packages is not writeable Collecting pre-commit Downloading pre_commit-3.4.0-py2.py3-none-any.whl (203 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 203.7/203.7 KB 4.2 MB/s eta 0:00:00 Collecting virtualenv>=20.10.0 Downloading virtualenv-20.24.5-py3-none-any.whl (3.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 16.5 MB/s eta 0:00:00 Requirement already satisfied: pyyaml>=5.1 in /usr/lib/python3/dist-packages (from pre-commit) (5.4.1) Collecting cfgv>=2.0.0 Downloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB) Collecting nodeenv>=0.11.1 Downloading nodeenv-1.8.0-py2.py3-none-any.whl (22 kB) Collecting identify>=1.0.0 Downloading identify-2.5.30-py2.py3-none-any.whl (98 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.9/98.9 KB 20.2 MB/s eta 0:00:00 Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from nodeenv>=0.11.1->pre-commit) (59.6.0) Collecting platformdirs<4,>=3.9.1 Downloading platformdirs-3.11.0-py3-none-any.whl (17 kB) Collecting filelock<4,>=3.12.2 Downloading filelock-3.12.4-py3-none-any.whl (11 kB) Collecting distlib<1,>=0.3.7 Downloading distlib-0.3.7-py2.py3-none-any.whl (468 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 25.6 MB/s eta 0:00:00 Installing collected packages: distlib, platformdirs, nodeenv, identify, filelock, cfgv, virtualenv, pre-commit Successfully installed cfgv-3.4.0 distlib-0.3.7 filelock-3.12.4 identify-2.5.30 nodeenv-1.8.0 platformdirs-3.11.0 pre-commit-3.4.0 virtualenv-20.24.5 Run python -m pip freeze --local argcomplete==3.1.2 cfgv==3.4.0 distlib==0.3.7 filelock==3.12.4 identify==2.5.30 nodeenv==1.8.0 packaging==23.2 pipx==1.2.0 platformdirs==3.11.0 pre-commit==3.4.0 userpath==1.9.1 virtualenv==20.24.5 Run actions/cache@v3 Cache not found for input keys: pre-commit-3||389ef66d5ad40af641fc010afd314be94b37f855caca837849b251e37c968a28 Run pre-commit run --show-diff-on-failure --color=always --all-files [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://github.com/nicklockwood/SwiftFormat. [INFO] Initializing environment for https://github.com/realm/SwiftLint. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/nicklockwood/SwiftFormat. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/realm/SwiftLint. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... check yaml...............................................................Passed fix end of files.........................................................Passed trim trailing whitespace.................................................Passed detect private key.......................................................Passed check for merge conflicts................................................Passed check toml...............................................................Passed SwiftFormat..............................................................Passed SwiftLint................................................................Failed - hook id: swiftlint - exit code: -4 SourceKittenFramework/library_wrapper.swift:31: Fatal error: Loading libsourcekitdInProc.so failed 💣 Program crashed: Illegal instruction at 0x00007fb3db563470 Thread 0 "swiftlint": 0 0x00007fb3da44280a