websockets / ws

Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js
MIT License
21.73k stars 2.42k forks source link

Doesn't build on FreeBSD #482

Closed rwestlund closed 7 years ago

rwestlund commented 9 years ago

During installation, gmake calls g++ directly. From FreeBSD 10, gcc is no longer included in the base system (switched to clang) and all ports are versioned: gcc48, g++48, etc.

randy@jorrvaskr ~/code/flagpole/web/jsmpeg % npm install ws
|
> utf-8-validate@1.0.1 install /usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
gmake: Entering directory '/usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/utf-8-validate/build'
  CXX(target) Release/obj.target/validation/src/validation.o
gmake: g++: Command not found
validation.target.mk:86: recipe for target 'Release/obj.target/validation/src/validation.o' failed
gmake: *** [Release/obj.target/validation/src/validation.o] Error 127
gmake: Leaving directory '/usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/utf-8-validate/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System FreeBSD 10.1-RELEASE-p6
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
> bufferutil@1.0.1 install /usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
gmake: Entering directory '/usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/bufferutil/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
gmake: g++: Command not found
bufferutil.target.mk:86: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed
gmake: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 127
gmake: Leaving directory '/usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/bufferutil/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System FreeBSD 10.1-RELEASE-p6
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/randy/code/flagpole/web/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm WARN optional dep failed, continuing utf-8-validate@1.0.1
npm WARN optional dep failed, continuing bufferutil@1.0.1
ws@0.7.1 ../node_modules/ws
├── options@0.0.6
└── ultron@1.0.1

After manually creating a symlink, it worked: cd /usr/bin && ln -s c++ g++

The package should call c++ instead.

lpinca commented 7 years ago

Closing this as bufferutil and utf-8-validate are no longer installed along with ws.