Closed
Description
What is your suggestion?
Build releases for Linux/RISC-V (64-bit).
Why do you want this feature?
The next stable version of Debian (13, aka trixie) is expected to ship with RISC-V 64-bit support.
Are there any workarounds to get this functionality today?
Do not know yet: I am trying to build code-server
in a ubuntu:20.04
image.
Are you interested in submitting a PR for this?
Maybe.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
benz0li commentedon Aug 19, 2024
Cross references:
Please upvote microsoft/vscode#206766 to add RISC-V support for
Code - OSS
.benz0li commentedon Aug 19, 2024
@sakthivel-axim Could you test one of the following release files:
THE LINUX/RISCV64 RELEASE FILES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
@code-server There will be follow-up posts on how these release files were created.
benz0li commentedon Aug 20, 2024
On a RISC-V machine1 that runs Debian unstable (sid) and has Docker installed:
Host
Dockerfile:
Build image:
docker build -t code-server-builder .
Run container:
Container
Clone
code-server
:git clone https://github.com/coder/code-server.git cd code-server
Clone
vscode
submodule:Apply patches
playwright/chromium is not (yet) available for Linux/RISC-V. And since electron [therefore] also lacks RISC-V support, https://github.com/microsoft/vscode/blob/26a90463972295bcb960b7487a7c69afa06626eb/build/azure-pipelines/oss/product-build-pr-cache-linux.yml#L62-L63 is required:
Install dependencies:
--- Build steps
Export version:
export VERSION=0.0.0
Build code-server:
ℹ️
yarn build:vscode
took several hours. The time will be measured more accurately next time.Footnotes
In my case: https://github.com/utmapp/mac.getutm.app/issues/31 (QEMU v7.2 RV64 on
AArch64
; extended to 8 cores, 16 GB RAM, 64 GB disk) ↩benz0li commentedon Aug 20, 2024
--- Release steps
Export version:
export VERSION=0.0.0
Build code-server:
Modify version:
npm version --prefix release "$VERSION"
Build release packages:
benz0li commentedon Aug 20, 2024
ℹ️ Without
command
yarn
exits withError: ERROR: Playwright does not support chromium on <unknown>
.Container logs
benz0li commentedon Aug 20, 2024
❗ This is a proof of concept (PoC). If Node.js for Debian unstable (sid) is updated to v22, this may no longer work.
The situation will become (more) stable once Debian 13 (aka trixie) is released – in summer 2025.
Footnotes
Unofficial RISC-V binaries available at https://unofficial-builds.nodejs.org ↩
benz0li commentedon Aug 20, 2024
@sakthivel-axim @karthick-govindaraj @archanox Could any of you confirm that the Linux/RISC-V releases of
code-server
mentioned in #6951 (comment) actually work?Thank you.
archanox commentedon Aug 20, 2024
@benz0li I tried the linked deb install above, and setup the service, but it didn't come up.
I'm not sure if I'm missing a step or a dependency.
benz0li commentedon Aug 20, 2024
@archanox What happens if you simply execute
/usr/bin/code-server
?archanox commentedon Aug 20, 2024
benz0li commentedon Aug 20, 2024
@archanox Thank you for the feedback.
On a AArch64 machine,
ldd /opt/code-server/lib/node
returnsOn a RISC-V machine,
ldd /opt/code-server/lib/node
returnsI will start a build1 with an unofficial Linux/RISC-V Node.js binary from https://unofficial-builds.nodejs.org/.
Maybe that produces a different result.
Time measurements:
yarn
: 44 minutes 31 secondsyarn build:vscode
: 6 hours 30 minutes 8 secondsFootnotes
Docker v27.1.2 on
x86_64
with emulators installed ↩benz0li commentedon Aug 20, 2024
On a non-'RISC-V' machine:
Dockerfile (using an unofficial Linux/RISC-V Node.js binary):
Install emulator:
# Docker CE docker run --privileged --rm tonistiigi/binfmt:master --install riscv64
# Docker Desktop docker run --privileged --rm tonistiigi/binfmt:desktop-master --install riscv64
Build image:
docker build --platform linux/riscv64 -t code-server-builder .
Run container:
benz0li commentedon Aug 21, 2024
@archanox The Linux/RISC-V releases of
code-server
have been rebuilt and uploaded (same links). Please try again.Please test whether extensions can be installed successfully. Because
yarn test:integration
returned the following error:benz0li commentedon Aug 21, 2024
Runtime requirement: libatomic1 (
debian:sid
image)ldd /opt/code-server/lib/node
1 returnsnow.
Footnotes
Using QEMU v7.2 RV64 on
AArch64
because Docker v27.1.2 onx86_64
with emulators installedexits with unknown exit code (139)
. ↩21 remaining items