-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
deps: fix building with system c-ares on Linux #39739
Conversation
Maybe we should take a copy of |
This applies the patch from nodejs/node#39739. This patch has been used to ship Node 16.6.2 on Arch.
This also fixes building with system c-ares on macOS. See Homebrew/homebrew-core#83106. Thanks for the patch, @felixonmars. |
* node 16.6.2 * node: fix build with brewed c-ares This applies the patch from nodejs/node#39739. This patch has been used to ship Node 16.6.2 on Arch. Closes #83106. Co-authored-by: Carlo Cabrera <[email protected]> Signed-off-by: Carlo Cabrera <[email protected]> Signed-off-by: BrewTestBot <[email protected]>
The same problem on Alpine Linux. c-ares does not install |
Should I just copy the file to |
I think we do need notes or even a script for updating c-ares. Maybe do that in a separate PR and keep this one simple. |
The change in nodejs#39724 breaks building with system c-ares (`--shared-cares`): ``` In file included from ../src/cares_wrap.cc:25: ../src/cares_wrap.h:25:11: fatal error: ares_nameser.h: No such file or directory 25 | # include <ares_nameser.h> | ^~~~~~~~~~~~~~~~ ``` Since `ares_nameser.h` isn't available with a default system c-ares installation, let's copy it as our private header here. Tested to build fine on Arch Linux with shared c-ares.
Sorry, but in my opinion copying an internal header file from one project (c-ares) to use it in another project (Node.js) sounds like an ugly hack. To avoid special instructions on c-ares upgrade etc, the original project (c-ares) should instead make the header file (ares_nameser.h) public, promote it to an interface and start delivering it, right? In my eyes, it's an architectural issue. |
Closing as c-ares/c-ares#417 is merged now. The header should be available in next c-ares release. No changes are needed here now. |
https://nodejs.org/en/blog/release/v14.17.5/ This is a security release. See https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/ Adopt the patch from nodejs/node#39739, since Node.js does not build with a system installed c-ares without it. Security: b092bd4f-1b16-11ec-9d9d-0022489ad614 MFH: 2021Q3 Sponsored by: Miles AS
https://nodejs.org/en/blog/release/v16.6.2/ This is a security release. See https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/ Adopt the patch from nodejs/node#39739, since Node.js does not build with a system installed c-ares without it. Security: b092bd4f-1b16-11ec-9d9d-0022489ad614 MFH: 2021Q3 Sponsored by: Miles AS
https://nodejs.org/en/blog/release/v14.17.5/ This is a security release. See https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/ Adopt the patch from nodejs/node#39739, since Node.js does not build with a system installed c-ares without it. Security: b092bd4f-1b16-11ec-9d9d-0022489ad614 MFH: 2021Q3 Sponsored by: Miles AS (cherry picked from commit d361a41)
https://nodejs.org/en/blog/release/v16.6.2/ This is a security release. See https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/ Adopt the patch from nodejs/node#39739, since Node.js does not build with a system installed c-ares without it. Security: b092bd4f-1b16-11ec-9d9d-0022489ad614 MFH: 2021Q3 Sponsored by: Miles AS (cherry picked from commit 3d5b3fb)
The change in #39724 breaks building with system c-ares (
--shared-cares
):Since
ares_nameser.h
isn't available with a default system c-ares installation, let's add back the include check and use the oldarpa/nameser.h
routine instead.Tested to build fine on Arch Linux with shared c-ares.