fuwaneko / node-protobuf

Google Protocol Buffers wrapper for Node.js [UNMAINTAINED]
181 stars 42 forks source link

Error trying to run on SmartOS #60

Closed SupremeTechnopriest closed 8 years ago

SupremeTechnopriest commented 8 years ago

Hello,

I was hoping you could help me resolve an issue. I'm running:

smartOS: 15.4
node: 4.2.6
npm: 2.14.12
protobuf: 2.6.1

There doesn't seem to be an issue compiling on SmartOS. Everything looks like it installs fine, but when I go to run my application it immediately crashes and throws the following error:

Error: ld.so.1: node: fatal: relocation error: file /root/project/node_modules/node-protobuf/build/Release/protobuf.node: symbol _ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE: referenced symbol not found

    at Error (native)
    at Object.Module._extensions..node (module.js:435:18)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.cls_wrapMethod [as _load] (/root/project/node_modules/newrelic/lib/shimmer.js:230:38)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at bindings (/root/project/node_modules/node-protobuf/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/root/project/node_modules/node-protobuf/protobuf.js:9:35)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.cls_wrapMethod [as _load] (/root/project/node_modules/newrelic/lib/shimmer.js:230:38)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)

I saw that some support for SmartOS was added in #46. Do you know what might be causing this?

fuwaneko commented 8 years ago

As far as I know everything on Solaris is dynamically linked, so it might be that you're compiling module with one version of protobuf and run it with another. I.e. version mismatch.

SupremeTechnopriest commented 8 years ago

Thanks for you quick response. Ill check for that.

SupremeTechnopriest commented 8 years ago

Looks like that was the issue. Thanks!