Navigation Menu

Skip to content
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

gRPC not building with electron-rebuild #8260

Closed
rllola opened this issue Oct 2, 2016 · 4 comments
Closed

gRPC not building with electron-rebuild #8260

rllola opened this issue Oct 2, 2016 · 4 comments
Assignees

Comments

@rllola
Copy link

rllola commented Oct 2, 2016

I am trying to use grpc with electron. It looks like to me that there is some incompatibility between the already build grpc node module which use openSSL and electron which use boringSSL like describe in issue #6138. Apparently no one has found a solution that is working.

After reading issue #6531 I tried using electron-rebuild but it looks like it still not want to compile and I now have this error :

../src/node/ext/call.cc:625:19: warning: ‘v8::Local<v8::Object> v8::Function::NewInstance(int, v8::Local<v8::Value>*) const’ is deprecated (declared at /home/lola/Workspace/project-client/node_modules/electron-rebuild/lib/headers/.node-gyp/iojs-1.4.1/deps/v8/include/v8.h:3282): Use maybe version [-Wdeprecated-declarations]
         argc, argv);
                   ^
make: *** [Release/obj.target/grpc_node/src/node/ext/call.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/lola/.npm-packages/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.13.0-74-generic
gyp ERR! command "/usr/bin/nodejs" "/home/lola/.npm-packages/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/lola/Workspace/project-client/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/lola/Workspace/project-client/node_modules/grpc/src/node/extension_binary"
gyp ERR! cwd /home/lola/Workspace/project-client/node_modules/grpc
gyp ERR! node -v v6.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /home/lola/.npm-packages/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/lola/Workspace/project-client/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/home/lola/Workspace/project-client/node_modules/grpc/src/node/extension_binary' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/lola/Workspace/project-client/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 3.13.0-74-generic
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/lola/Workspace/project-client/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/lola/Workspace/project-client/node_modules/grpc
node-pre-gyp ERR! node -v v6.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.29
node-pre-gyp ERR! not ok 

npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/home/lola/Workspace/project-client/node_modules/npm/bin/npm-cli.js" "rebuild" "--runtime=electron" "--target=1.4.1" "--arch=x64"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! grpc@1.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.0.0 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs grpc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls grpc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/lola/Workspace/project-client/node_modules/npm-debug.log

Process exited with code: 1
Error: Process exited with code: 1
    at ChildProcess.<anonymous> (/home/lola/Workspace/project-client/node_modules/electron-rebuild/lib/spawn.js:55:26)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

This error happened after running those command :

export npm_config_target=1.4.1
export npm_config_arch=x64
export npm_config_target_arch=x64
export npm_config_disturl=https://atom.io/download/atom-shell
export npm_config_runtime=electron
export npm_config_build_from_source=true
HOME=~/.electron-gyp npm install
./node_modules/.bin/electron-rebuild

Thanks.

@murgatroid99 murgatroid99 self-assigned this Oct 3, 2016
@murgatroid99
Copy link
Member

Thank you for reporting this. Are you sure that was the only error? The binding.gyp file explicitly tries to disable errors for deprecated declaration warnings.

@rllola
Copy link
Author

rllola commented Oct 10, 2016

Yes, it is the only error. I am not sure how electron-rebuild works so I cannot really help more on this. I have seen also on a more recent issues that you're trying to create a compile version for electron. If it works that would then fix my issue.

I am still trying to get to understand grpc on the server side. I am having a hard time to get the async callback working.

@murgatroid99
Copy link
Member

murgatroid99 commented Jan 26, 2017

The npm module grpc@1.1.0 should now work on electron. Make sure that you follow the instructions in the electron docs for installing native modules. You should be able to omit the line export npm_config_build_from_source=true to install the precompiled binary file for electron.

@murgatroid99
Copy link
Member

This should now work, so I am closing this issue. It can be reopened if this is still a problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants