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

Cannot build on aarch64 #44936

Closed
bkeys opened this issue Mar 2, 2018 · 20 comments
Closed

Cannot build on aarch64 #44936

bkeys opened this issue Mar 2, 2018 · 20 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) install-update VS Code installation and upgrade system issues

Comments

@bkeys
Copy link

bkeys commented Mar 2, 2018

  • VSCode Version: master
  • OS Version: Fedora 27

Steps to Reproduce:

  1. Clone the vscode repository and install the dependencies
  2. run the yarn command at the project root
    You will get the following error if you are running an aarch64 workstation:
[bkeys@localhost vscode]$ yarn
yarn install v1.5.1
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[9/13] ⠐ spdlog:   CXX(target) Release/obj.target/spdlog/src/main.o
[12/13] ⠐ electron-mksnapshot
[11/13] ⠐ oniguruma: [email protected] | linux | arm64
[8/13] ⠈ nsfw: CXX(target) Release/obj.target/nsfw/src/linux/InotifyEventLoop.o
error An unexpected error occurred: "/home/bkeys/Devel/vscode/node_modules/vscode-ripgrep: Command failed.
Exit code: 1
Command: sh
Arguments: -c node ./dist/postinstall.js
Directory: /home/bkeys/Devel/vscode/node_modules/vscode-ripgrep
Output:
@vscodebot vscodebot bot added the install-update VS Code installation and upgrade system issues label Mar 2, 2018
@octref octref assigned joaomoreno and unassigned octref Mar 2, 2018
@joaomoreno joaomoreno assigned roblourens and unassigned joaomoreno Mar 5, 2018
@roblourens
Copy link
Member

Ripgrep is not built for aarch64 - I'm guessing it should just not download and not fail the install.

Also it's annoying that yarn hides the helpful error output.

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Mar 6, 2018
@roblourens roblourens added this to the March 2018 milestone Mar 6, 2018
@bkeys
Copy link
Author

bkeys commented Mar 7, 2018

Well there shouldn't be an issue compiling ripgrep for aarch64, is this an issue I need to make with ripgrep?

@roblourens
Copy link
Member

No that's on me, we build our own for vscode. It sounds like that's just 64-bit ARM? I should be able to build that although I might not be able to test it.

@bkeys
Copy link
Author

bkeys commented Mar 7, 2018

I am fine with testing it since I have the hardware

@roblourens
Copy link
Member

Could you download the linux-aarch64 zip from here https://github.com/roblourens/ripgrep/releases/tag/0.8.1, unzip it, run rg from the command line, and tell me whether it seems to work?

@bkeys
Copy link
Author

bkeys commented Mar 10, 2018

It seems to work

[bkeys@localhost Devel]$ ./rg 
error: The following required arguments were not provided:
    <PATTERN>

USAGE:
    
    rg [OPTIONS] PATTERN [PATH ...]
    rg [OPTIONS] [-e PATTERN ...] [-f FILE ...] [PATH ...]
    rg [OPTIONS] --files [PATH ...]
    rg [OPTIONS] --type-list

For more information try --help

@bkeys
Copy link
Author

bkeys commented Mar 12, 2018

Any reason you closed this issue? I just tried to build from a clean master branch and I got the usual error:

[bkeys@localhost vscode]$ yarn
yarn install v1.5.1
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[9/13] ⠄ vscode-nsfw:    ^~~~
[8/13] ⠄ spdlog: CXX(target) Release/obj.target/spdlog/src/main.o
[10/13] ⠄ vscode-ripgrep
[7/13] ⠄ node-pty: CXX(target) Release/obj.target/pty/src/unix/pty.o
error An unexpected error occurred: "/home/bkeys/Devel/vscode/node_modules/vscode-ripgrep: Command failed.
Exit code: 1
Command: sh
Arguments: -c node ./lib/postinstall.js
Directory: /home/bkeys/Devel/vscode/node_modules/vscode-ripgrep
Output:
Downloading ripgrep failed: Error: No asset named ripgrep-0.8.1-linux-arm64.zip found".

@bkeys
Copy link
Author

bkeys commented Mar 12, 2018

It seems there are other dependencies causing trouble as well, I ran yarn a few times to see if it would repeat the error

[bkeys@localhost vscode]$ yarn
yarn install v1.5.1
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[8/13] ⠁ spdlog: CXX(target) Release/obj.target/spdlog/src/main.o
[9/13] ⠂ vscode-nsfw:    ^~~~
[12/13] ⠂ electron-mksnapshot
[11/13] ⠂ oniguruma: info using [email protected] | linux | arm64
error An unexpected error occurred: "/home/bkeys/Devel/vscode/node_modules/electron-mksnapshot: Command failed.
Exit code: 1
Command: sh
Arguments: -c node ./download-mksnapshot.js
Directory: /home/bkeys/Devel/vscode/node_modules/electron-mksnapshot
Output:
/home/bkeys/Devel/vscode/node_modules/electron-mksnapshot/download-mksnapshot.js:16
  if (error != null) throw error
                     ^

Error: Failed to find Electron v1.7.0 for linux-arm64 at https://github.com/electron/electron/releases/download/v1.7.0/mksnapshot-v1.7.0-linux-arm64.zip
    at Request.<anonymous> (/home/bkeys/Devel/vscode/node_modules/nugget/index.js:169:61)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestResponse (/home/bkeys/Devel/vscode/node_modules/request/request.js:1068:10)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:551:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
    at TLSSocket.socketOnData (_http_client.js:440:20)
    at emitOne (events.js:116:13)".

@roblourens
Copy link
Member

I renamed the zip to 'arm64' instead of 'aarch64' although I thought that they weren't quite the same thing. But it should find it now.

Electron is a bigger issue, you may have to search around or build it yourself.

@roblourens
Copy link
Member

electron/electron#5706

@bkeys
Copy link
Author

bkeys commented Mar 12, 2018

https://github.com/electron/electron/releases/

It seems like electron indeed has support for arm64, according to the log I posted it would seem like you would swap the link out and it could work. Have you tried with any of their arm64 releases?
If it's any value, I have gotten other electron apps to work on this box as well as been able to make electron apps as well.

@roblourens
Copy link
Member

I think the next one is electron-mksnapshot, which creates v8 snapshots. It sounds like they aren't publishing arm64 builds. I think vscode will work fine without it, you could try removing that dependency.

@bkeys
Copy link
Author

bkeys commented Mar 12, 2018

The build went fine until I ran into this

warning package.json: No license field
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/2] ⠈ electron
[2/2] ⠈ electron-chromedriver
[-/2] ⠈ waiting...
[-/2] ⠈ waiting...
error An unexpected error occurred: "/home/bkeys/Devel/vscode/test/smoke/node_modules/electron: Command failed.
Exit code: 1
Command: sh
Arguments: -c node install.js
Directory: /home/bkeys/Devel/vscode/test/smoke/node_modules/electron
Output:
/home/bkeys/Devel/vscode/test/smoke/node_modules/electron/install.js:48
  throw err
  ^

Error: Failed to find Electron v1.7.7 for linux-arm64 at https://github.com/electron/electron/releases/download/v1.7.7/electron-v1.7.7-linux-arm64.zip
    at Request.<anonymous> (/home/bkeys/Devel/vscode/test/smoke/node_modules/nugget/index.js:169:61)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestResponse (/home/bkeys/Devel/vscode/test/smoke/node_modules/request/request.js:1068:10)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:551:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
    at TLSSocket.socketOnData (_http_client.js:440:20)
    at emitOne (events.js:116:13)".




error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c node build/npm/postinstall.js
Directory: /home/bkeys/Devel/vscode
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/home/bkeys/Devel/vscode/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@roblourens
Copy link
Member

Oh, this is probably because we don't actually ship the electron builds from the electron repo (which has arm64 builds), we ship internal electron builds which may not build arm64. I should mention that we don't officially support arm, but try to unblock it at least.

Not sure if @Tyriar has anything to add. I guess we are building electron for arm internally, do you know whether arm64 is supported?

@Tyriar
Copy link
Member

Tyriar commented Mar 12, 2018

Our internal builds only occur when building through our own CI so you're doing an OSS build correctly, Electron 1.7.7 doesn't seem to support arm64 is the issue https://github.com/electron/electron/releases/tag/v1.7.7.

We don't support this right now so we can't help much, you might find #6442 as a useful resource (which this is a duplicate of).

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 12, 2018
@roblourens roblourens removed this from the March 2018 milestone Mar 12, 2018
@bkeys
Copy link
Author

bkeys commented Mar 13, 2018

Is there a reason vscode can't update to the newer(est) version of electron that does support arm64?

@roblourens
Copy link
Member

roblourens commented Mar 13, 2018

We are working on updating electron. It will happen eventually.

@Tyriar
Copy link
Member

Tyriar commented Mar 13, 2018

The plan is to move to Electron v1.7.12 for v1.22 and hopefully to Electron v2.0.x for v1.23

@bkeys
Copy link
Author

bkeys commented Mar 13, 2018

Is there a specific milestone that this is planned for?

@roblourens
Copy link
Member

This month is 1.22 (#45632), next month is 1.23

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) install-update VS Code installation and upgrade system issues
Projects
None yet
Development

No branches or pull requests

5 participants