Closed dolphin278 closed 12 years ago
Thanks for trying this.
Did you read the readme? https://github.com/chrisdew/protobuf#readme
protobuf only works on node 0.4.x and has only been tested on Ubuntu.
I'll leave this issue open and close it when protobuf works with node 0.6.x
In the meantime I'll update the packet.json file to make it impossible to install protobuf on 0.6.x
All the best,
Chris.
Thank you for your answer.
Hi I managed to get this compiling for Mac OS X 10.6.x with node 0.6.x It is because of changes to eio_custom function deployed with node. Also node is looking for eio.h in the same directory however this file is located in uv-private directory under node includes so copying this header to the parent directory solves the problem.
For the compile issue, Run method on line 593 needs to be void instead of returning int.
However I still don't know how to covert this into nodejs module.
Any ideas?
There is a new version of protobuf on npm now - http://search.npmjs.org/#/protobuf . I've tested that it works with Node 0.6.9 on Ubuntu. Could you have a look with OSX please?
I'm trying to get this to work right now on OSX node v0.6.14.
Example is failing:
[4/7] cxx: example/protoservice.cc -> build/Release/example/protoservice_3.o In file included from ../example/protoservice.cc:18: ../example/protoservice.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is ../example/protoservice.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update ../example/protoservice.pb.h:14:2: error: #error your headers. In file included from ../example/protoservice.pb.cc:4: ../example/protoservice.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is ../example/protoservice.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update ../example/protoservice.pb.h:14:2: error: #error your headers. In file included from ../example/protoservice.pb.cc:4: ../example/protoservice.pb.h: In member function ‘void pwd::Entry::clear_name()’: ../example/protoservice.pb.h:412: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’ ...
Disabling the example gives the next error:
../protobuf_for_node.cc: In constructor ‘protobuf_for_node::Schema::Schema(v8::Handlev8::Object, const google::protobuf::DescriptorPool*)’: ../protobuf_for_node.cc:104: error: ‘class google::protobuf::DynamicMessageFactory’ has no member named ‘SetDelegateToGeneratedFactory’
I had an older version of protoc installed. I re-installed with 2.4.1 and had to delete protobuf module, then re-run npm install. It works for me now. Sorry about the previous 2 comments, looks like they were because of protoc 2.2.0, which is needed for objective-c.
My coworker had the problem with "Unable to load shared library
Hi Kennberg,
Would you mind spending a couple of minutes editing the project's README.md to provide some notes for OSX users?
(You can now fork-and-edit online with Github, and they make it really easy to send me a pull request.)
Thanks,
Chris.
On 27 April 2012 07:55, kennberg reply@reply.github.com wrote:
My coworker had the problem with "Unable to load shared library
/node_modules/protobuf/build/Release/protobuf_for_node.node" on his Mac. He had to run: export DYLD_LIBRARY_PATH= /node_modules/protobuf/build/Release:/usr/local/lib:$DYLD_LIBRARY_PATH
Reply to this email directly or view it on GitHub: https://github.com/chrisdew/protobuf/issues/1#issuecomment-5375483
@kennberg - Thanks. Is this issue closed?
Yes
I've seen an export fix for this all around the interwebs. I can't say they are wrong but on my OS X install this is the correct path:
export DYLD_LIBRARY_PATH=/Users/me/node_modules/protobuf/build/Release:/usr/local/lib/node_modules/
Mac OS 10.7.2, NodeJs v0.6.6
when invoking
npm install protobuf
got following error: