Skip to content

Instantly share code, notes, and snippets.

@davidjrice
Created October 4, 2012 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidjrice/3832964 to your computer and use it in GitHub Desktop.
Save davidjrice/3832964 to your computer and use it in GitHub Desktop.
Failure to build node-canvas on heroku using bloomtime/heroku-buildpack-nodejs#cairo
> contextify@0.1.3 install /tmp/build_1lhuqx5qgzdcb/node_modules/fabric/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild
gyp http GET http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz
make: Entering directory `/tmp/build_1lhuqx5qgzdcb/node_modules/fabric/node_modules/canvas/build'
CXX(target) Release/obj.target/canvas/src/Canvas.o
In file included from ../src/Canvas.cc:8:
../src/Canvas.h:19:25: warning: cairo/cairo.h: No such file or directory
../src/Canvas.cc:15:29: warning: cairo/cairo-pdf.h: No such file or directory
In file included from ../src/Canvas.cc:8:
../src/Canvas.h:63: error: 'cairo_status_t' has not been declared
../src/Canvas.h:79: error: ISO C++ forbids declaration of 'cairo_surface_t' with no type
../src/Canvas.h:79: error: 'cairo_surface_t' declared as an 'inline' field
../src/Canvas.h:79: error: expected ';' before '*' token
../src/Canvas.h:80: error: expected ';' before 'inline'
../src/Canvas.h:88: error: ISO C++ forbids declaration of 'cairo_surface_t' with no type
../src/Canvas.h:88: error: expected ';' before '*' token
../src/Canvas.h: In member function 'uint8_t* Canvas::data()':
../src/Canvas.h:81: error: '_surface' was not declared in this scope
../src/Canvas.h:81: error: 'cairo_image_surface_get_data' was not declared in this scope
../src/Canvas.h: In member function 'int Canvas::stride()':
../src/Canvas.h:82: error: '_surface' was not declared in this scope
../src/Canvas.h:82: error: 'cairo_image_surface_get_stride' was not declared in this scope
In file included from ../src/CanvasRenderingContext2d.h:13,
from ../src/Canvas.cc:9:
../src/CanvasGradient.h: At global scope:
../src/CanvasGradient.h:21: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasGradient.h:21: error: 'cairo_pattern_t' declared as an 'inline' field
../src/CanvasGradient.h:21: error: expected ';' before '*' token
../src/CanvasGradient.h:23: error: expected ';' before 'private'
../src/CanvasGradient.h:26: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasGradient.h:26: error: expected ';' before '*' token
In file included from ../src/Canvas.cc:9:
../src/CanvasRenderingContext2d.h:30: error: 'cairo_filter_t' does not name a type
../src/CanvasRenderingContext2d.h:31: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:31: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:32: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:32: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:33: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:33: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:34: error: ISO C++ forbids declaration of 'cairo_pattern_t' with no type
../src/CanvasRenderingContext2d.h:34: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:130: error: 'cairo_t' has not been declared
../src/CanvasRenderingContext2d.h:131: error: ISO C++ forbids declaration of 'cairo_t' with no type
../src/CanvasRenderingContext2d.h:131: error: 'cairo_t' declared as an 'inline' field
../src/CanvasRenderingContext2d.h:131: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:132: error: expected ';' before 'inline'
../src/CanvasRenderingContext2d.h:136: error: 'cairo_surface_t' has not been declared
../src/CanvasRenderingContext2d.h:137: error: expected ',' or '...' before '(' token
../src/CanvasRenderingContext2d.h:137: error: 'fn' has incomplete type
../src/CanvasRenderingContext2d.h:137: error: invalid use of 'void'
../src/CanvasRenderingContext2d.h:157: error: ISO C++ forbids declaration of 'cairo_t' with no type
../src/CanvasRenderingContext2d.h:157: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h:158: error: ISO C++ forbids declaration of 'cairo_path_t' with no type
../src/CanvasRenderingContext2d.h:158: error: expected ';' before '*' token
../src/CanvasRenderingContext2d.h: In member function 'void Context2d::setContext(int*)':
../src/CanvasRenderingContext2d.h:130: error: '_context' was not declared in this scope
In file included from ../src/Canvas.cc:16:
../src/closure.h: At global scope:
../src/closure.h:22: error: 'cairo_status_t' does not name a type
../src/closure.h:29: error: 'cairo_status_t' does not name a type
In file included from ../src/Canvas.cc:19:
../src/JPEGStream.h:100: error: variable or field 'write_to_jpeg_stream' declared void
../src/JPEGStream.h:100: error: 'cairo_surface_t' was not declared in this scope
../src/JPEGStream.h:100: error: 'surface' was not declared in this scope
../src/JPEGStream.h:100: error: expected primary-expression before 'int'
../src/JPEGStream.h:100: error: expected primary-expression before 'int'
../src/JPEGStream.h:100: error: expected primary-expression before '*' token
../src/JPEGStream.h:100: error: 'closure' was not declared in this scope
make: *** [Release/obj.target/canvas/src/Canvas.o] Error 1
make: Leaving directory `/tmp/build_1lhuqx5qgzdcb/node_modules/fabric/node_modules/canvas/build'
gyp ERR! rebuild error Error: `make` failed with exit code: 2
gyp ERR! rebuild error at ChildProcess.onExit (/tmp/node-npm-BcTh/node_modules/node-gyp/lib/build.js:215:23)
gyp ERR! rebuild error at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
npm ERR! canvas@0.13.1 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the canvas@0.13.1 install 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-gyp rebuild
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! System Linux 2.6.32-347-ec2
npm ERR! command "/tmp/node-node-Q8kH/bin/node" "/tmp/node-npm-BcTh/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_1lhuqx5qgzdcb
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.41
npm ERR! code ELIFECYCLE
npm ERR! stack Error: canvas@0.13.1 install: `node-gyp rebuild`
npm ERR! stack `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! stack at ChildProcess.<anonymous> (/tmp/node-npm-BcTh/lib/utils/exec.js:56:20)
npm ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
npm ERR! stack at Process._handle.onexit (child_process.js:674:10)
Traceback (most recent call last):
File "/tmp/build_1lhuqx5qgzdcb/.node-gyp/0.8.6/tools/gyp_addon", line 7, in <module>
module_root = os.getcwd()
OSError: [Errno 2] No such file or directory
gyp ERR! rebuild error Error: `gyp_addon` failed with exit code: 1
gyp ERR! rebuild error at ChildProcess.onCpExit (/tmp/node-npm-BcTh/node_modules/node-gyp/lib/configure.js:290:16)
gyp ERR! rebuild error at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
npm WARN optional dep failed, continuing contextify@0.1.3
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_1lhuqx5qgzdcb/npm-debug.log
npm ERR! not ok code 0
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment