Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Attempt to add ARM support #2647

Closed
wants to merge 10 commits into from
Closed

Attempt to add ARM support #2647

wants to merge 10 commits into from

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Apr 26, 2019

Building off of @ossdev07's work in #2645.

Looks like we can use drone.io as a CI service for at least
some ARM variants.

See the previous discussions in issue #1340 and PR #2253.

@xzyfer xzyfer self-assigned this Apr 26, 2019
@xzyfer xzyfer mentioned this pull request Apr 26, 2019
@xzyfer xzyfer force-pushed the arm branch 4 times, most recently from c155b57 to f574be6 Compare April 26, 2019 11:24
case 'armv7hf': return '32-bit, ARM';
case 'armv8': return '64-bit, ARM';
case 'aarch64': return '64-bit, ARM';
case 'arm64': return '64-bit, ARM';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like drone wont give us full ARM coverage. See https://docs.drone.io/reference/agent/drone-runner-arch/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, arm means 32 bit and arm64 means 64 bit.
So, it gives full arm coverage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what the distinction is between armv7l, armv7hf, aarch64? I'm not sure how they map to drone.io availability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it looks like there's a whole bunch of issues with arm detection. I'm not sure detecting the right binary is every possible.

nodejs/node#13629
nodejs/node#9491
nodejs/build#897

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @xzyfer

I can understand your problem, it could be a bit tricky to provide support for ARM

As there are 2 categories of ARM machine on the basis of their architecture,
architectures like arm,armv6, armv7, armv7l, armv7hfare 32 bit and
arm64, aarch64, armv8, armv8hf are 64 bit

Releasing the binary for both type, 32 bit and 64 bit will cover all the architectures.

Please, let me know if any more information is required.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

So there is a bit of a mix going on here, some of these are node process.arch (arm and arm64) and some of them appear to be the platform descriptions (for example as returned by linux uname).

So armv7l is little endian arm, armv7hf is hard floating point.

OTOH, its gets a bit more confusing for armv8 as that name tends to be used by linux 32-bit compatibility containers (aka running 32-bit armv7 binaries on aarch64/64 bit machine).

@xzyfer xzyfer force-pushed the arm branch 5 times, most recently from 54e5dc3 to dae3b5f Compare April 26, 2019 12:15
@xzyfer xzyfer force-pushed the arm branch 2 times, most recently from 9e95ea3 to ac52a44 Compare April 27, 2019 02:46
@xzyfer
Copy link
Contributor Author

xzyfer commented Apr 29, 2019 via email

@ossdev07
Copy link

ossdev07 commented Apr 29, 2019

Yes, the binary compiled for any 32 bit will work for all the 32-bit architectures and same works for 64 bit

@jlinton
Copy link

jlinton commented May 1, 2019

@ossdev07, this statement is likely fine for most arm environments at this point, but isn't strictly true. Particularly for older hardware platforms. Hard float little endian 32-bit binaries most definitely won't link/run in a soft float big endian environment. Even javascript passes endianess through, so its a good idea to at least consider that its possible to write javascript code that won't run on a BE arm.

Its doubtful that this is a problem for the majority of this code, the only thing I would worry about is the armv8 situation because I'm not convinced that is a 64-bit environment (could be wrong) since it generally indicates a 32-bit aarch32 container on linux.

@ossdev07
Copy link

ossdev07 commented May 6, 2019

@xzyfer When can we expect the binary for aarch64 to release?

@ossdev07
Copy link

@xzyfer Any update on the binary release.

If any help is required from my side. Please let me know.
Eagerly waiting for the release.

@ossdev07
Copy link

ossdev07 commented May 21, 2019

@xzyfer Let me know if I could help in any way.
Waiting for the aarch64 binary release.

@nschonni nschonni mentioned this pull request May 29, 2019
@ossdev07
Copy link

@xzyfer Any update?

@ossdev07
Copy link

ossdev07 commented Jul 9, 2019

@xzyfer Is there any update regarding the release of the binary for the aarch64 platform.
I could see that .travis.yml is showing conflict, but if the package runs with the latest .travis.yml there will be no issues.

It will be really good, to see the release of the binary. If any help is required from my side, please let me know.

@rhenwood-arm
Copy link

It would be useful for me to see this patch merged. @xzyfer : do you have any further feedback?

@victoryang00
Copy link

glad to see the solution on arm board in the future.

@vielmetti
Copy link

Looks like there is a conflict with .travis.yml that would block a merge.

@vielmetti
Copy link

The proposed patch would delete the .travis.yml file which is certainly not the intent, I don't think.

@rhenwood-arm
Copy link

Travis-CI have announced AArch64 support - which may render this patch redundant?

@xzyfer
Copy link
Contributor Author

xzyfer commented Nov 23, 2019

Latest work in #2783

@xzyfer xzyfer closed this Nov 23, 2019
@ossdev07
Copy link

ossdev07 commented Dec 4, 2019

@xzyfer, since we have support for AArch64 in Travis-CI now, can we have "linux-arm64-64_binding.node" binary available at:
https://github.com/sass/node-sass/releases/
It will be really good, to see the release of the binary. If any help is required from my side, please let me know.

@AndreV84
Copy link

any chance to build it on aarch64? build from sources?

@ossdev07
Copy link

@AndreV84, Yes we can build it from source code, I've tried it on my local aarch64 system, it is getting build successfully.
@xzyfer
To test it on Travis-CI we need to have "linux-arm64-64_binding.node" binary available at https://github.com/sass/node-sass/releases/.
It will be really good, to see the release of the binary. If any help is required from my side, please let me know.

@AndreV84
Copy link

  1. wget https://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-arm64.tar.xz
    untar,
    git clone
    /node-sass# npm install
    node scripts/build -f
    tail of the build log with error
    yp verb command build [] gyp verb build type Release gyp verb architecture arm64 gyp verb node dev dir /root/.node-gyp/12.16.1 gyp ERR! build error gyp ERR! stack Error: not found: make gyp ERR! stack at getNotFoundError (/node-v12.16.1/node-v12.16.1-linux-arm64/node-sass/node_modules/which/which.js:13:12) gyp ERR! stack at F (/node-v12.16.1/node-v12.16.1-linux-arm64/node-sass/node_modules/which/which.js:68:19) gyp ERR! stack at E (/node-v12.16.1/node-v12.16.1-linux-arm64/node-sass/node_modules/which/which.js:80:29) gyp ERR! stack at /node-v12.16.1/node-v12.16.1-linux-arm64/node-sass/node_modules/which/which.js:89:16 gyp ERR! stack at /node-v12.16.1/node-v12.16.1-linux-arm64/node-sass/node_modules/isexe/index.js:42:5 gyp ERR! stack at /node-v12.16.1/node-v12.16.1-linux-arm64/node-sass/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqCallback.oncomplete (fs.js:166:21) gyp ERR! System Linux 4.9.140-tegra gyp ERR! command "/usr/local/bin/node" "/node-v12.16.1/node-v12.16.1-linux-arm64/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /node-v12.16.1/node-v12.16.1-linux-arm64/node-sass gyp ERR! node -v v12.16.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1

@vegerot
Copy link

vegerot commented Sep 15, 2020

This is a big issue to us trying to use GitLab Runners on a Raspberry Pi

@maltebeckmann
Copy link

This is a big issue to us trying to use GitLab Runners on a Raspberry Pi

Yeah, just stalled my Pi projects too.

@vielmetti
Copy link

@vegerot @maltebeckmann There is a compatible alternative to node-sass, called dart-sass. I'm trying to figure out if this is an easier path forward.

@nrgapple
Copy link

nrgapple commented Dec 2, 2020

@vielmetti is dart-sass the same thing? can I just change the node-sass dependency to dart-sass?

@vielmetti
Copy link

@nrgapple I haven't tested yet but its' supposed to be a drop-in replacement

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

Successfully merging this pull request may close these issues.

10 participants