Vscode on aarch64 cannot execute binary file subprocess

  • Operating system: RHEL 8 in parallels VM on Mac M2 aarch64
    uname -m

  • SonarLint plugin version: 3.21.0

  • Programming language you’re coding in: c/c++

  • Is connected mode used: no

    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question: from the debug log

[Debug - 14:30:27.447] Execute Sensor: CFamily

[Debug - 14:30:27.447] Unpacking analyzer to: /home/sysprog/.sonarlint/work/.sonarlinttmp_10825152848968967368/17656862303940944128

[Info - 14:30:28.861] Parsing compilation database /home//user/project/build/compile_commands.json

[Debug - 14:30:29.144] Time to parse Compilation Database: 352ms

[Debug - 14:30:29.148] Probing compiler: [/usr/lib64/ccache/clang++, -x, c++, --std, c++17, -v, -dM, -E, -]

[Debug - 14:30:29.155] stdout:

[Debug - 14:30:29.155] stderr:

/home/sysprog/.sonarlint/work/.sonarlinttmp_10825152848968967368/17656862303940944128/subprocess: /home/sysprog/.sonarlint/work/.sonarlinttmp_10825152848968967368/17656862303940944128/subprocess: cannot execute binary file
[Warn - 14:30:29.155] Provided compiler is not compatible.

Invalid probe found, skip analysis of files: [/home/sysprog/RentControl/lz_hdbr/lz_pgm_h2rurgl0/src/lz_pgm_h2rurgl0.cpp]

The compiler probe ‘stdout’ is expected to contain at least one’#define’ directive:

[Info - 14:30:29.156] Subprocess(es) done in 371ms

[Info - 14:30:29.156] 0 compilation units analyzed

[Debug - 14:30:29.156] Execute Sensor: HTML

from command line executing the “file” command reveals that the executable is for the wrong architecture at path .sonarlint/work/.sonarlinttmp_10825152848968967368/17656862303940944128

file subprocess
subprocess: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=9d05d54db82f1d6e06f77557cda9e40521e6c192, for GNU/Linux 3.2.0, not stripped

I have installed several backlevel versions with the same results.

Hello @espencer,

Unfortunately, the CFamily analyzer does not support running on ARM64, even though it supports cross-compiling to ARM64 on x86_64.

It is on our backlog, so you can upvote adding support for Linux ARM64 to help to bump the priority.


1 Like