-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
deps: update zlib to upstream 5edb52d4 #47151
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
Conversation
We currently have two copies of Chromium's zlib: one in deps/zlib and
another in deps/v8/third_party/zlib. This has a couple of disadvantages:
1. There is an additional cost to keeping both dependencies up-to-date,
and in fact they were already out-of-sync (see the refs).
2. People who compile with --shared-zlib (i.e. distro maintainers) will
probably not be thrilled to learn that there is still a copy of zlib
inside.
3. It's aesthetically unpleasing.
Centralize on the version in V8 rather than the one in deps, and delete
the one in deps. Basically I just copied deps/zlib/zlib.gyp to
tools/v8_gypfiles/zlib.gyp, since the former had a better build
configuration (see the refs). This approach seemed better than the
opposite approach of centralizing on deps/zlib because:
1. We would need to occasionally bump deps/zlib manually after bumping
deps/v8, which seemed annoying.
2. The maintenance steps for bumping zlib seemed more onerous than the
maintenance steps for bumping V8.
(If we would prefer the opposite approach, I actually have another patch
locally.)
One discrepancy was that V8's version of zlib had all symbols to be
prefixed with `Cr_z_` per deps/v8/third_party/zlib/chromeconf.h, which
seemed undesirable, so I added define `CHROMIUM_ZLIB_NO_CHROMECONF`
to the build to remove it. (deps/zlib handled this by just commenting
out the relevant include, but floating a patch seemed less desirable.)
I tested this on Linux with the default build and a --shared-zlib build.
I checked that the shared-zlib build correctly linked zlib according to
ldd. I would appreciate if the reviewers could suggest some other build
configurations to try.
Refs: nodejs#47145
Refs: nodejs#47151
|
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1312/ |
|
Ping @nodejs/collaborators |
|
Are the benchmarks showing a regression, or are the negative values statsiticly insignificant? |
They are statistically insignificant. |
They are statistically insignificant. There isn't any regression. |
|
FWIW there is now support for AVX-512 based CRC-32 checksum upstream but I would wait a few days before updating to https://chromium.googlesource.com/chromium/src/third_party/zlib/+/b890619bc2b193b8fbe9c1c053f4cd19a9791d92. |
Updated as described in doc/contributing/maintaining-zlib.md. Refs: nodejs#45387 (comment)
The `sed -i -- 's_^#include "chromeconf.h"_//#include "chromeconf.h"_' deps/zlib/zconf.h` command creates a `zconf.h--` backup file on macOS. Replace it with an equivalent perl one-liner so that it works on both Linux and macOS.
|
PTAL. |
mhdawson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Commit Queue failed- Loading data for nodejs/node/pull/47151 ✔ Done loading data for nodejs/node/pull/47151 ----------------------------------- PR info ------------------------------------ Title deps: update zlib to upstream 5edb52d4 (#47151) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch lpinca:update/zlib -> nodejs:main Labels zlib, author ready, needs-ci, review wanted, dependencies, commit-queue-rebase Commits 2 - deps: update zlib to upstream 5edb52d4 - doc: do not create a backup file Committers 1 - Luigi Pinca PR-URL: https://github.com/nodejs/node/pull/47151 Reviewed-By: Yagiz Nizipli Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Richard Lau Reviewed-By: Michael Dawson ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/47151 Reviewed-By: Yagiz Nizipli Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Richard Lau Reviewed-By: Michael Dawson -------------------------------------------------------------------------------- ℹ This PR was created on Sat, 18 Mar 2023 20:03:06 GMT ✔ Approvals: 4 ✔ - Yagiz Nizipli (@anonrig): https://github.com/nodejs/node/pull/47151#pullrequestreview-1371406611 ✔ - Mohammed Keyvanzadeh (@VoltrexKeyva): https://github.com/nodejs/node/pull/47151#pullrequestreview-1371408287 ✔ - Richard Lau (@richardlau) (TSC): https://github.com/nodejs/node/pull/47151#pullrequestreview-1371581122 ✔ - Michael Dawson (@mhdawson) (TSC): https://github.com/nodejs/node/pull/47151#pullrequestreview-1371856389 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2023-04-05T18:38:14Z: https://ci.nodejs.org/job/node-test-pull-request/50983/ ℹ Last Benchmark CI on 2023-04-02T17:25:15Z: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1312/ - Querying data for job/node-test-pull-request/50983/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/4627449295 |
Updated as described in doc/contributing/maintaining-zlib.md. Refs: #45387 (comment) PR-URL: #47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
The `sed -i -- 's_^#include "chromeconf.h"_//#include "chromeconf.h"_' deps/zlib/zconf.h` command creates a `zconf.h--` backup file on macOS. Replace it with an equivalent perl one-liner so that it works on both Linux and macOS. PR-URL: #47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
|
Landed in 0e79635...509b1eb. |
Updated as described in doc/contributing/maintaining-zlib.md. Refs: #45387 (comment) PR-URL: #47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
The `sed -i -- 's_^#include "chromeconf.h"_//#include "chromeconf.h"_' deps/zlib/zconf.h` command creates a `zconf.h--` backup file on macOS. Replace it with an equivalent perl one-liner so that it works on both Linux and macOS. PR-URL: #47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Updated as described in doc/contributing/maintaining-zlib.md. Refs: #45387 (comment) PR-URL: #47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
The `sed -i -- 's_^#include "chromeconf.h"_//#include "chromeconf.h"_' deps/zlib/zconf.h` command creates a `zconf.h--` backup file on macOS. Replace it with an equivalent perl one-liner so that it works on both Linux and macOS. PR-URL: #47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Updated as described in doc/contributing/maintaining-zlib.md. Refs: nodejs#45387 (comment) PR-URL: nodejs#47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
The `sed -i -- 's_^#include "chromeconf.h"_//#include "chromeconf.h"_' deps/zlib/zconf.h` command creates a `zconf.h--` backup file on macOS. Replace it with an equivalent perl one-liner so that it works on both Linux and macOS. PR-URL: nodejs#47151 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Updated as described in doc/contributing/maintaining-zlib.md.
Refs: #45387 (comment)