-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
process.arch not matching with systems arch output for ARM #9491
Comments
One problem with that though is Windows. While it has a |
I think this is still necessary. When it comes to build tasks, there are slight differences between ARM versions and you need (in best case) an integrated way to check for specific ARM versions. So this might be some sort of feature request. |
|
I think something goes wrong with This is under my Raspberry Pi 3:
|
I think its because of this: $ echo '\n' | gcc -dM -E - | grep __ARM_ARCH
#define __ARM_ARCH_ISA_ARM 1
#define __ARM_ARCH_6__ 1
#define __ARM_ARCH_ISA_THUMB 1
#define __ARM_ARCH 6 and refers to https://github.com/nodejs/node/blob/master/configure#L650-L685 |
Looking fine on my RPi3 (using Arch Linux ARM): $ uname -m
armv7l
$ node -p "process.config.variables.arm_version"
7
$ echo '\n' | gcc -dM -E - | grep __ARM_ARCH
27:#define __ARM_ARCH_ISA_ARM 1
245:#define __ARM_ARCH_PROFILE 65
292:#define __ARM_ARCH_ISA_THUMB 2
294:#define __ARM_ARCH 7
347:#define __ARM_ARCH_7A__ 1 |
I think it's due to gcc. The arm version can't be gotten from gcc. |
Maybe it's because your binary was built on armv6? |
I'm not sure. GCC is installed at the very beginning in the image of Raspbian. |
What does
|
@silverwind same with yours. Mine is RPi3 too. |
Weird, I have no idea except that maybe gcc is out of date. |
Raspbian is ARMv6+VFP2. ARMv7+ binaries don't work on it, as far as I'm aware; install Debian/armhf for that. |
@silverwind I think so too. So my suggestion is that we can't get arm version from GCC. |
I'll close this out. Per the discussion, there is no support for changing The |
The node `process.arch` variable doesn't differentiate between armv6 or armv7. Therefore we need to additionally consult `process.config.variables.arm_version` when computing the host triplet. See nodejs/node#9491 BREAKING CHANGE: The library won't find arm prebuilts from previous alphas unless the package is rebuilt.
When calling
process.arch
it returns'arm'
, which is not the expected output. I'd expectprocess.arch
to return the exact same value asuname
orarch
on my linux system returns.However I found out, that
process.config.variables.arm_version
returns the correct ARM version.But anyway: when handling with specific ARM versions, it would be helpful, if
process.arch
returned the correct architecture value, asarch
does.Console output:
This problem occured for me first, when trying to build Atom with electron-packager for my ARMv7 Debian Jessie system.
Related issues:
electron/packager#523
atom/atom#5584
The text was updated successfully, but these errors were encountered: