Code-server: Compile Binary for Arm?

Created on 6 May 2019  Â·  12Comments  Â·  Source: cdr/code-server

Description

I have a raspberry Pi 3b that I carry on me while at school, I have managed to reserve an IP for its MAC address with my school IT department (to run PHP-based web apps), but i cant use the docker image as docker itself kinda just hangs and does absolutely nothing,

Is there a way I can use this on said Raspberry Pi? I run ArchLinux Arm on it, (aarch64) and want to be able to run this program on it (preferably a binary, can compile if needed)

What would be needed to either
A) Run it
or
B) Compile a Binary for it?

This is what i get when i try to run via yarn start

[alarm@alarm code-server]$ yarn start
yarn run v1.15.2
$ cd ./packages/server && yarn start
warning package.json: No license field
warning ../package.json: No license field
$ node --max-old-space-size=32384 --require ts-node/register --require tsconfig-paths/register src/cli.ts
internal/modules/cjs/loader.js:670
    throw err;
    ^

Error: Cannot find module 'ts-node/register'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at Module._preloadModules (internal/modules/cjs/loader.js:945:12)
    at loadPreloadModules (internal/bootstrap/pre_execution.js:363:5)
    at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:61:3)
    at internal/main/run_main_module.js:11:1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
question

Most helpful comment

v2 is in the works, and should significantly reduce memory usage. We've merged ARM support into nbin, so we'll tackle ARM builds for code-server once we merge v2.

All 12 comments

Hey @Merith-TK, we are currently working on an ARM-based build for code-server but it's not quite ready yet. We will also need to trim the memory consumption before this would be practical for a Raspberry Pi. See #35

Thanks, let me know on any progress

also the site is saying that they arnt accepting signups?

@Merith-TK That is correct, sign-ups for coder.com are currently disabled at the moment. We are working on a new user-facing product for the website

Are there ways i can force it to compile for arm? I really am a newb to yarn

@Merith-TK we'll need a ARM CI, please be patient.

also we're tracking this in a same issue, so this is a duplicate of #35 and #122

I tried to cross-build but I was hit by

18 2902. INFO BUILD:SERVER:BINARY:PACKAGE Executing 'npm ["run","build:binary"]' {"options":{"cwd":"/src/packages/server"}}

18 2921. ERROR BUILD:SERVER:BINARY:PACKAGE failed {"exitCode":1,"stdout":"\n> server@ build:binary /src/packages/server\n> ts-node scripts/nbin.ts\n\n\u001b[1m\u001b[38;2;0;143;191mINFO \u001b[0mPackaged module\u001b[38;2;140;140;140m {\"module\":\"spdlog\"}\n\u001b[1m\u001b[38;2;0;143;191mINFO \u001b[0mPackaged module\u001b[38;2;140;140;140m {\"module\":\"node-pty\"}\n\u001b[1m\u001b[38;2;0;143;191mINFO \u001b[0mPackaged module\u001b[38;2;140;140;140m {\"module\":\"mkdirp\"}\n\u001b[1m\u001b[38;2;0;143;191mINFO \u001b[0mPackaged module\u001b[38;2;140;140;140m {\"module\":\"bindings\"}\n\u001b[1m\u001b[38;2;0;143;191mINFO \u001b[0mCreating node binary cache directory\n\u001b[1m\u001b[38;2;0;143;191mINFO \u001b[0mFetching\u001b[38;2;140;140;140m {\"url\":\"https://nbin.cdr.sh/1.1.2/node-10.15.1-linux-arm\"}\n","stderr":"✔ Wrote 1245 files!\n✔ Wrote 1 file!\nError: Forbidden\n at e.Binary. (/src/packages/server/node_modules/@coder/nbin/out/api.js:1:43397)\n at Generator.next ()\n at s (/src/packages/server/node_modules/@coder/nbin/out/api.js:1:40627)\n at process._tickCallback (internal/process/next_tick.js:68:7)\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! server@ build:binary: ts-node scripts/nbin.ts\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the server@ build:binary script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /root/.npm/_logs/2019-07-20T18_01_23_706Z-debug.log\n"}

18 2921. ERROR BUILD:SERVER:BINARY:PACKAGE Failed: Failed to package binary: ✔ Wrote 1245 files!

18 2921. ✔ Wrote 1 file!

18 2921. Error: Forbidden

18 2921. at e.Binary. (/src/packages/server/node_modules/@coder/nbin/out/api.js:1:43397)

18 2921. at Generator.next ()

18 2921. at s (/src/packages/server/node_modules/@coder/nbin/out/api.js:1:40627)

18 2921. at process._tickCallback (internal/process/next_tick.js:68:7)

18 2921. npm ERR! code ELIFECYCLE

18 2921. npm ERR! errno 1

18 2921. npm ERR! server@ build:binary: ts-node scripts/nbin.ts

18 2921. npm ERR! Exit status 1

18 2921. npm ERR!

18 2921. npm ERR! Failed at the server@ build:binary script.

18 2921. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

18 2921.

18 2921. npm ERR! A complete log of this run can be found in:

18 2921. npm ERR! /root/.npm/_logs/2019-07-20T18_01_23_706Z-debug.log

Giving up for now...

Like we said @crazyquark, it needs to be fixed in our end first before you can self-build it for ARM. The memory usage is also way too high to be considered ready for Raspberry 3B+ (nbin only builds for amd64, not ARM atm).

Xheesuz..

Issue number 18 just got spammed lol

On Sat, Jul 20, 2019, 8:12 PM Kibo Hikari notifications@github.com wrote:

Like we said @crazyquark https://github.com/crazyquark, it needs to be
fixed in our end first before you can self-build it for ARM. The memory
usage is also way too high to be considered ready for Raspberry 3B+ (nbin
only builds for amd64, not ARM atm).

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cdr/code-server/issues/654?email_source=notifications&email_token=ACPQOXRTVMDXV7KURWCIN5DQAPH3TA5CNFSM4HLBGX4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2N2ARQ#issuecomment-513515590,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACPQOXX75ZGFJDQL3BKZXDTQAPH3TANCNFSM4HLBGX4A
.

All right, we'll wait quietly :)

v2 is in the works, and should significantly reduce memory usage. We've merged ARM support into nbin, so we'll tackle ARM builds for code-server once we merge v2.

v2 is in the works, and should significantly reduce memory usage. We've merged ARM support into nbin, so we'll tackle ARM builds for code-server once we merge v2.

(ARM Builds are still broken btw, working on it to fix everything else)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

korzq picture korzq  Â·  3Comments

broady picture broady  Â·  3Comments

pchecinski picture pchecinski  Â·  3Comments

grant picture grant  Â·  3Comments

lshamis picture lshamis  Â·  3Comments