bnoordhuis/node-profiler

compile error for 1.2.1 unrecognized flag to compiler

kierans opened this issue · 1 comments

$ sudo npm install -g profiler

> profiler@1.2.1 install /opt/local/lib/node_modules/profiler
> node-gyp rebuild

  ACTION binding_gyp_nprof_target_nprof Release/nprof
  SOLINK_MODULE(target) Release/nprof.node
  SOLINK_MODULE(target) Release/nprof.node: Finished
  CXX(target) Release/obj.target/profiler/profiler.o
cc1plus: error: unrecognized command line option "-arch"
make: *** [Release/obj.target/profiler/profiler.o] Error 1

(snip)

gyp ERR! System Darwin 10.8.0
gyp ERR! command "node" "/opt/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/local/lib/node_modules/profiler
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! profiler@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1

(snip)

npm ERR! System Darwin 10.8.0
npm ERR! command "/opt/local/bin/node" "/opt/local/bin/npm" "install" "-g" "profiler"
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE

Sorry, but I'm afraid that's not something I can help you with. The -arch flag is set by node-gyp, not node-profiler.

The fact that your compiler doesn't support -arch suggests it's not the gcc or clang that ships with xcode. Maybe try export CXX=g++ before running npm?