-
-
Notifications
You must be signed in to change notification settings - Fork 30
🐛 sha3@1.x produces node-gyp deprecation warnings and/or build error on install #60
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Deprecation warnings in one version of Node.js indicate an imminent build error in a subsequent version. In some environments, warnings are treated as errors (e.g: the C compiler Two things should happen:
💡 Note: Only the latest versions of the currently supported Node.js releases are officially supported by this library. Thus, Node.js 12.3.0 is not supported and is not in scope for this issue. |
One warning appears to be caused by a newly introduced C++17 feature "over-aligned allocation" recently in May 2019:
The other appears to be a revision to the V8 API:
This is not my area of expertise, so I'd like to solicit the assistance of a seasoned C/C++ and/or Node.js add-ons developer to review and/or fix these warnings. |
The Node.js add-on examples follow the same constructor pattern for which the first (over-aligned new) warning applies. Given this warning is for what seems like a very rudimentary operation (i.e: calling a default constructor of a C++ object with no arguments), I'm surprised to have such difficulty in finding answers to how to address the warning. |
I am having this problem as well... |
The build fails for Node.js version 12.3.0 due to a regression in Node.js itself, which was fixed in 12.3.1 (nodejs/node#27804). The V8 API warning is due to the deprecation of a function, which was removed in Node.js 13, turning this warning into a build failure for version 13 and onwards. PR #68 provides a fix for this. The alignment warning points out a bug that is fixed with PR #69. |
Published fix in v1.2.4. |
Thank you for releasing the fixes so quickly! 👌 |
[EDIT - Apologies, this problem turned out to be Trusty related, please ignore.] Hi @canterberry :) Am seeing
|
@cgewecke glad you could resolve the issue on your side. The problem is the g++ version (4.8.4) shipped with trusty. Unfortunately, |
The fix in #69 introduced the dependency on @jonathan-meier If you have a fix in mind to get this to work in g++ 4.8 and 5.1+, I'd very much appreciate it! |
@cgewecke Looks like you were able to resolve the issue by removing the If possible, I would recommend upgrading to v2.x of this package, which has 100% compatibility with v1.x but is a pure JavaScript implementation with none of the build-time issues experienced with the v1.x release line. |
Thanks so much @canterberry, I will pass this along. |
@canterberry sorry for the confusion, I commented with the wrong Github user. I‘ll prepare a PR that compiles with g++ 4.8. |
@cgewecke et al, this has been fixed in the latest v1.x release, v1.2.6. |
Reported in #32 for Node.js 12.7.0 on Mac OS X.
Confirmed deprecation warnings on Linux build environment with Node.js 12.4.0, 12.5.0, 12.6.0, and 12.7.0.
Confirmed build failure on Linux build environment with Node.js 12.3.0.
Upgrading to v2.x is not an option for most use cases because the project(s) do not use the sha3 library directly, but as a transitive dependency with a fuzzy version selector for sha3@1.x, for which a forced resolution of sha3@2.x will not resolve.
The text was updated successfully, but these errors were encountered: