banister / devil

ruby bindings for devil cross platform image loading library
http://openil.sourceforge.net
Other
60 stars 9 forks source link

Install with Brew instead of macports #2

Open danhixon opened 14 years ago

danhixon commented 14 years ago

Hi, I'm used brew to install the devil libraries and I'm unable to install the devil gem. Looks like it can't find -lILU, any ideas?

$ sudo gem install devil Building native extensions. This could take a while... ERROR: Error installing devil: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for main() in -lIL... yes checking for main() in -lILU... no * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby --with-ILlib --without-ILlib --with-ILUlib --without-ILUlib

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/devil-0.1.8 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/devil-0.1.8/ext/devil/gem_make.out

banister commented 14 years ago

Hi,

There are two possible explanations IMO.

1) Homebrew only installed the IL library and not the ILU library 2) You initially already had IL installed (but not ILU) and the Homebrew installation of IL and ILU are not being detected during compilation.

If the answer is 1. (which you can verify by searching the library locations for a libILU.bundle and not finding it) then the homebrew DevIL package needs to be updated to include the ILU library (and also, perhaps, the ILUT libraries), and IMO you should contact the maintainers.

If the answer is 2. on the other hand, you need to pass the homebrew library folder along to gcc upon compilation. You do this by editing the LDFLAGS in extconf.rb. You can also tell me what path you used, and i can add it to exconf.rb so to support homebrew in the future :)

Let me know how you get on :)