I get this error while installing any node packages that run node-gyp rebuild
:
SOLINK_MODULE(target) Release/canvas-postbuild.node
clang: error: no such file or directory: '{{}'
make: *** [Release/canvas-postbuild.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/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/arkadiy/node-canvas
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
I have npm 1.4.28 and all of /usr/local is chowned to me. clang is recent-ish:
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
The error is completely ungoogleable (seriously, try it) and I can't even tell where clang is being invoked because the stack trace is only for the callback handler. It seems like a shell substitution/xargs issue almost?
Turns out I had a literal
LDFLAGS='{} -L/usr/local/opt/openssl/lib'
because of something that wasn't being expanded by the shell. Never mind!