You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
murgatroid99 opened this issue
Aug 22, 2016
· 3 comments
Labels
addonsIssues and PRs related to native addons.buildIssues and PRs related to build files or the CI.caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.
Platform:Linux <hostname redacted> 3.13.0-87-generic #133-Ubuntu SMP Tue May 24 18:32:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
The ares.h file in the Node header distribution (the one that node-gyp downloads) contains symbols that are not dynamically exported by the Node binary. For example, ares_gethostbyname appears in that header file, but objdump -T $(which node) shows that that symbol appears nowhere in the dynamic symbol table. Because of this, I can build a native addon using that header without errors, but have it fail to find the symbol when I load it.
The text was updated successfully, but these errors were encountered:
I don't think it's intentional that c-ares symbols are visible, we should probably tighten up our link step so people don't run into issues like yours. If you want to use c-ares, your best bet is to vendor it with your add-on.
If symbols are not supposed to be visible, then those headers shouldn't be there. node-gyp automatically includes that headers directory in the include path, so any headers there override any vendored headers.
I've had similar issues in the past with OpenSSL. On Windows, for example, the OpenSSL headers are provided but the symbols are not available (#4932), so awkward workarounds are needed to compile against any vendored OpenSSL (or drop in replacement) whose headers aren't identical to those provided by Node.
mscdex
added
the
cares
Issues and PRs related to the c-ares dependency or the cares_wrap binding.
label
Aug 22, 2016
addonsIssues and PRs related to native addons.buildIssues and PRs related to build files or the CI.caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.
Linux <hostname redacted> 3.13.0-87-generic #133-Ubuntu SMP Tue May 24 18:32:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
The
ares.h
file in the Node header distribution (the one that node-gyp downloads) contains symbols that are not dynamically exported by the Node binary. For example,ares_gethostbyname
appears in that header file, butobjdump -T $(which node)
shows that that symbol appears nowhere in the dynamic symbol table. Because of this, I can build a native addon using that header without errors, but have it fail to find the symbol when I load it.The text was updated successfully, but these errors were encountered: