grpc / homebrew-grpc

gRPC formulae repo for Homebrew
Apache License 2.0
99 stars 36 forks source link

Node installation script fails because of an npm issue #32

Open murgatroid99 opened 9 years ago

murgatroid99 commented 9 years ago

Currently, the node installation script installs the Node grpc package globally, using compiler and linker flags to make it build successfully. This would allow a package to depend on grpc using npm link grpc or npm install --link, except that issue npm/npm#7198 makes it try and fail to rebuild the package without the proper compiler and linker flags.

stanley-cheung commented 9 years ago

Just as a data point, I had been using these 2 lines to run the greeter_server.js example under grpc-common/node

CXXFLAGS=-I$BREWHOME/include LDFLAGS=-L$BREWHOME/lib npm update
LD_LIBRARY_PATH=$BREWHOME/lib nodejs greeter_server.js
murgatroid99 commented 9 years ago

I forgot about LD_LIBRARY_PATH, but I think it is actually necessary, because the Node extension is dynamically linked by default.