Skip to content

Instantly share code, notes, and snippets.

@Nogbit
Last active December 26, 2015 08:59
Show Gist options
  • Save Nogbit/7126224 to your computer and use it in GitHub Desktop.
Save Nogbit/7126224 to your computer and use it in GitHub Desktop.
Ruby gosu gem install on OSX Mavericks
Lois:~ Lois$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Lois:~ Lois$ sudo gem install gosu
Password:
Building native extensions. This could take a while...
ERROR: Error installing gosu:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:
https://github.com/jlnr/gosu/wiki/Getting-Started-on-Linux
creating Makefile
make "DESTDIR="
compiling analysis.c
compiling bitrate.c
compiling bitwise.c
compiling block.c
compiling codebook.c
In file included from codebook.c:1:
./../GosuImpl/../dependencies/libvorbis/lib/codebook.c:251:31: warning: operator '>>' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses]
if((quantvals*s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb))
~~~~~~~~~~~~~~~~~~~~^~~~
./../GosuImpl/../dependencies/libvorbis/lib/codebook.c:251:31: note: place parentheses around the '+' expression to silence this warning
if((quantvals*s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb))
^
( )
1 warning generated.
compiling envelope.c
compiling floor0.c
compiling floor1.c
compiling framing.c
compiling info.c
compiling lookup.c
compiling lpc.c
compiling lsp.c
compiling mapping0.c
compiling mdct.c
compiling psy.c
In file included from psy.c:1:
./../GosuImpl/../dependencies/libvorbis/lib/psy.c:1164:17: warning: '/*' within block comment [-Wcomment]
/* elliptical
^
1 warning generated.
compiling registry.c
compiling res0.c
compiling sharedbook.c
compiling smallft.c
compiling synthesis.c
compiling vorbisfile.c
compiling window.c
compiling RubyGosu_wrap.cxx
In file included from RubyGosu_wrap.cxx:1:
In file included from ./../GosuImpl/RubyGosu_wrap.cxx:2216:
In file included from ../Gosu/Gosu.hpp:13:
In file included from ../Gosu/Audio.hpp:16:
../Gosu/TR1.hpp:27:24: error: no member named 'bind' in namespace 'std'
using std::bind;
~~~~~^
In file included from RubyGosu_wrap.cxx:1:
In file included from ./../GosuImpl/RubyGosu_wrap.cxx:2216:
In file included from ../Gosu/Gosu.hpp:13:
../Gosu/Audio.hpp:24:5: warning: attribute '__deprecated__' is ignored, place it after "class" to apply attribute to type declaration [-Wignored-attributes]
GOSU_DEPRECATED class Audio;
^
../Gosu/Platform.hpp:68:42: note: expanded from macro 'GOSU_DEPRECATED'
# define GOSU_DEPRECATED __attribute__((__deprecated__))
^
In file included from RubyGosu_wrap.cxx:1:
In file included from ./../GosuImpl/RubyGosu_wrap.cxx:2216:
In file included from ../Gosu/Gosu.hpp:26:
../Gosu/Sockets.hpp:68:27: error: implicit instantiation of undefined template 'std::__1::function<void (unsigned int, unsigned short, const void *, unsigned long)>'
std::size_t)> onReceive;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:205:44: note: template is declared here
template<class _Fp> class _LIBCPP_TYPE_VIS function; // undefined
^
In file included from RubyGosu_wrap.cxx:1:
./../GosuImpl/RubyGosu_wrap.cxx:2798:47: error: no member named 'bind' in namespace 'std::tr1'
self->graphics().scheduleGL(std::tr1::bind(callRubyBlock, rb_block_proc()), z);
~~~~~~~~~~^
./../GosuImpl/RubyGosu_wrap.cxx:5773:35: warning: 'drawRot' is deprecated [-Wdeprecated-declarations]
((Gosu::Font const *)arg1)->drawRot((std::wstring const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
^
../Gosu/Font.hpp:77:14: note: 'drawRot' declared here
void drawRot(const std::wstring& text, double x, double y, ZPos z, double angle,
^
2 warnings and 3 errors generated.
make: *** [RubyGosu_wrap.o] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gosu-0.7.48 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gosu-0.7.48/linux/gem_make.out
Lois:~ Lois$
@jeremymbenson
Copy link

same problem, I see the instruction pointing us to install certain libraries system-wide but as a newb I'm having trouble knowing which ones to work with

Jeremy:~ jeremymbenson$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Jeremy:~ jeremymbenson$ gem -v
2.0.6
Jeremy:~ jeremymbenson$ gem install gosu
Building native extensions. This could take a while...
ERROR: Error installing gosu:
ERROR: Failed to build gem native extension.

/Users/jeremymbenson/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb

The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:
https://github.com/jlnr/gosu/wiki/Getting-Started-on-Linux

creating Makefile

make "DESTDIR="
compiling analysis.c
compiling bitrate.c
compiling bitwise.c
compiling block.c
compiling codebook.c
In file included from codebook.c:1:
./../GosuImpl/../dependencies/libvorbis/lib/codebook.c:251:31: warning: operator '>>' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses]
if((quantvals_s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb))
~~~~~~~~~~~~~~~~~~~~^~~~
./../GosuImpl/../dependencies/libvorbis/lib/codebook.c:251:31: note: place parentheses around the '+' expression to silence this warning
if((quantvals_s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb))
^
( )
1 warning generated.
compiling envelope.c
compiling floor0.c
compiling floor1.c
compiling framing.c
compiling info.c
compiling lookup.c
compiling lpc.c
compiling lsp.c
compiling mapping0.c
compiling mdct.c
compiling psy.c
In file included from psy.c:1:
./../GosuImpl/../dependencies/libvorbis/lib/psy.c:1164:17: warning: '/' within block comment [-Wcomment]
/
elliptical
^
1 warning generated.
compiling registry.c
compiling res0.c
compiling sharedbook.c
compiling smallft.c
compiling synthesis.c
compiling vorbisfile.c
compiling window.c
compiling RubyGosu_wrap.cxx
In file included from RubyGosu_wrap.cxx:1:
In file included from ./../GosuImpl/RubyGosu_wrap.cxx:2216:
In file included from ../Gosu/Gosu.hpp:13:
In file included from ../Gosu/Audio.hpp:16:
../Gosu/TR1.hpp:27:24: error: no member named 'bind' in namespace 'std'
using std::bind;
~~~~~^
In file included from RubyGosu_wrap.cxx:1:
In file included from ./../GosuImpl/RubyGosu_wrap.cxx:2216:
In file included from ../Gosu/Gosu.hpp:13:
../Gosu/Audio.hpp:24:5: warning: attribute 'deprecated' is ignored, place it after "class" to apply attribute to type declaration [-Wignored-attributes]
GOSU_DEPRECATED class Audio;
^
../Gosu/Platform.hpp:68:42: note: expanded from macro 'GOSU_DEPRECATED'

define GOSU_DEPRECATED attribute((deprecated))

                                     ^

In file included from RubyGosu_wrap.cxx:1:
In file included from ./../GosuImpl/RubyGosu_wrap.cxx:2216:
In file included from ../Gosu/Gosu.hpp:26:
../Gosu/Sockets.hpp:68:27: error: implicit instantiation of undefined template 'std::__1::function<void (unsigned int, unsigned short, const void *, unsigned long)>'
std::size_t)> onReceive;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:205:44: note: template is declared here
template class _LIBCPP_TYPE_VIS function; // undefined
^
In file included from RubyGosu_wrap.cxx:1:
./../GosuImpl/RubyGosu_wrap.cxx:2798:47: error: no member named 'bind' in namespace 'std::tr1'
self->graphics().scheduleGL(std::tr1::bind(callRubyBlock, rb_block_proc()), z);
~~~~~~~~~~^
./../GosuImpl/RubyGosu_wrap.cxx:5773:35: warning: 'drawRot' is deprecated [-Wdeprecated-declarations](%28Gosu::Font const *%29arg1)->drawRot((std::wstring const &)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
^
../Gosu/Font.hpp:77:14: note: 'drawRot' declared here
void drawRot(const std::wstring& text, double x, double y, ZPos z, double angle,
^
2 warnings and 3 errors generated.
make: *
* [RubyGosu_wrap.o] Error 1

Gem files will remain installed in /Users/jeremymbenson/.rvm/gems/ruby-2.0.0-p247/gems/gosu-0.7.48 for inspection.
Results logged to /Users/jeremymbenson/.rvm/gems/ruby-2.0.0-p247/gems/gosu-0.7.48/linux/gem_make.out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment