nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors compiling 14.20.0 on Apple silicon with latest xcode-tools.

keeely opened this issue · comments

Operating system and version:

MacOs 14.3.1

nvm debug output:

nvm --version: v0.39.7
$TERM_PROGRAM: Apple_Terminal
$SHELL: /bin/zsh
$SHLVL: 1
whoami: 'XXXX'
${HOME}: /Users/XXXX
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v16.0.0/bin:/opt/homebrew/opt/python@3.10/libexec/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.9 (x86_64-apple-darwin23.0)'
uname -a: 'Darwin 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020 arm64'
checksum binary: 'sha256sum'
OS version: macOS 14.3.1 23D60
awk: /usr/bin/awk, awk version 20200816
curl: /usr/bin/curl, curl 8.4.0 (x86_64-apple-darwin23.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0
wget: /opt/homebrew/bin/wget, GNU Wget 1.21.4 built on darwin22.4.0.
sed: /usr/bin/sed
cut: /usr/bin/cut
basename: /usr/bin/basename
rm: /bin/rm
mkdir: /bin/mkdir
xargs: /usr/bin/xargs
git: /usr/bin/git, git version 2.39.3 (Apple Git-145)
grep: /usr/bin/grep, grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
nvm current: v16.0.0
which node: ${NVM_DIR}/versions/node/v16.0.0/bin/node
which iojs: iojs not found
which npm: ${NVM_DIR}/versions/node/v16.0.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v16.0.0
npm root -g: ${NVM_DIR}/versions/node/v16.0.0/lib/node_modules

nvm ls output:

->      v16.0.0
default -> 16.0.0 (-> v16.0.0)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v16.0.0) (default)
stable -> 16.0 (-> v16.0.0) (default)
lts/* -> lts/iron (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.20.2 (-> N/A)
lts/hydrogen -> v18.19.1 (-> N/A)
lts/iron -> v20.11.1 (-> N/A)

How did you install nvm?

brew install, and following the instructions on the brew page.

What steps did you perform?

nvm install 14.20.0

What happened?

Compilation errors with xcode-tools 15.3 (released 6th Mar)
Working once downgrading to xcode-tools 15
Many errors such as:
../deps/v8/src/base/bit-field.h:43:29: error: integer value 3 is outside the valid range of values [0, 1] for this enumeration type [-Wenum-constexpr-conversion]

What did you expect to happen?

Successful compilation with either version of xcode-tools.

Is there anything in any of your profile files that modifies the PATH?

Yes

If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?


Note that nvm is unsupported when installed with homebrew; please install it using the only supported mechanism, the install script.

Re node 14 on an M* mac, see https://github.com/nvm-sh/nvm#:~:text=Apple%20Silicon in the readme.