banister / texplay

image manipulation tool for ruby and gosu
66 stars 16 forks source link

Texplay 0.4.3 does not compile in MacOSX with ruby 1.9.2 #30

Open JavierCVilla opened 10 years ago

JavierCVilla commented 10 years ago

I can't install texplay 0.4.3 in my mac, I've tried to do with ruby 1.9.2 but I can't. The error message is:

sudo gem install texplay -v '0.4.3'

Building native extensions.  This could take a while...
ERROR:  Error installing texplay:
ERROR: Failed to build gem native extension.

/Users/JavierCVilla/.rvm/rubies/ruby-1.9.2-p330/bin/ruby extconf.rb
creating Makefile

make  clean

make
clang -I. -I/Users/JavierCVilla/.rvm/rubies/ruby-1.9.2-p330/include/ruby-1.9.1/x86_64-darwin13.3.0 -I/Users/JavierCVilla/.rvm/rubies/ruby-1.9.2-p330/include/ruby-1.9.1/ruby/backward -I/Users/JavierCVilla/.rvm/rubies/ruby-1.9.2-p330/include/ruby-1.9.1 -I. -I/usr/local/opt/libyaml/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I/System/Library/Frameworks/GLUT.framework/Headers -DRUBY_19 -std=c99  -o actions.o -c actions.c
actions.c:8:11: fatal error: 'glut.h' file not found
    # include <glut.h>
          ^
1 error generated.
make: *** [actions.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/JavierCVilla/.rvm/rubies/ruby-1.9.2-p330/lib/ruby/gems/1.9.1/gems/texplay-0.4.3 for inspection.
Results logged to /Users/JavierCVilla/.rvm/rubies/ruby-1.9.2-p330/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/texplay-0.4.3/gem_make.out

I know that macOS have by default the glut.h library, so I don't understand what is happening.

Zhomart commented 9 years ago

I have same issue on OS X 10.10.2

Zhomart commented 9 years ago

Fixed it by installing freeglut $ brew install freeglut

kingsleyh commented 9 years ago

where did you find freeglut? Error: No available formula for freeglut

Zhomart commented 9 years ago

Have you tried to update brew? $ brew update

kingsleyh commented 9 years ago

yeah didn't work - in the end I got textplay to build by cloning this repo and doing a gem build which worked ok - then I used the resulting 0.4.4-pre gem as a dependency in my project (using any of the released gems didn't work)