4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS X Lionにsgeを入れる

Last updated at Posted at 2012-07-16

Ruby/SDLはわりと簡単に入った。

 $ brew install sdl sdl_image (必要ならsdl_ttf, sdl_mixer)
 $ gem i rubysdl rsdl

が、sgeがhomebrewにない。

gistに定義ファイルがあるのを発見。https://gist.github.com/1394414/ 試してみるが:

$ brew install https://raw.github.com/gist/1394414/4a6bfa4a8bab179ebe263b1d044a4322c7628f60/sge.rb 
==> make install
g++ -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -Wall -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -fPIC -I/usr/X11/include/freetype2 -I/usr/X11/include -c sge_surface.cpp
g++ -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -Wall -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -fPIC -I/usr/X11/include/freetype2 -I/usr/X11/include -c sge_primitives.cpp
sge_surface.cpp:1: error: bad value (native) for -march= switch
sge_surface.cpp:1: error: bad value (native) for -mtune= switch
sge_primitives.cpp:1: error: bad value (native) for -march= switch
sge_primitives.cpp:1: error: bad value (native) for -mtune= switch
make: *** [sge_primitives.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [sge_surface.o] Error 1 
()

調べてみると、なんか--use-gccというのがあるらしい?試してみるか。

でもno GCCって言われるな。

マニュアルコンパイルを試す

tarballをダウンロードし、とりあえずmakeしてみる。失敗。
パッチを4つすべて当ててみる。make通った。

うーん、無理やりだけど、これをzipしてhomebrewでインストールさせるか。

$ homebrew install https://raw.github.com/gist/3115276/719f284d6e340487dba6ef3e5beb7b7a4098414f/sge-manualcompile.rb
$ gem i rubysdl
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?