-
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
TODO: use local headers if available (was: Why do headers need to be downloaded?) #1247
Comments
I have also wondered why this is necessary, cc/ @bnoordhuis |
That wouldn't work on Windows (no headers) and it's unreliable on Unices because the headers in /usr/include or /usr/local/include or wherever might not match the node binary. A simpler, robuster solution might be to simply embed the headers in the binary. |
I'm assuming here, but if node-gyp knows to fetch the node 8.1.2 headers when running on node 8.1.2 of some flavor of unix, and not to fetch them on Windows, wouldn't it be able to do the same sort of analysis and get the headers from the node binary (assuming they exist there), only if they're needed?
Is this feasible in node-gyp or does the onus fall on the node binary to provide that? |
Node would first need to bake them into the binary before node-gyp can start using them. It's not out of the question but will probably need some yak shaving first. |
While we're revving up the yak shearer, maybe something as simple as a more informative error message: |
Different yak. Pull requests welcome though, I like the idea. |
This has been a very longstanding TODO for node-gyp. The vast majority of Node installations should have headers with them now, we did a bunch of work back in late 0.10, or io.js iirc to make it consistent. All that's needed is some magic in node-gyp to find it and use the local files instead of fetching but nobody has done that work (I started it once ...). |
Just another user here: I ran into a related problem when running I can't promise much but I might work on this issue in the coming days unless there are concerns about having an environmental (or npmrc based) fallback parameter. EDIT: For my part it would already be enough if |
Lines 136 to 154 in aaf33c3
|
I try to stop the download too. I've set up |
This is an issue that has been causing me a lot of trouble lately, and it causes issues like #1230 #1231 #1232 #1234
Is there an unavoidable reason for grabbing headers from the (not 100% reliable) internet to compile a module? Isn't this just something that could be included in the node package?
The text was updated successfully, but these errors were encountered: