elad / node-imagemagick-native

ImageMagick's Magick++ bindings for NodeJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphicsMagick++-config breakage

frank-trampe opened this issue · comments

Trying to compile the native modules on Ubuntu 16.04 gives an error. gyp tries to run Magick++-config --cflags --cppflags, which returns an error since, for some reason, Magick++-config dropped the --cflags option. Would it be okay to use --cxxflags instead?

frank@Zwingli-1:/var/tmp/printerclient$ npm install imagemagick-native

> imagemagick-native@1.9.3 install /var/tmp/printerclient/node_modules/imagemagick-native
> node-gyp rebuild

Usage: GraphicsMagick++-config [--cppflags] [--cxxflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]

 For example, "example.cpp" may be compiled to produce "example" as follows:

  "c++ -o example example.cpp `GraphicsMagick++-config --cppflags --cxxflags --ldflags --libs`"
gyp: Call to 'Magick++-config --cflags --cppflags' returned exit status 1 while in binding.gyp. 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:354:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-38-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/tmp/printerclient/node_modules/imagemagick-native
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm WARN receipt_printer_bridge@0.0.0 license should be a valid SPDX license expression
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "imagemagick-native"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! imagemagick-native@1.9.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the imagemagick-native@1.9.3 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 imagemagick-native 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 imagemagick-native
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls imagemagick-native
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/tmp/printerclient/npm-debug.log

Oh. As it turns out, the tool is considered obsolete, so it was the GraphicsMagick tool rather than the ImageMagick tool running. Is there a standard work-around?

I'm also running into this issue, anyone have a fix? Makes it impossible to use in production...

I forked this library and changed the --cflags to --cxxflags, but unfortunately the install script broke horrendously. I tried!

If you have a moment, would love to get some help on this @elad!

Hello, I tried with ubuntu 16.04.1 and node 6.9.1 with ImageMagick, not GraphicsMagick, and works. The steps I follow are:

sudo apt-get install build-essential libmagick++-dev imagemagick
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick++-config /usr/local/bin/Magick++-config

This steps are equal that I use on debian jessie.
I think that this lib not support GraphicsMagick already.

@jescalan see what @cartuchogl says - he's right. This module doesn't support GM.

It's still sort of confusing that it calls a tool that Ubuntu says is provided only by GraphicsMagick. Any chance we could get a note in the documentation?

@frank-trampe definitely! care to submit a PR? :)

Done.

In ubuntu uname [-p|-m] out same, but on debian uname -p out unknow.
Also in debian strech I found that q on bin-Q16 is lowercase.

I suggest:

sudo ln -s `ls /usr/lib/\`uname -m\`-linux-gnu/ImageMagick-*/bin-?16/Magick++-config | head -n 1` /usr/local/bin/

@cartuchogl ..It fixed. Thanks