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

When node is build with --fully-static option, node cannot use c++ addon. #3600

Closed
Darshanpd opened this issue Oct 30, 2015 · 1 comment
Closed
Labels
build Issues and PRs related to build files or the CI. c++ Issues and PRs that require attention from people who are familiar with C++.

Comments

@Darshanpd
Copy link

When node is compiled with --fully-static option. Node gives an error while using c++ addon as shown below,

Error: /sd/addon.node: undefined symbol: node_module_register

The issue is that even though node_module_register is present in the compiled node, since it is statically build dlopen() fails to load this symbol.

@mscdex
Copy link
Contributor

mscdex commented Oct 30, 2015

This is already noted in the wiki and is a known limitation of fully static executables.

There are some workarounds/hacks to deal with this, but they are not particularly pretty and some of them may not work for all applications/scenarios. For more detailed information, you might start by reading this discussion thread on the musl-libc mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

No branches or pull requests

3 participants