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

ARM64 CPU deployment support #3334

Closed
ghost opened this issue Feb 6, 2023 · 3 comments
Closed

ARM64 CPU deployment support #3334

ghost opened this issue Feb 6, 2023 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 6, 2023

...
npm info lifecycle trim-newlines@1.0.0~install: trim-newlines@1.0.0
npm info lifecycle meow@3.7.0~install: meow@3.7.0
npm info lifecycle true-case-path@1.0.3~install: true-case-path@1.0.3
npm info lifecycle tunnel-agent@0.6.0~install: tunnel-agent@0.6.0
npm info lifecycle tweetnacl@0.14.5~install: tweetnacl@0.14.5
npm info lifecycle bcrypt-pbkdf@1.0.2~install: bcrypt-pbkdf@1.0.2
npm info lifecycle sshpk@1.17.0~install: sshpk@1.17.0
npm info lifecycle core-util-is@1.0.2~install: core-util-is@1.0.2
npm info lifecycle verror@1.10.0~install: verror@1.10.0
npm info lifecycle jsprim@1.4.2~install: jsprim@1.4.2
npm info lifecycle http-signature@1.2.0~install: http-signature@1.2.0
npm info lifecycle request@2.88.2~install: request@2.88.2
npm info lifecycle wide-align@1.1.5~install: wide-align@1.1.5
npm info lifecycle gauge@2.7.4~install: gauge@2.7.4
npm info lifecycle npmlog@4.1.2~install: npmlog@4.1.2
npm info lifecycle node-gyp@3.8.0~install: node-gyp@3.8.0
npm info lifecycle node-sass@4.14.1~install: node-sass@4.14.1

> node-sass@4.14.1 install /root/npmbuilder/gd-assets-ui/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-arm64-83_binding.node
...
gyp verb command build []
gyp verb build type Release
gyp verb architecture arm64
gyp verb node dev dir /root/.node-gyp/14.15.4
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/root/npmbuilder/gd-assets-ui/node_modules/node-sass/build'
  g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/root/.node-gyp/14.15.4/include/node -I/root/.node-gyp/14.15.4/src -I/root/.node-gyp/14.15.4/deps/openssl/config -I/root/.node-gyp/14.15.4/deps/openssl/openssl/include -I/root/.node-gyp/14.15.4/deps/uv/include -I/root/.node-gyp/14.15.4/deps/zlib -I/root/.node-gyp/14.15.4/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -std=gnu++1y -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
make: g++: Not a directory
make: *** [src/libsass.target.mk:158: Release/obj.target/libsass/src/libsass/src/ast.o] Error 127
make: Leaving directory '/root/npmbuilder/gd-assets-ui/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/root/npmbuilder/gd-assets-ui/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 4.19.90-24.4.v2101.ky10.aarch64
gyp ERR! command "/usr/bin/node-v14.15.4-linux-arm64/bin/node" "/root/npmbuilder/gd-assets-ui/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /root/npmbuilder/gd-assets-ui/node_modules/node-sass
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm info lifecycle node-sass@4.14.1~postinstall: Failed to exec postinstall script
npm timing action:postinstall Completed in 622ms
npm timing stage:rollbackFailedOptional Completed in 152ms
npm timing stage:runTopLevelLifecycles Completed in 73309ms
npm WARN @vssue/vuepress-plugin-vssue@1.4.8 requires a peer of vuepress@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN vue-echarts@6.5.2 requires a peer of vue@^2.6.12 || ^3.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN vue-multiple-module@0.0.1 No repository field.
npm WARN The package worker-loader is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 75092ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-02-06T10_41_34_796Z-debug.log

According to the previous issue, it is not supported, but it is still unclear what is the reason.

Due to political reasons between mainland China and the United States, mainland China has basically fully promoted the deployment of CPUs using the ARM64 architecture, especially at the national level.

If you see this question and answer, can you give us the reasons for not doing ARM64 support? In addition, if we have to run the business under ARM64, is there any solution for relying on node-sass? thanks.

@saper
Copy link
Member

saper commented Feb 12, 2023

If you install the C++ compiler (like g++) and the libraries, it should build from source and work.

@saper saper closed this as completed Feb 12, 2023
@ghost
Copy link
Author

ghost commented Feb 13, 2023

Excuse me, can you be more specific? Do you mean that the arm64 environment is now supported?

@saper
Copy link
Member

saper commented Feb 14, 2023

The error you are seeing is caused by the fact that the machine you are installing node-sass on does not have C++ development environment installed.

node-sass team does not provide pre-built binary releases for arm64 and other platforms (check out the https://github.com/sass/node-sass/releases/tag/v8.0.0 release for example).

However, if you install C++ compiler you can build the binary extension file yourself, and distribute it to your deployments separately.

Friendly-users referenced this issue in Friendly-users/node-sass Jul 9, 2024
-----
It is inappropriate to include political and offensive content in public code repositories.

Public code repositories should be neutral spaces for collaboration and community, free from personal or political views that could alienate or discriminate against others. Political content, especially that which targets or disparages minority groups, can be harmful and divisive. It can make people feel unwelcome and unsafe, and it can create a hostile work environment.

Please refrain from adding such content to public code repositories.
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

1 participant