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

Nodejs 14.x doesn't compile on ARM OSX (M1) #36161

Closed
sreuter opened this issue Nov 18, 2020 · 7 comments
Closed

Nodejs 14.x doesn't compile on ARM OSX (M1) #36161

sreuter opened this issue Nov 18, 2020 · 7 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@sreuter
Copy link

sreuter commented Nov 18, 2020

  • Version: 14.15.1
  • Platform: Darwin funkhirsch.local 20.1.0 Darwin Kernel Version 20.1.0: Sun Oct 18 15:32:00 PDT 2020; root:xnu-7195.41.8~9/RELEASE_ARM64_T8101 arm64

What steps will reproduce the bug?

  1. Download latest src (14.15.1)
  2. Run ./configure
  3. Run make

Or alternative try nvm install 14 if you have nvm installed.

How often does it reproduce? Is there a required condition?

No condition required apart from trying this on a new ARM based Mac.

What is the expected behavior?

Compile succeeds, everybody happy.

What do you see instead?

Compile fails, everybody sad.

make[1]: *** No rule to make target `/Users/mtn/src/node-v14.15.1/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_quic.o', needed by `/Users/mtn/src/node-v14.15.1/out/Release/libopenssl.a'.  Stop.
make[1]: *** Waiting for unfinished jobs....
  cc -o /Users/mtn/src/node-v14.15.1/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_mcnf.o ../deps/openssl/openssl/ssl/ssl_mcnf.c '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DNDEBUG' '-DL_ENDIAN' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_BN_ASM_MONT' '-DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DVPAES_ASM' '-DECP_NISTZ256_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/System/Library/OpenSSL/"' '-DENGINESDIR="/dev/null"' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -I../deps/openssl/config -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2 -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/include -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto/include/internal  -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -MMD -MF /Users/mtn/src/node-v14.15.1/out/Release/.deps//Users/mtn/src/node-v14.15.1/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/ssl_mcnf.o.d.raw   -c
make: *** [node] Error 2
@chadbrewbaker
Copy link

chadbrewbaker commented Nov 18, 2020

See #36160 . I got it to compile on M1 but a test was broken.
--- Edit
My bad didn't see you were checking out some back port branch.

@aduh95
Copy link
Contributor

aduh95 commented Nov 18, 2020

As you can see in https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list, Apple Silicon is not supported on current release line. There are folks working on making it happen though (see nodejs/build#2474), and you may get lucky with master branch as @chadbrewbaker pointed out.

I'm closing this as there is no actionable step for now, I suggest subscribing to the other issue if you want to be kept updated.

@aduh95 aduh95 closed this as completed Nov 18, 2020
@aduh95 aduh95 added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Nov 18, 2020
@AshCripps
Copy link
Member

14.x doesnt have the require code to compile on apple silicon - and likely wont as its requires V8 8.6 which is only in 15.x and master

@adchawla
Copy link

@AshCripps : With that you mean 14.x will not be supported on Apple Silicon ever. In that case we have to wait for 16.x to use in production environments.

@aduh95
Copy link
Contributor

aduh95 commented Nov 19, 2020

@AshCripps : With that you mean 14.x will not be supported on Apple Silicon ever.

@adchawla Until Apple Silicon support gets backported to v14 – that would probably require a good chunk of work, but if someone wants to sent a PR, I'm sure they would be warmly welcomed.

@AshCripps
Copy link
Member

It's unlikely as the V8 version has breaking changes, so unless people are willing to pick out the relavent bits and back port them

@ljharb
Copy link
Member

ljharb commented Nov 20, 2020

@adchawla you can use node 15 in production environments - every version of node is stable.

frankieroberto added a commit to frankieroberto/govuk-prototype-kit that referenced this issue Mar 9, 2021
This upgrades the list of supported Node versions to include v15. This is useful as currently only version 15 is supported by Macs using the new M1 ARM chips (see nodejs/node#36161).

I've been running it locally using version 15 fine, and have [upgraded our prototype](DFE-Digital/apply-for-teacher-training-prototype#454) to node 15 running on Heroku.
zac1st1k referenced this issue in Homebrew/homebrew-core Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

6 participants