-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix driver install instructions get the automatic fall back to work (1.7.0-2) #1172
Comments
@1N50MN14 -- just so I understand, the driver still works, it just doesn't use the native backend, correct? If that's the case, do the following instructions work for you -- http://rethinkdb.com/docs/guides/driver-performance/ ? |
What may be the problem is that we have in
When according to https://npmjs.org/doc/json.html, it should be:
|
@coffeemug No the driver completely failed to install with a fatal error without falling back. The only way for me to get the driver to install was to manually install libprotobuf then npm install rethinkdb again. Ideally, the installation should've printed an error message about missing libprotobuf with a notice about optional fallback. @neumino This happens regardless of node >= 0.10.0 |
Hi @1N50MN14 -- I was able to (partially) reproduce this. If libprotobuf isn't installed, running
However, if I run Would you mind taking a minute to confirm that the driver works despite the errors if libprotobuf isn't installed? |
@coffeemug Driver is working for me, but the only way to get it to install was to install libprotobuf and the dependencies needed for it to work: sudo apt-get install g++ protobuf-compiler protobuf-c-compiler libprotobuf-dev libv8-dev libgoogle-perftools-dev make libprotoc-dev default-jre libboost-dev In my case, the driver didn't install at all... I should have kept a log, sorry about that.. |
@1N50MN14 -- I think even if you don't install the protobuf dependencies, the driver will work, it just gives a confusing error message during installation. It would be helpful if you could uninstall the protobuf libraries, rethinkdb driver, and then tried to reinstall it and see if it works despite the error message. (If not, that's ok) I'll talk to @AtnNn about this tomorrow when he gets back and see what we can do about improving the error message. |
@coffeemug Yes ofcourse I'll try that, I'll also launch couple of Ubuntu instances on Joyent and give it a go there see what happens. Will report back. |
@1N50MN14 -- thanks so much for helping track this down! |
@coffeemug I think you're right, here's the output... looks like I got indeed confused: root@7b672396-8abf-47d8-b881-bef750cb784d:~# npm install rethinkdb
npm http GET https://registry.npmjs.org/rethinkdb
npm http 200 https://registry.npmjs.org/rethinkdb
npm http GET https://registry.npmjs.org/rethinkdb/-/rethinkdb-1.7.0-2.tgz
npm http 200 https://registry.npmjs.org/rethinkdb/-/rethinkdb-1.7.0-2.tgz
npm http GET https://registry.npmjs.org/node-protobuf
npm http 200 https://registry.npmjs.org/node-protobuf
npm http GET https://registry.npmjs.org/node-protobuf/-/node-protobuf-1.0.2.tgz
npm http 200 https://registry.npmjs.org/node-protobuf/-/node-protobuf-1.0.2.tgz
> node-protobuf@1.0.2 install /root/node_modules/rethinkdb/node_modules/node-protobuf
> node-gyp rebuild
gyp http GET http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz
make: Entering directory `/root/node_modules/rethinkdb/node_modules/node-protobuf/build'
CXX(target) Release/obj.target/protobuf/protobuf.o
../protobuf.cpp:7:45: fatal error: google/protobuf/dynamic_message.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/protobuf/protobuf.o] Error 1
make: Leaving directory `/root/node_modules/rethinkdb/node_modules/node-protobuf/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.6-joyent-ubuntu-12-opt
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/rethinkdb/node_modules/node-protobuf
gyp ERR! node -v v0.10.13
gyp ERR! node-gyp -v v0.10.2
gyp ERR! not ok
unbuild node-protobuf@1.0.2
npm WARN optional dep failed, continuing node-protobuf@1.0.2
rethinkdb@1.7.0-2 node_modules/rethinkdb |
Cool -- thanks for checking this! I'll talk to @AtnNn tomorrow when he gets back to see if we could make the message more clear. |
@da-z huh? |
@1N50MN14 -- Sorry about that. I did not pay close attention to the issue's title and also missed one of your comments when you say you installed libprotobuf. |
@da-z no problem, thanks anyway |
I have not found a way to make the error message more clear. |
@AtnNn -- let's talk about this today to see what (if anything) we can do. |
And by that, I mean that may be there are creative solutions here (we could just fix the docs, for example, though it isn't ideal). |
Moving this to 1.9-required since people can running into it. I talked to @AtnNn, he had some ideas (like patching npm and creating separate packages for fast and slow rethinkdb js drivers). |
@coffeemug: Here is the relevant npm issue: https://github.com/isaacs/npm/issues/3715 |
Here is another idea: remove the c++ backend from the npm package, and provide and alternative way to install it. |
@coffeemug's message was accidentally deleted. Here's what we decided to do.
|
See rethinkdb/docs#75 for the new documentation. |
i met this problem too when installing node-proto in my mac, then i re-install libprotobuf-dev by brew rather than install protobuf by source code, the error solved mystically. try `brew install protobuf'. |
Note, this problem will go away completely in 1.13 because we're dropping to protobuf API for JSON (see #1868). So no more protobuf dependencies or special installation steps for optimized backends. |
npm install rethinkdb fails with the error message:
with the error message
"../protobuf.cpp:7:45: fatal error: google/protobuf/dynamic_message.h: No such file or directory"
Should read a better error message with installation instructions for protobuf.
The text was updated successfully, but these errors were encountered: