Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM64 support (linux) #2506

Closed
bobbrow opened this issue Sep 11, 2018 · 71 comments
Closed

Add ARM64 support (linux) #2506

bobbrow opened this issue Sep 11, 2018 · 71 comments

Comments

@bobbrow
Copy link
Member

bobbrow commented Sep 11, 2018

#2497 was opened as a result of missing ARM64 support on linux. Please upvote this issue if you need support for aarch64.

@xueyunquan
Copy link

xueyunquan commented Sep 12, 2018

I'd like to support this one. There are more and more aarch64 boards out there which run Desktop GUIs. Direct on-board coding & debugging would be very cool.

@SX-GitHub
Copy link

SX-GitHub commented May 5, 2019

I bet there are more than 25 people desperately want this including myself, but nobody knows a feature request is posted here.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented May 6, 2019

@SX-GitHub Yes, that is 100%. We realize that only a small fraction of users will upvote, e.g. our most upvoted feature has only 300 upvotes. This issue is pretty high on the list: https://github.com/microsoft/vscode-cpptools/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc , i.e. the 9th most upvoted for the language service features.

@weizhiyi777
Copy link

weizhiyi777 commented May 7, 2019

These days I was working on jetson tx2 board and using vscode to program. So the support of arm64 is also very helpful to me.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented May 18, 2019

@bobbrow We seem to have 2 issues tracking "ARM" -- should we consolidate it to 1? I can't tell how the upvotes are for ARM in general or just ARM64, i.e. is this issue a duplicate of #429 ?

@SX-GitHub
Copy link

SX-GitHub commented May 18, 2019

@sean-mcmanus This shouldn't be considered as duplicated. I've seen too many projects claiming support "ARM" but leave ARM64/AArch64 behind, one of the reasons is Raspberry Pis are so popular (ARMHF which is 32 bit) many developers prioritized ARMHF higher. However, virtually all newer Pi-like SBCs are ARM64, I'm also expecting the overdue Raspberry Pi 4 to be ARM64.

@sean-mcmanus sean-mcmanus added this to the On Deck milestone May 21, 2019
@sean-mcmanus sean-mcmanus added investigate This issue needs to be investigated/confirmed investigate: costing Investigate how much work is required and removed investigate This issue needs to be investigated/confirmed labels May 21, 2019
@Souldat
Copy link

Souldat commented Jun 27, 2019

Just wanted to voice my upvote for this as well. Would be really huge considering the newly added SSH remote debug / development in the latest version of visual studio code for working with systems like the raspberry pi from windows.

@alexdewar
Copy link

alexdewar commented Jul 18, 2019

I would also love to see this, so I can run VS code on my Chromebook.

@alexdewar
Copy link

alexdewar commented Jul 18, 2019

@sean-mcmannus Also, is the source code for the Microsoft.VSCode.CPP.Extension.linux binary available? I wouldn't mind trying to build the binaries for ARM64 myself.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Jul 18, 2019

@alexdewar The source code is not available -- we don't know yet how much work would be required to build for ARM64 yet.

@alexdewar
Copy link

alexdewar commented Jul 19, 2019

That's a pity. It's great that Microsoft have made VS code open source, but in this case without the source code it means we don't have the option of e.g. making a community build of this plugin. I'd really like to use VS code on my Chromebook but there wouldn't be a lot of point for me without proper C/C++ support.

@RSDuck
Copy link

RSDuck commented Jul 24, 2019

it would be great to have a general ARM64/ARMv8 intellisense mode available on all platforms for cross compiling, additionally to gcc/msvc/clang-x64.

While the x64 mode works mostly, it e.g. reports false errors, when referencing registers in inline assembler.

@TSKangetsu
Copy link

TSKangetsu commented Aug 12, 2019

really need 😢

@krisklau
Copy link

krisklau commented Sep 6, 2019

Would be great!

@SergeyIcool
Copy link

SergeyIcool commented Sep 17, 2019

It will help us a lot!)

@bobbrow bobbrow modified the milestones: On Deck, Post-v1 Sep 27, 2019
@ItaloYeltsin
Copy link

ItaloYeltsin commented Oct 1, 2019

Looking forward for this feature!

@movingChurch
Copy link

movingChurch commented Oct 16, 2019

i want that...

@ldsolano17
Copy link

ldsolano17 commented Oct 17, 2019

Looking for support as well!

@ChihweiLHBird
Copy link

ChihweiLHBird commented Nov 14, 2019

I would like to run VS Code on the surface pro x in the future. ^_^

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 12, 2020

We built a vsix that just uses our ARM binaries and it works for us when we test on the 64-bit aarch64 Raspberry Pi 4 OS -- does that seem okay or does anyone know if there's a problem that could cause it to not work in some scenarios? We could possibly release that tomorrow if anyone wants to try it earlier.

Also, does anyone really want our processes to use >2-4 GB of memory on their ARM64 devices? Our thought was that would be undesirable anyway in most cases, and on Windows we only publish a 32-bit binary so that it crashes from out of memory instead of using all the memory on the machine in cases where a rare infinite memory "leak" bug is hit.

Our aarch64/ARM64 build is hitting some failure that we're still investigating (might take a few more days).

@hamaney
Copy link

hamaney commented Aug 12, 2020

@sean-mcmanus In our process we use EC2 ARM instances for debgging/building so memory is not an issue at the development stage.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 12, 2020

We've added an aarch64 vsix at https://github.com/microsoft/vscode-cpptools/releases/tag/0.30.0-insiders2 . Let us know if anyone encounters any issues with that (particularly since the language service binaries were compiled for 32-bit armhf and not aarch64). One known issue is libtinfo5 needs to be installed for clang-format to run (#5958).

@7oud
Copy link

7oud commented Aug 13, 2020

The aarch64 vsix can not work on Jestson NX, Here are some notifications

Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Launching server using command /home/xxx/.vscode-server/extensions/ms-vscode.cpptools-0.30.0-insiders2/bin/cpptools failed.

Couldn't start client cpptools

@hamaney
Copy link

hamaney commented Aug 13, 2020

Notification

Couldn't start client cpptools
Unable to start the C/C++ language server. IntelliSense features will be disabled. 
Error: Launching server using command /home/ubuntu/.vscode-server-insiders/extensions/ms-vscode.cpptools-0.30.0-insiders2/bin/cpptools failed.

In OUTPUT

[Error - 2:31:15 AM] Starting client failed
Launching server using command 
/home/ubuntu/.vscode-server-insiders/extensions/ms-vscode.cpptools-0.30.0-insiders2/bin/cpptools failed

However, I pressed F5 and it seems to be debugging normally!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! awesome

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 13, 2020

@7oud @hamaney Thanks for letting us know -- we'll continue looking into fixing our build of cpptools/cpptools-srv for the aarch64 target. Yeah, the debugger is arm64-specific already.

@rmurphy-arm
Copy link

rmurphy-arm commented Aug 13, 2020

Note that not all AArch64 kernels will include the compat layer necessary to run 32-bit Arm binaries - I know my usual distro doesn't enable it. Also there are some CPUs out there that have no AArch32 support at all (e.g. Cavium ThunderX), so ultimately you will want a proper native AArch64 build.

@prutschman
Copy link

prutschman commented Aug 14, 2020

Launching cpptools (from 0.30.0-insiders2) on aarch64 failed for me, but not for the reason I expected.

$ $HOME/.vscode-server/extensions/ms-vscode.cpptools-0.30.0-insiders2/bin/cpptools
-bash: <home>/.vscode-server/extensions/ms-vscode.cpptools-0.30.0-insiders2/bin/cpptools: No such file or directory
$ file <...>cpptools
<...> ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-, for GNU/Linux 3.2.0, BuildID[sha1]=2ca2ba5e900189d2357bc950df7d3b9373690623, not stripped

It looks like something went wrong with the ld-linux path?

If I try invoking it directly with the platform ld-linux, then it of course fails for the expected reason. (And there's no 32-bit userland on this platform, so I can't just invoke the proper ld-linux)

$ /lib/ld-linux-aarch64.so.1 <...> cpptools
<...>/cpptools: error while loading shared libraries: <...>/cpptools: wrong ELF class: ELFCLASS32

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 14, 2020

@prutschman The binary is built for armhf and not aarch64 -- are you saying you think there's a different problem? Good news is we got our aarch64 build fixed, so we should be able to publish a new vsix some time next week.

@prutschman
Copy link

prutschman commented Aug 14, 2020

Looking forward to the aarch64 build!

It had looked like the embedded ld.so path was truncated, but I've tested a few other binaries on my system that are aarch64 (and load fine) and file also shows the same truncated path on those. So, forget I said anything.

Specifically, I was referring to this part of the output of running file cpptools:
dynamically linked, interpreter /lib/ld-, for GNU/Linux 3.2.0

@cfriedt
Copy link

cfriedt commented Aug 14, 2020

@sean-mcmanus - in general, most Linux distros do not support both armhf and Aarch64 - it's typically one or the other - simply to avoid duplicating libraries (multi-arch). The kernel will usually be compiled to support both executable formats though.

Looking forward to when I can test this out on my Acer Chromebook R13 :-)

Is there a link to official Aarch64 builds for code? I've been using headmelted, but presumably MS will be distributing an official one, no?

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 17, 2020

@cfriedt VS Code for ARM/ARM64 is being tracked by microsoft/vscode#6442 and microsoft/vscode#1031 -- I don't know what their plan is. Currently, our ARM support is only via remoting to an ARM machine from a non-ARM machine, which I suspect is not what most people requesting ARM support want. The headmelted release is currently too out-of-date since our extension requires VS Code version 1.44 or newer, and our license currently prohibits running in headmelted (not sure yet if we should try to update our license, and also our debugger will disable itself).

@alexdewar
Copy link

alexdewar commented Aug 18, 2020

@sean-mcmanus Pleeeeease update the licence 😃. VS code having a permissive license means people can do their own thing that upstream might not be interested in (e.g. independently packaging it for a distro) but it's a shame that we can't then use some of these standard extensions with it.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 18, 2020

We encourage everyone who wants to use our extension with a local ARM64 release of VS Code to upvote microsoft/vscode#6442 . It is currently number 24 on VS Code's list of upvotes and behind releasing for ipad and Windows store.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 21, 2020

We added aarch64 language service binaries with https://github.com/microsoft/vscode-cpptools/releases/tag/0.30.0-insiders3 . If you have 0.30.0-insiders2, updateChannel set to Insiders, and autoUpdate set to true, it should auto-update.

However, it has a glibc 2.28 minimum dependency, so it will only work on Ubuntu 20 or Debian 10 unless glibc is somehow updated.

Ubuntu 18 (glibc 2.27 minimum) support is planned for 0.30.0-insiders4: #5993
Ubuntu 16 or Debian 9 support is not currently planned, but you can upvote that at: #5984

@prashantjain25
Copy link

prashantjain25 commented Aug 22, 2020

The Code formatting is not working, installed ".vsix" offline.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 24, 2020

@prashantjain25 You're likely hitting #5958 . libtinfo5 needs to be installed (as a workaround).

@sean-mcmanus sean-mcmanus removed their assignment Aug 26, 2020
@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Sep 2, 2020

Ubuntu 14-18, Debian 8-9, CentOS 7 support got added with https://github.com/microsoft/vscode-cpptools/releases/tag/0.30.0-insiders4 (i.e. glibc 2.17 minimum).

@alexlamfb
Copy link

alexlamfb commented Sep 11, 2020

Successfully installed on my arm64 system with the vsix package. It works SO much better than the previous combo of plugins I was using. A+++, would buy again.

@prutschman
Copy link

prutschman commented Sep 11, 2020

Thank you! Up and running on nvidia linux4tegra on Jetson TX2 now!

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Sep 28, 2020

VS Code ARM64 support is available in the Insiders release at microsoft/vscode#106289 (comment) .

@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2020
@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Jan 21, 2021

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
1.0.0
  
Done
Development

No branches or pull requests