install on OSX, with imageMagick 6.9.2-7
ainthek opened this issue · comments
brew uninstall --force imagemagick
brew install imagemagick
identify --version
prints:
Version: ImageMagick 6.9.2-7 Q16 x86_64 2015-11-29 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.2-7/lib/pkgconfig/
# just in case
export PATH=$PATH:/usr/local/Cellar/imagemagick/6.9.2-7/lib/pkgconfig/
# install
npm install imagemagick-native
# no errors
cd node_modules/imagemagick-native/
npm install
npm run test
# fails:
image magick's version is: 6.9.2
test/test.js dyld: lazy symbol binding failed: Symbol not found: __ZN6Magick5Image6magickERKSs
Referenced from: .../node_modules/imagemagick-native/build/Release/imagemagick.node
Expected in: dynamic lookup
dyld: Symbol not found: __ZN6Magick5Image6magickERKSs
Referenced from: .../node_modules/imagemagick-native/build/Release/imagemagick.node
Expected in: dynamic lookup
Thanx for help
node --version
v5.0.0
sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.3
BuildVersion: 15D21
pull request #121 should fix your problem, in binding.gyp is missing case for 10.11 (see git comment). They changed default from libc++ to libstdc++ with version OSX 10.9. In build there is check only for 10.9 and 10.10, but there is missing check for newer version OSX 10.11 and higher.
Here #17 is reported the same issue for OSX 10.9
Thanx will try, in the mean time: monkey patching original tarball:
npm uninstall imagemagick-native
donwload and extract do not install
mkdir _; curl $(npm view imagemagick-native dist.tarball) | tar -x -C _
monkey patch (how to do 'greater then' in gyp ?)
xs-sed -i 's;( or OSX_VER == "10.10");\1 or OSX_VER == "10.11";' _/package/binding.gyp
see readme.md
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.2-7/lib/pkgconfig/
just in case
export PATH=$PATH:/usr/local/Cellar/imagemagick/6.9.2-7/lib/pkgconfig/
now install patched version
npm install --save _/package/
now test patched version
cd node_modules/imagemagick-native/
npm install
npm test
cd ../../
rm -rf _
@ainthek What is the xs-sed
command? I can't find documentation on it anywhere