fuwaneko / node-protobuf

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

Error when attempting to use 32 bit protobuf with node-webkit #36

Closed jamiees2 closed 10 years ago

jamiees2 commented 10 years ago

I was getting an error regarding protobuf being built for the wrong architecture, so i rebuilt protobuf with node-gyp clean configure build --verbose --arch=ia32. This however triggered another error which i can make no sense of. Help would be very much appreciated.

jamiees2 commented 10 years ago

I took another look, and adding the correct target node-gyp clean configure build --target=0.10.22 --arch=ia32 fixed this error.

However, i now get this error:

>> dyld: lazy symbol binding failed: Symbol not found: __ZN2v86String3NewEPKci
>>   Referenced from: /Users/james/projects/deildu-time/dist/DeilduTime.app/Contents/Resources/app.nw/node_modules/castv2-client/node_modules/castv2/node_modules/protobuf/build/Release/protobuf_for_node.node
>>   Expected in: dynamic lookup
>>
>> dyld: Symbol not found: __ZN2v86String3NewEPKci
>>   Referenced from: /Users/james/projects/deildu-
>> time/dist/DeilduTime.app/Contents/Resources/app.nw/node_modules/castv2-client/node_modules/castv2/node_modules/protobuf/build/Release/protobuf_for_node.node
>>   Expected in: dynamic lookup
>> Exited with code: 6.

Any ideas?

jamiees2 commented 10 years ago

Update: This error still happens even after removing node_modules and running npm install --target=0.10.22 --arch=ia32

fuwaneko commented 10 years ago

@jamiees2

node_modules/protobuf/build/Release/protobuf_for_node.node

Are you certain you use my module? Mine is called "node-protobuf", not just the "protobuf". Also, check this link to see how to install C++ Addons for Node-Webkit: https://github.com/rogerwang/node-webkit/wiki/Using-Node-modules I've tested my module and it compiles and works as intended with the method described in nw wiki.

jamiees2 commented 10 years ago

Yes, silly me :/ i just googled protobuf npm module and assumed it was this one. Sorry for the trouble, i reported this issue in the correct project.

fuwaneko commented 10 years ago

@jamiees2 No problem. Actually, I don't think they're going to check you report soon as maintainer abandoned the project and there's still no new maintainer.

jamiees2 commented 10 years ago

Yes, i noticed that. I am now working on porting castv2 to use this library instead of the other one. Thanks for your great work!

fuwaneko commented 10 years ago

@jamiees2 Let me know if I can assist.

jamiees2 commented 10 years ago

I am working on it here. https://github.com/jamiees2/node-castv2 At the moment it is untested though, since i am at work and my chromecast is at home.

jamiees2 commented 10 years ago

I just got my fork of node-castv2 working, and now i am experiencing another error:

"Uncaught Error: dlopen(/Users/james/projects/deildu-time/dist/DeilduTime.app/Contents/Resources/app.nw/node_modules/castv2-client/node_modules/castv2/node_modules/node-protobuf/build/Release/protobuf.node, 1): Symbol not found: __ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE
>>   Referenced from: /Users/james/projects/deildu-time/dist/DeilduTime.app/Contents/Resources/app.nw/node_modules/castv2-client/node_modules/castv2/node_modules/node-protobuf/build/Release/protobuf.node
>>   Expected in: flat namespace
>>  in /Users/james/projects/deildu-time/dist/DeilduTime.app/Contents/Resources/app.nw/node_modules/castv2-client/node_modules/castv2/node_modules/node-protobuf/build/Release/protobuf.node", source: /Users/james/projects/deildu-time/dist/DeilduTime.app/Contents/Resources/app.nw/node_modules/castv2-client/node_modules/castv2/node_modules/node-protobuf/node_modules/bindings/bindings.js (83)

Do you have any ideas what is causing this?

jamiees2 commented 10 years ago

Update: I got brew to compile protobuf properly brew install protobuf --universal. It now works, although i seem to be getting errors with mdns...

jamiees2 commented 10 years ago

Thank you so much for your help and this great library! I finally got this working :smile:

fuwaneko commented 10 years ago

@jamiees2 glad to hear that it works :)