Skip to content

Compile Binary for Arm? #654

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

Closed
Merith-TK opened this issue May 6, 2019 · 12 comments
Closed

Compile Binary for Arm? #654

Merith-TK opened this issue May 6, 2019 · 12 comments

Comments

@Merith-TK
Copy link
Contributor

Merith-TK commented May 6, 2019

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.
@nol166
Copy link
Contributor

nol166 commented May 6, 2019

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

@Merith-TK
Copy link
Contributor Author

Thanks, let me know on any progress

also the site is saying that they arnt accepting signups?

@nol166
Copy link
Contributor

nol166 commented May 6, 2019

@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

@Merith-TK
Copy link
Contributor Author

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

@sr229
Copy link
Contributor

sr229 commented May 17, 2019

@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

@crazyquark
Copy link

crazyquark commented Jul 20, 2019

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...

@sr229
Copy link
Contributor

sr229 commented Jul 21, 2019

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).

@Merith-TK
Copy link
Contributor Author

Merith-TK commented Jul 21, 2019 via email

@crazyquark
Copy link

All right, we'll wait quietly :)

@deansheather
Copy link
Member

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.

@sr229
Copy link
Contributor

sr229 commented Jul 24, 2019

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)

@code-asher
Copy link
Member

Closing since we have #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants