Rantanen / node-mumble

Mumble client in Node.js
MIT License
155 stars 48 forks source link

Can't build package #69

Closed Jrawke closed 8 years ago

Jrawke commented 8 years ago

Hello,

I could use some advice on how to build the package. I was able to do it a few days ago, but now I'm not having any luck. I've pasted output below. I appreciate any and all help. Thanks.

Jrawke@Jrawke-ThinkPad-T61:~/Documents/testmumble$ npm install mumble

> celt@0.1.8 install /home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/celt
> node-gyp rebuild

make: Entering directory '/home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/celt/build'
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/bands.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/celt.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/cwrs.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/entcode.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/entdec.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/entenc.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/header.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/kiss_fft.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/laplace.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/mdct.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/modes.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/pitch.o
../deps/celt-0.7.1/libcelt/pitch.c: In function ‘find_best_pitch’:
../deps/celt-0.7.1/libcelt/pitch.c:71:13: warning: variable ‘score’ set but not used [-Wunused-but-set-variable]
       float score;
             ^
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/quant_bands.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/rangedec.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/rangeenc.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/rate.o
  CC(target) Release/obj.target/libcelt/deps/celt-0.7.1/libcelt/vq.o
  AR(target) Release/obj.target/deps/celt.a
  COPY Release/celt.a
  CXX(target) Release/obj.target/node-celt/src/node-celt.o
../src/node-celt.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE CeltEncoder::Encode(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/node-celt.cc:76:4: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
    auto actualBuffer = Nan::CopyBuffer(reinterpret_cast<char*>(self->compressedBuffer), compressedLength ).ToLocalChecked();
    ^
../src/node-celt.cc:76:9: error: ‘actualBuffer’ does not name a type
    auto actualBuffer = Nan::CopyBuffer(reinterpret_cast<char*>(self->compressedBuffer), compressedLength ).ToLocalChecked();
         ^
../src/node-celt.cc:79:31: error: ‘actualBuffer’ was not declared in this scope
    info.GetReturnValue().Set( actualBuffer );
                               ^
../src/node-celt.cc:73:11: warning: unused variable ‘compressedLength’ [-Wunused-variable]
    size_t compressedLength = (size_t)celt_encode( self->encoder, pcm, NULL, &(self->compressedBuffer[0]), compressedSize );
           ^
node-celt.target.mk:131: recipe for target 'Release/obj.target/node-celt/src/node-celt.o' failed
make: *** [Release/obj.target/node-celt/src/node-celt.o] Error 1
make: Leaving directory '/home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/celt/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-30-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/celt
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

> jitterbuffer@0.1.9 install /home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/jitterbuffer
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/share/node-gyp/gyp/gyp_main.py", line 9, in <module>
    load_entry_point('gyp==0.1', 'console_scripts', 'gyp')()
  File "/usr/lib/python2.7/dist-packages/gyp/__init__.py", line 547, in script_main
    return main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/gyp/__init__.py", line 540, in main
    return gyp_main(args)
  File "/usr/lib/python2.7/dist-packages/gyp/__init__.py", line 505, in gyp_main
    'cwd': os.getcwd(),
OSError: [Errno 2] No such file or directory
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-30-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/jitterbuffer
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules'
npm ERR! error rolling back  mumble@0.3.4 { [Error: ENOTEMPTY, rmdir '/home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules' }
npm ERR! celt@0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the celt@0.1.8 install script.
npm ERR! This is most likely a problem with the celt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls celt
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "mumble"
npm ERR! cwd /home/Jrawke/Documents/testmumble
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

> ref@1.1.3 install /home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref
> node-gyp rebuild

module.js:340
    throw err;
          ^
Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at [eval]:1:1
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:532:25)
    at startup (node.js:80:7)
    at node.js:902:3
gyp: Call to 'node -e "require('nan')"' returned exit status 8. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-30-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/Jrawke/Documents/testmumble/node_modules/mumble/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/Jrawke/Documents/testmumble/npm-debug.log
npm ERR! not ok code 0
Jrawke commented 8 years ago

I'd put my money on this commit breaking celt:

https://github.com/Rantanen/node-celt/commit/97764152b5dc8f777a540e35d8c763a46eb5ad9c

The auto keyword isn't supported in C++03

Rantanen commented 8 years ago

Are you able to test that giving it the proper type without the auto keyword?

Jrawke commented 8 years ago

For now I can confirm that I am able to build celt 0.1.7, but not 0.1.8.

I'll check now if declaring the type will allow it to compile.

Jrawke commented 8 years ago

Yes, it appears that was the issue. Can I make a pull request and get that change merged in?

Rantanen commented 8 years ago

Sure, if you're fast I'll merge it in and publish new npm package before heading off to bed. :)

Jrawke commented 8 years ago

Thanks. It's a one line fix, should be up in a few min

Jrawke commented 8 years ago

Thanks!