le0pard / webp-ffi

Ruby wrapper for libwebp
https://leopard.in.ua/webp-ffi/
MIT License
113 stars 14 forks source link

Problem with gem install #6

Closed RadoslawT closed 10 years ago

RadoslawT commented 10 years ago

Hi, I have such problem during gem install webp-ffi on os x 10.9.1

"/Users/###/.rvm/rubies/ruby-2.0.0-p247/bin/ruby" -rubygems /Users/###/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Users/###/.rvm/gems/ruby-2.0.0-p247/gems/webp-ffi-0.2.1/lib RUBYLIBDIR=/Users/###/.rvm/gems/ruby-2.0.0-p247/gems/webp-ffi-0.2.1/lib
mkdir -p x86_64-darwin
/usr/bin/clang -fexceptions -O -fno-omit-frame-pointer -fno-strict-aliasing -arch x86_64 -DHAVE_PUTS=1 -DHAVE_STDIO_H=1 -o x86_64-darwin/util.o -c ./util.c
In file included from ./util.c:1:
././util.h:1:10: fatal error: 'webp/decode.h' file not found
#include "webp/decode.h"
         ^
1 error generated.
rake aborted!
Command failed with status (1): [/usr/bin/clang -fexceptions -O -fno-omit-f...]
/Users/###/.rvm/gems/ruby-2.0.0-p247/gems/ffi-compiler-0.1.3/lib/ffi-compiler/compile_task.rb:114:in `block (2 levels) in define_task!'
Tasks: TOP => default => x86_64-darwin/libwebp_ffi.bundle => x86_64-darwin/util.o
(See full trace by running task with --trace)

Libs seems to be installed fine

brew install libjpg libpng libtiff webp
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
Warning: jpeg-8d already installed
Warning: libpng-1.5.14 already installed
Warning: libtiff-4.0.3 already installed
Warning: webp-0.3.1 already installed
le0pard commented 10 years ago

As I can see from error webp header files is not found. Try to reinstall webp or maybe this problem "homebrew and macports on the same mashine" need to be solved

le0pard commented 10 years ago

Try:

brew link webp

wa0x6e commented 10 years ago

I got the same problem. Those files are on the system, but in opt/local/include. Seems like copy/pasting them to /usr/local/include fixed the file not found issue.

le0pard commented 10 years ago

@kamisana did you try brew link webp?

wa0x6e commented 10 years ago

No, I'm using macport.

Trying to install the libwebp library manually also failed, as it's installed inside /usr/local/include/webp. Weird, but moving the files inside the webp folder to /usr/local/include seems to fix the issue.

le0pard commented 10 years ago

@kamisama yep, the same trick used for Travis-CI for testing - https://github.com/le0pard/webp-ffi/blob/master/spec/travis_build.sh#L8