-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
node-gyp assumes nodejs 8 is compiled against openssl 1.0, but it might not #1415
Comments
@nodejs/delivery-channels might be interested by that kind of problem. |
|
node-gyp gets the download URL from |
Good to know. I suppose it would be up to nodejs to bundle its headers / expose a path to them somehow. |
Not sure what you mean.
I guess it could. If you want to look into that, you probably need a patch like this: diff --git a/lib/configure.js b/lib/configure.js
index bc39302..44cc472 100644
--- a/lib/configure.js
+++ b/lib/configure.js
@@ -50,6 +50,10 @@ function configure (gyp, argv, callback) {
// 'python' should be set by now
process.env.PYTHON = python
+ if (RegExp('^file://').test(release.tarballUrl)) {
+ gyp.opts.nodedir = release.tarballUrl.slice('file://'.length)
+ }
+
if (gyp.opts.nodedir) {
// --nodedir was specified. use that for the dev files
nodeDir = gyp.opts.nodedir.replace(/^~/, osenv.home()) |
I meant: if nodejs bundled/installed its headers, then node-gyp would naturally have to use them instead of downloading them. I'll try the patch. What's missing ? Tests ? |
Yep, needs tests. |
This comes back to the detect-local-headers problem that's been lingering for a long time, node-gyp should first try and find them locally before downloading them, it'd solve many problems (probably introduce a few too!) but it needs someone to put in that work. |
Ref: #1247 is where we could track local-headers work |
Hi,
the nodejs 8.11 debian (testing/sid) debian package is built against openssl 1.1.0.
When one compiles a module using directly the node-gyp debian package, it's all
right because headers are available where expected. In the module directory,
node-gyp rebuild
succeeds.When one compiles using manually installed npm 5.8.0 (and maybe olders), it pulls
its own node-gyp copy, which in turn gets nodejs headers for the installed version it
finds, but there node-gyp seems to install openssl 1.0 headers, making
npm install
fail.
You can see that behavior with @kapouer/[email protected] which will fail
to compile using openssl 1.0 headers.
The text was updated successfully, but these errors were encountered: