Has anyone been running into this? `Error launchi...
# development
w
Has anyone been running into this?
Error launching process: Os { code: 86, kind: Uncategorized, message: "Bad CPU type in executable" }
Copy code
⏺ oss/pants-peek % pants peek ::                                                                                                                                    ⎇ main
16:02:59.32 [ERROR] 1 Exception encountered:

Engine traceback:
  in select
    ..
  in pants.backend.project_info.peek.peek
    `peek` goal

Traceback (most recent call last):
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/backend/project_info/peek.py", line 254, in peek
    tds = await Get(TargetDatas, UnexpandedTargets, targets)
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 118, in __await__
    result = yield self
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/backend/project_info/peek.py", line 177, in get_target_data
    dependencies_per_target = await MultiGet(
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 358, in MultiGet
    return await _MultiGet(tuple(__arg0))
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 165, in __await__
    result = yield self.gets
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/graph.py", line 1193, in resolve_dependencies
    inferred = await MultiGet(
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 358, in MultiGet
    return await _MultiGet(tuple(__arg0))
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 165, in __await__
    result = yield self.gets
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/backend/shell/dependency_inference.py", line 178, in infer_shell_dependencies
    detected_imports = await Get(
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 118, in __await__
    result = yield self
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/backend/shell/dependency_inference.py", line 106, in parse_shell_imports
    process_result = await Get(
  File "/Users/sj/Developer/oss/pants-peek/src/python/pants/engine/internals/selectors.py", line 118, in __await__
    result = yield self
native_engine.IntrinsicError: Failed to execute: Process {
    argv: [
        "./shellcheck-v0.8.0/shellcheck",
        "--format=json",
        "cargo",
    ],
    env: {},
    working_directory: None,
    input_digests: InputDigests {
        complete: DirectoryDigest {
            digest: Digest {
                hash: Fingerprint<74712eda6b804fa6f81dea6d4b7008be9e369f40d2c7c2fce92bb59ca25a9ba3>,
                size_bytes: 174,
            },
            tree: "Some(..)",
        },
        nailgun: DirectoryDigest {
            digest: Digest {
                hash: Fingerprint<e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855>,
                size_bytes: 0,
            },
            tree: "Some(..)",
        },
        inputs: DirectoryDigest {
            digest: Digest {
                hash: Fingerprint<74712eda6b804fa6f81dea6d4b7008be9e369f40d2c7c2fce92bb59ca25a9ba3>,
                size_bytes: 174,
            },
            tree: "Some(..)",
        },
        immutable_inputs: {},
        use_nailgun: {},
    },
    output_files: {},
    output_directories: {},
    timeout: None,
    execution_slot_variable: None,
    concurrency_available: 0,
    description: "Detect Shell imports for cargo",
    level: Debug,
    append_only_caches: {},
    jdk_home: None,
    cache_scope: Always,
    execution_environment: ProcessExecutionEnvironment {
        name: None,
        platform: Macos_arm64,
        strategy: Local,
    },
    remote_cache_speculation_delay: 0ns,
}

Error launching process: Os { code: 86, kind: Uncategorized, message: "Bad CPU type in executable" }
src/python/pants/backend/shell/lint/shellcheck/subsystem.py Gonna assume it's related to this:
I'll take a look at this tonight and see if I can find the ARM binaries that Brew uses
c
never seen..
w
Do you have rosetta installed?
c
don’t think so.. is it something you install intentionally so no.
w
Umm, then how is an x86 compiled binary working?
I thought this was also the same issue with Hadolint at some point. Those with ARM-only couldn't use it
l
Ack, just ran into this while playing with shell_command, And just like you reported I surprisingly got a bad cpu type for shellcheck even though my pants command shouldn't have been running it (I wasn't linting or had the shellcheck backend installed). Will investigate https://github.com/pantsbuild/pants/issues/18589
https://github.com/pantsbuild/pants/pull/19945 fixes shellcheck not working on M1