bengfarrell / nuimotion

Node.js wrapper for OpenNI/NiTE offering skeletal joint tracking and gestures
http://www.sweatintotheweb.com/nuimotion-for-node-js/
MIT License
74 stars 19 forks source link

Issues Building on Node 0.8.23 #2

Closed drebelox closed 10 years ago

drebelox commented 11 years ago
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/nuimotion/Main.o
  CXX(target) Release/obj.target/nuimotion/enums/EnumMapping.o
  CXX(target) Release/obj.target/nuimotion/gestures/GestureRecognizer.o
  CXX(target) Release/obj.target/nuimotion/gestures/Swipe.o
../gestures/Swipe.cpp:378:31: warning: comparison of integers of different
      signs: 'int' and 'clock_t' (aka 'unsigned long') [-Wsign-compare]
            if (_startTimeSwipeRight == clock() ) {
                ~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~
1 warning generated.
  CXX(target) Release/obj.target/nuimotion/gestures/Wave.o
  SOLINK_MODULE(target) Release/nuimotion.node
ld: library not found for -lOpenNI2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/nuimotion.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:680:10)
gyp ERR! System Darwin 12.3.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/drebelox/Desktop/nuimotion-master/src
gyp ERR! node -v v0.8.23
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
bengfarrell commented 11 years ago

I'm not able to replicate this issue. On Ubuntu, I hadn't needed to link to the library during compilation, just make sure the link is baked in to link later at runtime. I found it a different situation on Windows - but for you, since we're doing the same thing it should be fine.

Now that I've addressed the Node.js 0.10 compatibility issue in the other bug you kindly filed, I do wonder if there is a problem with the newer version of node-gyp you have installed vs an older version of Node. So perhaps if you went back to 0.10 and used branch 0.1.1, your problem would be gone. Please do let me know if you still continue to experiment.

KevinGrandon commented 11 years ago

I am seeing this same issue on Mac and node: v0.10.11

bengfarrell commented 11 years ago

I had someone contact me via my blog on how to do general compilation via OSX - it looks like there are similar problems as Windows. Namely, the libs need to be linkable and available during build time. Unfortunately I don't have a Mac available to me.

If anyone is able to alter the conditions in the binding.gyp file to include a condition for OSX which is similar to Windows, I'd much appreciate it. I believe you'll be able to follow similar instructions to whats on https://github.com/bengfarrell/nuimotion/wiki/Installation and labeled as "Windows Only".

Basically in this step, I believe Windows was kind of picky where it was linking relatively to these libraries. I think OSX might be exactly the same.

I'd be happy to update the Wiki on this repo if someone is able to get specific instructions together. Just at a little bit of a loss without a Mac in front of me.

thanks!