You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can reproduce this issue with Apple Clang compiled macos-x64 executable.
clang -v
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: arm64-apple-darwin21.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
./configure && make
At least Node 14 and 16 release lines are impacted.
Interestingly, the issue does not appear with arm64 executable compiled with the same toolchain.
This could become a release-critical bug, once the new Clang/Xcode versions roll in. I suggest that we re-triage this issue as zlib, confirmed-bug.
I am looking at the issue right now, and to raise attention here are some pings to recent committers to the zlib parts: @RaisinTen, @addaleax, @mscdex, @aduh95, @ronag .
Perhaps we need to apply the fix referred to in #31800 (comment) to solve this issue. But we need #33044 to land first to be able to update our copy of zlib.
Newer version of clang (tested on macOS with Xcode 13.2.1) seem to fail to generate correct code when compiling zlib/contrib/optimizations/inffast_chunk.c with -O2 or higher optimization. -O1 seems to work fine.
I can confirm that the bug no longer exists on main. So, you might close this if you want. I still need to keep my workaround in my build script for releases until all releases are fixed.
I experience this issue with clang-14, nvm, node 16.15.1, npm 8.11.0, macOS 13.3.1 (22E261). Using nvm install v16.15.1 --shared-zlib fixed the issue. npm install would fail with Error code Z_DATA_ERROR Zlib: incorrect data check -3. I followed this instructions to fix it
Activity
jesec commentedon Aug 20, 2021
Refs: vercel/pkg-fetch#208
I can reproduce this issue with Apple Clang compiled macos-x64 executable.
At least Node 14 and 16 release lines are impacted.
Interestingly, the issue does not appear with arm64 executable compiled with the same toolchain.
This could become a release-critical bug, once the new Clang/Xcode versions roll in. I suggest that we re-triage this issue as
zlib,confirmed-bug.I am looking at the issue right now, and to raise attention here are some pings to recent committers to the zlib parts: @RaisinTen, @addaleax, @mscdex, @aduh95, @ronag .
RaisinTen commentedon Aug 22, 2021
Perhaps we need to apply the fix referred to in #31800 (comment) to solve this issue. But we need #33044 to land first to be able to update our copy of zlib.
build: workaround nodejs/node#39313 for macOS
Update README.md
[readme] Describe another failure case for installing node versions f…
meta-github commentedon Jan 16, 2022
Newer version of clang (tested on macOS with Xcode 13.2.1) seem to fail to generate correct code when compiling
zlib/contrib/optimizations/inffast_chunk.cwith-O2or higher optimization.-O1seems to work fine.lpinca commentedon Nov 17, 2022
#45387 landed. I cannot reproduce on macOS with clang 14. Can this be closed?
meta-github commentedon Nov 17, 2022
Did the fix find its way into all currently supported versions of node.js?
lpinca commentedon Nov 17, 2022
#45387 is not yet included in any version.
meta-github commentedon Nov 17, 2022
I suggest to close the bug after the upstream fix has been merged into all currently supported versions of node.js.
lpinca commentedon Nov 17, 2022
Why? we usually close the issue when the fix lands on main. If the issue is fixed on main there is no reason to keep it open.
meta-github commentedon Nov 18, 2022
I can confirm that the bug no longer exists on main. So, you might close this if you want. I still need to keep my workaround in my build script for releases until all releases are fixed.
lpinca commentedon Nov 18, 2022
Thank you for the confirmation.
fabOnReact commentedon Apr 30, 2023
I experience this issue with clang-14, nvm, node 16.15.1, npm 8.11.0, macOS 13.3.1 (22E261). Using
nvm install v16.15.1 --shared-zlibfixed the issue. npm install would fail withError code Z_DATA_ERROR Zlib: incorrect data check -3. I followed this instructions to fix ittroyans9916-collab commentedon Mar 30, 2026
Exit