LearnBoost/node-canvas — Issue #120: node 0.5.9 build failure: Canvas.cc:201: error: invalid conversion from ‘int (*)(eio_req*)’ to ‘void (*)(eio_req*)’
Author: marcello3d
Created: 2011-10-13 03:41:55+00:00
State: open

When trying to install the latest node-canvas with npm on node 0.5.9 (OS X), I get the following error:

Waf: Entering directory `/tmp/test/node_modules/canvas/build'
[1/9] cxx: src/Canvas.cc -> build/Release/src/Canvas_1.o
[2/9] cxx: src/CanvasGradient.cc -> build/Release/src/CanvasGradient_1.o
../src/Canvas.cc: In static member function ‘static v8::Handle Canvas::ToBuffer(const v8::Arguments&)’:
../src/Canvas.cc:201: error: invalid conversion from ‘int (*)(eio_req*)’ to ‘void (*)(eio_req*)’
../src/Canvas.cc:201: error: initializing argument 1 of ‘eio_req* eio_custom(void (*)(eio_req*), int, int (*)(eio_req*), void*)’
Waf: Leaving directory `/tmp/test/node_modules/canvas/build'
Build failed: -> task failed (err #1):
{task: cxx Canvas.cc -> Canvas_1.o}
npm info canvas@0.7.3 Failed to exec preinstall script

Full log:

$ npm install canvas
npm info it worked if it ends with ok
npm info using npm@1.0.95
npm info using node@v0.5.9
npm WARN globalize@0.1.0pre package.json: bugs['web'] should probably be bugs['url']
npm WARN log4js@0.3.9 package.json: bugs['web'] should probably be bugs['url']
npm info addNamed [ 'canvas', '>=0.7.3' ]
npm info into /tmp/test canvas@0.7.3
npm info installOne canvas@0.7.3
npm info unbuild /tmp/test/node_modules/canvas
npm info preinstall canvas@0.7.3

> canvas@0.7.3 preinstall /tmp/test/node_modules/canvas
> node-waf configure build

Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for library gif : not found
Checking for library jpeg : yes
Checking for cairo : yes
'configure' finished successfully (1.419s)
Waf: Entering directory `/tmp/test/node_modules/canvas/build'
[1/9] cxx: src/Canvas.cc -> build/Release/src/Canvas_1.o
[2/9] cxx: src/CanvasGradient.cc -> build/Release/src/CanvasGradient_1.o
../src/Canvas.cc: In static member function ‘static v8::Handle Canvas::ToBuffer(const v8::Arguments&)’:
../src/Canvas.cc:201: error: invalid conversion from ‘int (*)(eio_req*)’ to ‘void (*)(eio_req*)’
../src/Canvas.cc:201: error: initializing argument 1 of ‘eio_req* eio_custom(void (*)(eio_req*), int, int (*)(eio_req*), void*)’
Waf: Leaving directory `/tmp/test/node_modules/canvas/build'
Build failed: -> task failed (err #1):
{task: cxx Canvas.cc -> Canvas_1.o}
npm info canvas@0.7.3 Failed to exec preinstall script
npm ERR! error installing canvas@0.7.3 Error: canvas@0.7.3 preinstall: `node-waf configure build`
npm ERR! error installing canvas@0.7.3 `sh "-c" "node-waf configure build"` failed with 1
npm ERR! error installing canvas@0.7.3 at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing canvas@0.7.3 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing canvas@0.7.3 at maybeExit (child_process_uv.js:335:16)
npm ERR! error installing canvas@0.7.3 at Process.onexit (child_process_uv.js:370:5)
npm info unbuild /tmp/test/node_modules/canvas
npm info preuninstall canvas@0.7.3
npm info uninstall canvas@0.7.3
npm info postuninstall canvas@0.7.3
npm ERR! canvas@0.7.3 preinstall: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the canvas@0.7.3 preinstall script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! cwd /tmp/test
npm ERR! node -v v0.5.9
npm ERR! npm -v 1.0.95
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/test/npm-debug.log
npm not ok