NickNaso / magick-cli

Native ImageMagick CLI for Node.js
http://www.nacios.it
Apache License 2.0
14 stars 2 forks source link

npm package failing to install #9

Closed Timmimim closed 7 years ago

Timmimim commented 7 years ago

Hey guys, sadly I currently cannot install your tool via npm. I'm running on: node v6.11.0, npm v3.10.10, node-gyp v3.6.2

The issues seem hail from ./src/magick-cli.cc, and I am thoroughly clueless in C++.

I'm getting the following error description upon npm install magick-cli:

timmimim@hal9000 ~path/to/project : npm install --save magick-cli

> magick-cli@1.0.0 install /home/timmimim/ownCloud/o2r-data/Hilfskräfte/Kühnel/Checker/erc-checker/node_modules/magick-cli
> node-gyp rebuild

make: Entering directory `/home/timmimim/ownCloud/o2r-data/Hilfskräfte/Kühnel/Checker/erc-checker/node_modules/magick-cli/build'
  CXX(target) Release/obj.target/MagickCLI/src/magick-cli.o
../src/magick-cli.cc:27:5: error: ‘mutex’ does not name a type
     mutex mc;
     ^
../src/magick-cli.cc: In member function ‘void MagickCLIManager::Execute(int, char**)’:
../src/magick-cli.cc:63:5: error: ‘lock_guard’ was not declared in this scope
     lock_guard<mutex> lk(mc);
     ^
../src/magick-cli.cc:63:16: error: ‘mutex’ was not declared in this scope
     lock_guard<mutex> lk(mc);
                ^
../src/magick-cli.cc:63:26: error: ‘mc’ was not declared in this scope
     lock_guard<mutex> lk(mc);
                          ^
../src/magick-cli.cc:63:28: error: ‘lk’ was not declared in this scope
     lock_guard<mutex> lk(mc);
                            ^
make: *** [Release/obj.target/MagickCLI/src/magick-cli.o] Error 1
make: Leaving directory `/home/timmimim/ownCloud/o2r-data/Hilfskräfte/Kühnel/Checker/erc-checker/node_modules/magick-cli/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-83-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/timmimim/ownCloud/o2r-data/Hilfskräfte/Kühnel/Checker/erc-checker/node_modules/magick-cli
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 4.4.0-83-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "magick-cli"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! magick-cli@1.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the magick-cli@1.0.0 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the magick-cli 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 information on how to open an issue for this project with:
npm ERR!     npm bugs magick-cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls magick-cli
npm ERR! There is likely additional logging output above.

Sorry for the long message, but can you help me out? Thanks!

Kind regards, Timm

NickNaso commented 7 years ago

Hi @Timmimim, the problem is in the binding.gyp file. It's a configuration file that allow to compile native code. Please to reproduce the error could tell me which linux distribution and c++ compiler version are you using? To obtain the compiler version use this command gcc -v Thanks Nick

Timmimim commented 7 years ago

Hey @NickNaso , thanks! I'm using gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) on Ubuntu 14.04LTS. Kind regards, Timm

NickNaso commented 7 years ago

Hi @Timmimim, sorry for the late. I found the problem and solved it. Now all seem compile well on linux. I attach my test on ubuntu. I want just remember that the supported version of ImageMagick start from 7.0.1 magick-cli-ubuntu For now i clode the issue but if you have any other problems please feel free to reopen it. Have a nice work, Nick

Timmimim commented 7 years ago

Hey @NickNaso, works perfectly fine now, thanks a lot!!