Skip to content
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 uses some current process information even when a target version is supplied #1004

Closed
murgatroid99 opened this issue Aug 3, 2016 · 4 comments

Comments

@murgatroid99
Copy link

When running node-gyp configure, the config.gypi file is generated from process.configure. This is done even if a --target=<version> argument is passed, which is incorrect.

For example, the Linking to OpenSSL guide says that the node_shared_openssl variable indicates whether to compile against Node's OpenSSL headers. In addition, the node_module_version variable contains the Node ABI version. Clearly, both of those (and the rest of the configuration) should depend on their value for the target version.

@jpambrun
Copy link

jpambrun commented Nov 7, 2017

Is there a workaround for that? node_shared_openssl, node_shared_zlib, node_module_version, etc are all wrong.

@rvagg
Copy link
Member

rvagg commented Jun 20, 2019

closing due to staleness, but it'd be great to get a pull request to address any outstanding issues here, happy to discuss further around code

@rvagg rvagg closed this as completed Jun 20, 2019
@murgatroid99
Copy link
Author

I just encountered a different problem that I believe is caused by this same bug. When I try to build for Node 14 using Node 12, I see this error: "gyp: name 'v8_enable_pointer_compression' is not defined while evaluating condition 'v8_enable_pointer_compression == 1' in binding.gyp while trying to load binding.gyp"

That condition does not appear anywhere in my own binding.gyp, so I assume that it comes from common.gypi or something. v8_enable_pointer_compression is defined in process.config.variables in Node 14, but not in Node 12.

If I am interpreting this right, that means that as a result of this bug, no binary for Node 14 or later can be built on Node 12 or earlier.

@richardlau
Copy link
Member

@murgatroid99 thanks for reporting. This is an oversight of nodejs/node#30463. I've raised nodejs/node#33688 to fix.

corbinu pushed a commit to corbinu/couchnode that referenced this issue Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants