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

ARM packages. #6

Closed
JL2210 opened this issue Aug 27, 2018 · 55 comments
Closed

ARM packages. #6

JL2210 opened this issue Aug 27, 2018 · 55 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@JL2210
Copy link
Contributor

JL2210 commented Aug 27, 2018

I'm helping with a GPL package manager for Chromebooks, called Chromebrew. It would really help if you could also create i686 and ARM tarballs. Thank you.

@sam0x17
Copy link

sam0x17 commented Aug 28, 2018

vscode on chromebook would be amazing

@JL2210
Copy link
Contributor Author

JL2210 commented Aug 29, 2018

@sam0x17 We already have it for i686 and x86_64.

@stripedpajamas
Copy link
Member

@JL2210 there aren't any ARM tarballs for Microsoft's Visual Studio Code, are there? I didn't see any on the website. Our best case scenario right now is offering everything Microsoft offers on their website.

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 3, 2018

Well, then, could you offer 32-bit x86 packages? Microsoft offers those on their website.

@stripedpajamas
Copy link
Member

@JL2210 Yes! As noted on the README, we are looking for PRs to do just that.

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 3, 2018

OK. Also, a note on the README. 32-bit x86 and x32 are two entirely different things. X32 is a 32-bit pointer ABI for x86_64 and 32-bit x86 is purely 32-bit.

@stripedpajamas
Copy link
Member

@JL2210 good catch. How does this look?

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 3, 2018

You might add a note about X32 in there, too. Link

@stripedpajamas
Copy link
Member

Can you propose what that note would say?

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 3, 2018

I'm not entirely sure. You could say The 32-bit x86, ARM and X32 architectures are currently not supported.
I highly doubt that Microsoft will ever support the X32 ABI in VSCode.

@stripedpajamas
Copy link
Member

Ok, I will leave the note about X32 out because of the unlikelihood of MS ever supporting it. I'm leaving ARM in there because it is a build target in their guide: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#packaging

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 3, 2018

Good idea. I will probably create a PR for 32-bit x86 by the end of the day. Just a few for statements.

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 3, 2018

How's this?

@JL2210 JL2210 changed the title 32-bit and ARM packages. ARM packages. Oct 4, 2018
@JL2210
Copy link
Contributor Author

JL2210 commented Oct 4, 2018

Great. One objective of this is done. Any idea how we could create ARM packages?

@stripedpajamas
Copy link
Member

Working on it-- as it is not "officially" supported, the documentation is sparse. It looks like in the past month, they have also merged in some build scripts to support arm64, so it ought to be that if we can get cross-compilation working for arm we can get arm64 as well.

@Metaception
Copy link

Assuming I am understanding this issue correctly, this repo is dedicated to this: https://code.headmelted.com/

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 6, 2018

@Metaception: We tried that in Chromebrew. Those are Debian binaries, and they only work on Raspberry Pis and Crouton.
@stripedpajamas: It should just be as easy as adding more lines to the scripts for ARM and adding support to .travis.yml.

@435vic 435vic mentioned this issue Oct 9, 2018
@JL2210 JL2210 changed the title ARM packages. ARMv7 packages. Oct 10, 2018
@JL2210
Copy link
Contributor Author

JL2210 commented Oct 10, 2018

One more step!

@stripedpajamas stripedpajamas changed the title ARMv7 packages. ARM packages. Oct 11, 2018
@stripedpajamas
Copy link
Member

@435vic I think there is a lot of set up that has to be done in the build environment to produce good arm binaries. Take a look at https://github.com/headmelted/codebuilds and https://github.com/headmelted/cobbler (which produces the files for https://code.headmelted.com).

I will take a stab at setting up something similar in this repo but I have no way of testing the binaries. If you can do that (or @JL2210) before we merge anything in that would be great.

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 12, 2018

Just a quick comment, could you switch the Travis builds to Debian? I know that Ubuntu messes with their GTK libs.

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 12, 2018

Also, I'd be free to test them. I'd better fire up another Gentoo chroot on my desktop.

@stripedpajamas
Copy link
Member

@435vic @JL2210 I just rebuilt arm64 after setting the npm_config_arch (as per the suggestion in #42) -- can either of you see if these binaries work?

tar
deb

@435vic
Copy link

435vic commented Oct 12, 2018

Tar isn't working:
image
image
Neither is the deb:
image

I think I'm just gonna build from source...

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 23, 2018

@stripedpajamas Could you update the yarn version used? It could be an issue with that. Just install yarn from backports.

@sam0x17
Copy link

sam0x17 commented Oct 23, 2018

Shouldn't the package be using its own self-contained version of node/yarn/etc?

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 23, 2018

Yarn and node are just build systems. They aren't dependencies for the software itself. But sometimes, an old build system doesn't have the fixes a new one does, and it taints the code.

@stripedpajamas
Copy link
Member

Will work on getting that updated @JL2210

@435vic
Copy link

435vic commented Oct 24, 2018

I set up a test repository that updates yarn to 1.10.1 and builds vanilla vscode and that still didn't work, so I refiled the issue for this test repository instead of vscodium on the official microsoft repository. I hope it will soon be looked into. If you want to look at the Travis CI page, here it is.

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 27, 2018

@435vic @stripedpajamas Could it be a combination of #42 and an older node version? Also, when in the unpacked VSCodium directory, please run dbus-launch ./bin/vscodium

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 27, 2018

@stripedpajamas
Copy link
Member

@JL2210 I believe we're using the latest supported node version (supported by vscode). Their docs say >= 8.12.0, < 9.0.0.

In re: yarn, since @435vic tried building with 1.10.1 and got the same thing, I want to hear more from Microsoft.

I'm also a little confused... are we not able to somehow replicate how https://code.headmelted.com is getting these builds going?

@JL2210
Copy link
Contributor Author

JL2210 commented Oct 30, 2018

@stripedpajamas @435vic Sorry. I meant a newer Yarn version. https://code.headmelted.com/ only works in Crouton, but we want it to work in Crostini and in devmode Chrome OS, which isn't the same because they have different X displays than Crouton. Microsoft doesn't even build binaries for ARM right now. Why would they have a want or a need to support us?

@435vic
Copy link

435vic commented Oct 31, 2018

I think I finally found the issue! Just for curiosity, I checked the path of the file pty.node and it does actually exist. I ran file on it, and here is the output:

➜ file /usr/share/code-oss/resources/app/node_modules.asar.unpacked/node-pty/build/Release/pty.node
/usr/share/code-oss/resources/app/node_modules.asar.unpacked/node-pty/build/Release/pty.node: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=5eda743055b93473214eedeb4b4c7faea6952838, not stripped

The same thing happens for another module descibed in an error message:

➜ file /usr/share/code-oss/resources/app/node_modules.asar.unpacked/native-keymap/build/Release/keymapping.node
/usr/share/code-oss/resources/app/node_modules.asar.unpacked/native-keymap/build/Release/keymapping.node: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=a27a6e2f9e4b45970f0ebd19fd2c98591a092671, not stripped

x86-64 gentlemen, not arm64 or aarch64. So for some reason, even with npm_config_arch set to arm64, node-pty, keymapping.node, and others are still for some reason not downloaded as arm64. I actually have no idea why I didn't even think of the possibility of those files existing.

My hipothesis for what's happening is that when VSCode is built on arm64, modules with no arm64 releases will be built, sort of like pip, but when the repo is compiled on another architecture to arm64 the missing modules are not built for arm64, since compiling to it from a different arch is not supported (or done by default).

This is making me believe even more that this is an issue with the VSCode repo itself, not VSCodium. I'm going to update the issue upstream with these observations.

@JL2210
Copy link
Contributor Author

JL2210 commented Nov 4, 2018

Can you give a link?

@JL2210
Copy link
Contributor Author

JL2210 commented Nov 4, 2018

@435vic I found the exact problem in VSCodium, look at this code:

  elif [[ $BUILDARCH == "arm64" ]]; then
    # Use the default C / C++ compilers,
    # because some makefiles default to CC:=gcc:
    export CC=/usr/bin/cc
    export CXX=/usr/bin/c++
  fi

@stripedpajamas stripedpajamas added enhancement New feature or request help wanted Extra attention is needed labels May 28, 2019
@eine
Copy link

eine commented Jul 10, 2019

Is there any update on this? @JL2210 where is that snippet extracted from?

@JL2210
Copy link
Contributor Author

JL2210 commented Jul 11, 2019 via email

@stripedpajamas
Copy link
Member

ARM builds have not worked so far. As the architecture is not supported by MS with Visual Studio Code, this is low priority. Any contributions to this end are appreciated.

@JL2210
Copy link
Contributor Author

JL2210 commented Jul 11, 2019 via email

@JL2210
Copy link
Contributor Author

JL2210 commented Jul 11, 2019

@eine
Copy link

eine commented Jul 11, 2019

@JL2210, thanks! I was considering to use QEMU and docker (see https://github.com/dbhi/qus) as an alternative to cross-compilation. Incidentaly, that seems to be the suggested approach in the ref you posted. However, on the one hand, I am not sure if dbhi/qus would work on the Azure pipeline that this repos uses. On the other hand, I found https://github.com/headmelted/codebuilds

@stripedpajamas
Copy link
Member

As a side note, the Linux builds run in Travis, not Azure pipelines.

@bUKaneer
Copy link

Not sure if this helps but I've been trying to build vscode from source on my pi4 because current packages only work up to version 1.29. However I believe the solution to getting a successful build on or up to 1.41 is detailed in this post on stackoverflow.

@dimkr
Copy link
Contributor

dimkr commented Dec 5, 2019

Could this be related to the use of pkg-config in https://github.com/microsoft/node-native-keymap/blob/master/binding.gyp? Does it respect PKG_CONFIG_PATH, etc'?

EDIT: see microsoft/node-native-keymap#16 and https://github.com/dimkr/vscodium/pull/2, node-native-keymap can be forced to cross-build

EDIT 2: @stripedpajamas - please see https://github.com/dimkr/vscodium/pull/2, build seems to work but Travis keeps killing the job

@dimkr
Copy link
Contributor

dimkr commented Dec 9, 2019

Almost there! node-native-keymap compiles for arm64 now, https://travis-ci.org/dimkr/vscodium/jobs/622718293#L2250

@dimkr
Copy link
Contributor

dimkr commented Dec 10, 2019

ARM builds have not worked so far. As the architecture is not supported by MS with Visual Studio Code, this is low priority. Any contributions to this end are appreciated.

Please see #302

@stripedpajamas
Copy link
Member

Thanks so much for working on this @dimkr

I think we're in a place where this issue can be closed. If there are issues with the new arm builds let's open a fresh issue regarding those.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants