Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

undefined symbol: _ZN2v811HandleScopeC1Ev #3623

Closed
oddmarthon-lende opened this Issue · 14 comments

5 participants

@oddmarthon-lende

On FreeBSD v0.8.1 when loading compiled module.

Does this have something to do with the -fvisibility=hidden flag??

@TooTallNate

Is this while trying to require a native add-on module?

@oddmarthon-lende

Yes, Hiredis. I don't have to require, just go into the directory and run 'node hiredis.js'

@TooTallNate

Did you compile the add-on (and node for that matter) yourself? I've seen similar errors happen when the ABI between a node release changed, and the add-on needed to be recompiled.

@oddmarthon-lende

Yes, i compiled the v0.8.1-release branch

@TooTallNate

Ok, but then did you compile hiredis before or after compiling node?

@oddmarthon-lende

After 'npm install hiredis' many times, also tried re-compiling node after i set deps/v8/SConstruct -fvisibility=hidden to -fvisibility = default

@bnoordhuis

I'll try it myself later tonight. The error message suggests that either hiredis is compiled for the wrong node version or incompatible compilers / compiler flags were used.

@oddmarthon-lende
nm -an /usr/local/node 

lists the symbol, pipe through c++filt shows its the v8::HandleScope::HandleScope(), constructor?.

It's lists the symbol for both v0.8 and v0.6 binaries, but only v0.8 complains...

@bnoordhuis

Yes, it's HandleScope. It's most definitely exported though or we'd be drowning in bug reports by now. :-)

@bnoordhuis bnoordhuis was assigned
@bnoordhuis

Okay, I can reproduce it with v0.8.2-pre and a module of my own:

$ cd node-iconv
$ node-gyp configure build
<output snipped>
$ node test.js
/usr/home/bnoordhuis/src/node-iconv/build/Release/iconv.node: Undefined symbol "_ZN2v811HandleScopeC1Ev"

Taking ownership.

@curana

I have the same problem using node 0.8.1 (www/node-dev port).

I hope you can fix it soon.

@DavidChouinard

This issue affects us as well. (FreeBSD with node 0.8.2 from www/node-dev)

It's currently a major block at getting our production servers on v0.8.2, looking forward to development on this issue.

@bnoordhuis bnoordhuis closed this issue from a commit
@bnoordhuis bnoordhuis build: fix add-on loading on freebsd
Link with -Wl,--export-dynamic, makes symbols from the node binary visible to
binary add-ons.

Fixes "undefined symbol: _ZN2v811HandleScopeC1Ev" errors when loading add-ons
on FreeBSD and likely other BSDs.

Fixes #3623.
acbfc40
@bnoordhuis

Fixed in acbfc40. FreeBSD users, either upgrade to v0.8 HEAD or wait for the 0.8.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.