-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error installing - ../src/GNConstants.cpp:239:32: error: ‘GETDNS_RCODE_COOKIE’ #38
Comments
@FrancisTurner: I can confirm the issue; there is a breaking constant name change in |
Thanks for the fix. I'll try and confirm that it works but it may take some time as I'm not very familiar with locally overiding npm etc. |
@FrancisTurner: no rush, the Primer on local NPM package linking ("locally overriding npm"). # NOTE: your local clone of getdns-node.
cd getdns-node
# NOTE: see (re)building against the latest getdns according to instructions in #39.
# NOTE: you may not need to supply paths if you installed the built getdns in your system.
LIBRARY_PATH="/your/getdns/build" CPLUS_INCLUDE_PATH="/your/getdns/build" npm run --silent rebuild
# NOTE: enable linking to the package under development in $PWD. It is considered "temporary", and should be unlinked when done.
# NOTE: may need to provide the same paths as for a build.
LIBRARY_PATH="/your/getdns/build" CPLUS_INCLUDE_PATH="/your/getdns/build" npm link
# NOTE: your local application under development, which depends on getdns-node.
cd my-appplication
# NOTE: link to the temporary getdns-node under development.
npm link getdns-node Clean up links after testing to avoid issues later. # NOTE: in getdns-node.
# NOTE: changes in npm v7 may require the --global flag.
npm unlink
# NOTE: in my-application.
# NOTE: may (unexpectedly?) affect package.json in npm v7.
npm unlink getdns-node See
(Didn't know that Just discovered that there were (unintentional?) breaking changes to linking in |
@FrancisTurner: I almost forgot, you can also point NPM directly to a branch on Github. This should be easier than Update the dependency in your application's {
"dependencies": {
"getdns": "github:joelpurra/getdns-node#feature/bad-cookie"
}
} You can also run For a custom LIBRARY_PATH="/your/getdns/build" CPLUS_INCLUDE_PATH="/your/getdns/build" npm install 'github:joelpurra/getdns-node#feature/bad-cookie' See |
@FrancisTurner: FYI, merged and released the fix as npm install getdns@latest |
built and installed getdns
then npm install --save getdns
After a number of warnings about things being deprecated compilation fails with
CXX(target) Release/obj.target/getdns/src/GNConstants.o ../src/GNConstants.cpp: In static member function ‘static void GNConstants::Init(v8::Local<v8::Object>)’: ../src/GNConstants.cpp:239:32: error: ‘GETDNS_RCODE_COOKIE’ was not declared in this scope; did you mean ‘GETDNS_RCODE_BADCOOKIE’? 239 | SetConstant("RCODE_COOKIE",GETDNS_RCODE_COOKIE,exports); | ^~~~~~~~~~~~~~~~~~~ | GETDNS_RCODE_BADCOOKIE make: *** [getdns.target.mk:113: Release/obj.target/getdns/src/GNConstants.o] Error 1 make: Leaving directory '/home/francis/src/resolv/node_modules/getdns/build' gyp ERR! build error gyp ERR! stack Error:
make` failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.4.0-72-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/francis/src/resolv/node_modules/getdns
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN resolv@1.0.0 No description
npm WARN resolv@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! getdns@4.0.0 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the getdns@4.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/francis/.npm/_logs/2021-05-11T11_49_44_685Z-debug.log
`
The text was updated successfully, but these errors were encountered: