Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find gif_lib.h #502

Closed
MarkRabey opened this issue Jan 20, 2015 · 4 comments
Closed

Can't find gif_lib.h #502

MarkRabey opened this issue Jan 20, 2015 · 4 comments

Comments

@MarkRabey
Copy link

It's quite likely there is already an issue open, in which case sorry about another, I just can't seem to find a solution...

I'm attempting to install this on a Mac using npm install canvas and have hit a snag I can't get past myself. I was having issues with some dependancies, namely Cairo, however I am past those issues now. I now get the following:

> canvas@1.1.6 install /Users/mark/Documents/Projects/hae-image-generator/node_modules/canvas
> node-gyp rebuild

  SOLINK_MODULE(target) Release/canvas-postbuild.node
  SOLINK_MODULE(target) Release/canvas-postbuild.node: Finished
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
In file included from ../src/CanvasPattern.cc:9:
../src/Image.h:19:10: fatal error: 'gif_lib.h' file not found
#include <gif_lib.h>
         ^
1 error generated.
make: *** [Release/obj.target/canvas/src/CanvasPattern.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2

Followed by a great many more errors. While I can see that gif_lib.h clearly is missing from the source, I have no idea how to move on from here. I have installed giflib using brew install giflib and paths all appear to be linked correctly. Any help is greatly appreciated.

@bmordan
Copy link

bmordan commented May 11, 2015

Same problem.

> canvas@1.2.2 install /Users/bernie/Code/sandstorm-appstore/app/node_modules/canvas
> node-gyp rebuild

  SOLINK_MODULE(target) Release/canvas-postbuild.node
  SOLINK_MODULE(target) Release/canvas-postbuild.node: Finished
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
In file included from ../src/CanvasPattern.cc:9:
../src/Image.h:19:10: fatal error: 'gif_lib.h' file not found
#include <gif_lib.h>
         ^
1 error generated.
make: *** [Release/obj.target/canvas/src/CanvasPattern.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2

@DanHanf
Copy link

DanHanf commented Nov 21, 2015

I ran into this as well. Ran $ brew doctor and noticed this:

Warning: Xcode 7 lacks the 10.10 SDK which can cause some builds to fail.
We recommend installing the Command Line Tools with:
  xcode-select --install
to resolve this issue.

Ran xcode-select --install and canvas finally installed clean! Note though, that I did this just now and haven't tested it or anything.

@LinusU
Copy link
Collaborator

LinusU commented Nov 21, 2015

This should be fixed by xcode-select --install and is also noted in the readme now :)

@LinusU LinusU closed this as completed Nov 21, 2015
@bradparks
Copy link

If that doesnt work for you, go here for more steps to try:

#788 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants