vscode-codeql-starter icon indicating copy to clipboard operation
vscode-codeql-starter copied to clipboard

fix: /lib64/ld-linux-x86-64.so.2 not found on arm64 container

Open trganda opened this issue 1 year ago • 1 comments

When open the dev container on arm machine, e.g. M1 chip mac, the following error will happen in CodeQL Extension Log

Resolving RAM settings using CodeQL CLI: resolve ram -v --log-to-stderr --format json --ram 2048...
Failed to run 'codeql version'. Reason: Checking CodeQL version failed: OrbStack ERROR: Dynamic loader not found: /lib64/ld-linux-x86-64.so.2

This usually means that you're running an x86 program on an arm64 OS without multi-arch libraries.
To fix this, you can:
  1. Use an Intel (amd64) container to run this program; or
  2. Install multi-arch libraries in this container.

This can also be caused by running a glibc executable in a musl distro (e.g. Alpine), or vice versa.

It can be fix by install an amd64 architecture libc6 package. I have added a oncreate.sh for devcontainer.json on onCreateCommand field.

trganda avatar Jun 24 '24 09:06 trganda

Thanks for your contribution and apologies for taking so long to respond. Your PR looks benign, but I haven't tried this myself, so I can't confirm it is working. Can you explain your use case a little more?

aeisenberg avatar Jul 12 '24 18:07 aeisenberg

Please reopen if this is still impacting you.

igfoo avatar Feb 21 '25 12:02 igfoo