Node leveldown under Ubuntu: undefined symbol error on require #83

Closed
direvius opened this Issue Dec 13, 2013 · 8 comments

Projects

None yet

4 participants

@direvius

I have node v0.11.9 installed with nvm under Ubuntu 12.04 precise and leveldown@0.10.2 (compiled without warnings), but when I try to load leveldown I get the following error:

$ node
> require ('leveldown')
Error: /home/direvius/learn/leveldb/node_modules/leveldown/build/Release/leveldown.node: undefined symbol: _ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueEEE
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)
    at Module.require (module.js:357:17)
    at require (module.js:373:17)
    at bindings (/home/direvius/learn/leveldb/node_modules/leveldown/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/home/direvius/learn/leveldb/node_modules/leveldown/index.js:1:99)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)

This question on stackoverflow

@rvagg
Node.js LevelDB member

@direvius can you try removing it all and reinstalling please? it's possible you have a version conflict here if you're using nvm.

cd /home/direvius/learn/leveldb/
rm -rf node_modules/leveldown/ node_modules/bindings/ node_modules/nan/ # these last 2 just in case
npm install leveldown

then see how it goes after that, let us know.

@direvius

https://gist.github.com/direvius/8021026 -- doesn't work =(

direvius@direvius-ub:~/learn/leveldb$ npm list
/home/direvius/learn/leveldb
└─┬ leveldown@0.10.2
  ├── bindings@1.1.1
  └── nan@0.6.0

direvius@direvius-ub:~/learn/leveldb$ node --version
v0.11.9
direvius@direvius-ub:~/learn/leveldb$ npm --version
1.3.15

@rvagg
Node.js LevelDB member

I honestly don't know what's going on here. Works for me with exactly the same versions on Ubuntu; although I'm on 13.04 and 13.10 here so perhaps it's to do with older libc or something.
We're generally able to keep up with Node master but can't make guarantees. My best suggestion is to not use a development version of Node and stick with 0.10.x for now.
I'll fire up a 12.10 in Docker when I have time and see what result I get there.

@direvius

Yeah, it works with 0.10.23, thank you!

@Modified

I'm getting this:
Error: $PROJECT/node_modules/level/node_modules/leveldown/build/Release/leveldown.node: undefined symbol: _ZNK2v85Value6IsNullEv

Using:

  • Ubuntu 12.10
  • Node 0.10.20
  • Level 0.18.0 (levelup 0.18.2, leveldown 0.10.2)

Help?

EDIT: upgrading to Node 0.10.25 (from Ubuntu PPA) and deleting and reinstalling level, made this problem go away. I still consider this a bug, though.

@rvagg
Node.js LevelDB member

@Modified thanks for the report, the odd thing about your issue is that v8::Local<T>->IsNull() is a standard V8 method that hasn't changed since .. I have no idea, it's always been there.

I wonder if the problem here might be related to multiple versions of Node on the same machine? If you're using Node from some other source than Chris Lea's Node PPA then perhaps it's compiling against one and running against another. I really don't know but I don't believe there's anything we can do on our end about this.

In future if anyone has stuff to contribute to this thread, please paste in the full install/compile log from npm install so we can see Node/npm/node-gyp/etc. versions as they are printed out during install.

@yorkie
node: symbol lookup error: /opt/Beanstalk/tender/node_modules/leveldown/build/Release/leveldown.node: 
undefined symbol: _ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8
FunctionEEEiPNS1_INS0_5ValueEEE

The same problem is troubling me under centos and node v0.11.10, but it works in my osx10.9 and node v0.11.10. I mostly agreed on this crush in run-time is caused by node itself.

@rvagg
Node.js LevelDB member

When we get v0.11.12 I'll get my head back in to 0.11 and see if I can work out what on earth this might be. I've been unable to replicate it for myself (I'm a full-time Linux user too!) thus far.

@kkoopa kkoopa referenced this issue in nodejs/nan Mar 13, 2014
Closed

Node 0.11.12 Missing Symbols #81

@rvagg rvagg closed this May 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment