sudo gem install gosu -- --with-cflags=-I/opt/SDL2/include --with-cppflags=-I/opt/SDL2/include --with-ldflags=\"/opt/SDL2/lib/libSDL2.a /opt/SDL2/lib/libSDL2_ttf.a\"
Building native extensions with: '--with-cflags=-I/opt/SDL2/include --with-cppflags=-I/opt/SDL2/include --with-ldflags="/opt/SDL2/lib/libSDL2.a /opt/SDL2/lib/libSDL2_ttf.a"'
This could take a while...
ERROR: Error installing gosu:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/gosu-0.10.8/ext/gosu
/usr/bin/ruby2.3 -r ./siteconf20160910-3133-1edcscw.rb extconf.rb --with-cflags=-I/opt/SDL2/include --with-cppflags=-I/opt/SDL2/include --with-ldflags="/opt/SDL2/lib/libSDL2.a /opt/SDL2/lib/libSDL2_ttf.a"
The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:
https://github.com/gosu/gosu/wiki/Getting-Started-on-Linux
checking for TTF_RenderUTF8_Blended() in -lSDL2_ttf... yes
checking for SDL_ttf.h... yes
checking for main() in -lopenal... yes
checking for AL/al.h... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/gosu-0.10.8/mkmf.log
current directory: /var/lib/gems/2.3.0/gems/gosu-0.10.8/ext/gosu
make "DESTDIR=" clean
current directory: /var/lib/gems/2.3.0/gems/gosu-0.10.8/ext/gosu
make "DESTDIR="
compiling Audio-Audio.cpp
compiling Bitmap-Bitmap.cpp
compiling Bitmap-BitmapIO.cpp
In file included from Bitmap-BitmapIO.cpp:1:0:
../../src/Bitmap/BitmapIO.cpp: In function ‘Gosu::Reader Gosu::loadFromBMP(Gosu::Bitmap&, Gosu::Reader)’:
../../src/Bitmap/BitmapIO.cpp:163:12: warning: ‘Gosu::Reader Gosu::loadFromPNG(Gosu::Bitmap&, Gosu::Reader)’ is deprecated [-Wdeprecated-declarations]
return loadFromPNG(bitmap, reader);
^
../../src/Bitmap/BitmapIO.cpp:154:14: note: declared here
Gosu::Reader Gosu::loadFromPNG(Bitmap& bitmap, Reader reader)
^
../../src/Bitmap/BitmapIO.cpp:163:12: warning: ‘Gosu::Reader Gosu::loadFromPNG(Gosu::Bitmap&, Gosu::Reader)’ is deprecated [-Wdeprecated-declarations]
return loadFromPNG(bitmap, reader);
^
../../src/Bitmap/BitmapIO.cpp:154:14: note: declared here
Gosu::Reader Gosu::loadFromPNG(Bitmap& bitmap, Reader reader)
^
../../src/Bitmap/BitmapIO.cpp:163:38: warning: ‘Gosu::Reader Gosu::loadFromPNG(Gosu::Bitmap&, Gosu::Reader)’ is deprecated [-Wdeprecated-declarations]
return loadFromPNG(bitmap, reader);
^
../../src/Bitmap/BitmapIO.cpp:154:14: note: declared here
Gosu::Reader Gosu::loadFromPNG(Bitmap& bitmap, Reader reader)
^
compiling DirectoriesUnix.cpp
compiling FileUnix.cpp
In file included from FileUnix.cpp:1:0:
../../src/FileUnix.cpp: In member function ‘virtual void Gosu::File::resize(std::size_t)’:
../../src/FileUnix.cpp:76:34: warning: ignoring return value of ‘int ftruncate(int, __off_t)’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(pimpl->fd, newSize);
^
../../src/FileUnix.cpp: In member function ‘virtual void Gosu::File::read(std::size_t, std::size_t, void*) const’:
../../src/FileUnix.cpp:91:42: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
::read(pimpl->fd, destBuffer, length);
^
../../src/FileUnix.cpp: In member function ‘virtual void Gosu::File::write(std::size_t, std::size_t, const void*)’:
../../src/FileUnix.cpp:99:45: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
::write(pimpl->fd, sourceBuffer, length);
^
compiling Graphics-BlockAllocator.cpp
compiling Graphics-Color.cpp
compiling Graphics-Graphics.cpp
In file included from ../../src/Graphics/Graphics.cpp:2:0,
from Graphics-Graphics.cpp:1:
../../src/Graphics/Common.hpp:20:21: fatal error: GLES/gl.h: No such file or directory
compilation terminated.
Makefile:231: recipe for target 'Graphics-Graphics.o' failed
make: *** [Graphics-Graphics.o] Error 1
make failed, exit code 2
Gem files will remain installed in /var/lib/gems/2.3.0/gems/gosu-0.10.8 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/gosu-0.10.8/gem_make.out
../../src/Graphics/Common.hpp:20:21: fatal error: GLES/gl.h: No such file or directory
/opt/vc/include
directory again? If you can find gl.h
and pass the directory in via --with-cflags
/--with-cppflags
, you should get one step further. Not sure what comes next - probably finding the right library to link against :)
/opt/vc/include/GLES
--with-cppflags="-I/opt/SDL2/include -I/opt/vc/include"
, without the GLES
because the #include
already includes that part.--with-cflags=
at all since Gosu only uses C++, no C.
~$ sudo gem install gosu -- --with-cppflags="-I/opt/SDL2/include -I/opt/vc/include" --with-ldflags=\"/opt/SDL2/lib/libSDL2.a /opt/SDL2/lib/libSDL2_ttf.a\"try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/2.3.0/mkmf.rb:541:in
try_link0'try_link'
from /usr/lib/ruby/2.3.0/mkmf.rb:657:in
try_ldflags'pkg_config'
from extconf.rb:105:in
<main>'sudo gem install gosu -- --with-cppflags=\"-I/opt/SDL2/include -I/opt/vc/include\" --with-ldflags=\"/opt/SDL2/lib/libSDL2.a /opt/SDL2/lib/libSDL2_ttf.a\"
cat /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/gosu-0.10.8/mkmf.log
current directory: /var/lib/gems/2.3.0/gems/gosu-0.10.8/ext/gosu
/usr/bin/ruby2.3 -r ./siteconf20160910-17079-lqn9gi.rb extconf.rb --with-cppflags="-I/opt/SDL2/include -I/opt/vc/include" --with-ldflags="/opt/SDL2/lib/libSDL2.a /opt/SDL2/lib/libSDL2_ttf.a"
The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:
https://github.com/gosu/gosu/wiki/Getting-Started-on-Linux
checking for TTF_RenderUTF8_Blended() in -lSDL2_ttf... yes
checking for SDL_ttf.h... yes
checking for main() in -lopenal... yes
checking for AL/al.h... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/gosu-0.10.8/mkmf.log
current directory: /var/lib/gems/2.3.0/gems/gosu-0.10.8/ext/gosu
make "DESTDIR=" clean
current directory: /var/lib/gems/2.3.0/gems/gosu-0.10.8/ext/gosu
make "DESTDIR="
compiling Audio-Audio.cpp
compiling Bitmap-Bitmap.cpp
compiling Bitmap-BitmapIO.cpp
In file included from Bitmap-BitmapIO.cpp:1:0:
../../src/Bitmap/BitmapIO.cpp: In function ‘Gosu::Reader Gosu::loadFromBMP(Gosu::Bitmap&, Gosu::Reader)’:
../../src/Bitmap/BitmapIO.cpp:163:12: warning: ‘Gosu::Reader Gosu::loadFromPNG(Gosu::Bitmap&, Gosu::Reader)’ is deprecated (declared at ../../src/Bitmap/BitmapIO.cpp:154) [-Wdeprecated-declarations]
return loadFromPNG(bitmap, reader);
^
../../src/Bitmap/BitmapIO.cpp:163:38: warning: ‘Gosu::Reader Gosu::loadFromPNG(Gosu::Bitmap&, Gosu::Reader)’ is deprecated (declared at ../../src/Bitmap/BitmapIO.cpp:154) [-Wdeprecated-declarations]
return loadFromPNG(bitmap, reader);
^
compiling DirectoriesUnix.cpp
compiling FileUnix.cpp
In file included from FileUnix.cpp:1:0:
../../src/FileUnix.cpp: In member function ‘virtual void Gosu::File::resize(std::size_t)’:
../../src/FileUnix.cpp:76:34: warning: ignoring return value of ‘int ftruncate(int, __off_t)’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(pimpl->fd, newSize);
^
../../src/FileUnix.cpp: In member function ‘virtual void Gosu::File::read(std::size_t, std::size_t, void*) const’:
../../src/FileUnix.cpp:91:42: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
::read(pimpl->fd, destBuffer, length);
^
../../src/FileUnix.cpp: In member function ‘virtual void Gosu::File::write(std::size_t, std::size_t, const void*)’:
../../src/FileUnix.cpp:99:45: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
::write(pimpl->fd, sourceBuffer, length);
^
compiling Graphics-BlockAllocator.cpp
compiling Graphics-Color.cpp
compiling Graphics-Graphics.cpp
compiling Graphics-Image.cpp
compiling Graphics-LargeImageData.cpp
compiling Graphics-Macro.cpp
compiling Graphics-Resolution.cpp
compiling Graphics-TexChunk.cpp
compiling Graphics-Texture.cpp
compiling Graphics-Transform.cpp
compiling IO.cpp
compiling Input-Input.cpp
In file included from Input-Input.cpp:1:0:
../../src/Input/Input.cpp: In member function ‘bool Gosu::Input::feedSDLEvent(void*)’:
../../src/Input/Input.cpp:307:65: warning: comparison between ‘const enum SDL_Scancode’ and ‘enum Gosu::ButtonName’ [-Wenum-compare]
if (e->key.repeat == 0 && e->key.keysym.scancode <= kbRangeEnd) {
^
compiling Input-TextInput.cpp
compiling Inspection.cpp
compiling Math.cpp
compiling Text-Font.cpp
compiling Text-Text.cpp
compiling Text-TextUnix.cpp
In file included from Text-TextUnix.cpp:1:0:
../../src/Text/TextUnix.cpp: In member function ‘unsigned int Gosu::PangoRenderer::textWidth(const wstring&, const wstring&, unsigned int, unsigned int)’:
../../src/Text/TextUnix.cpp:57:13: warning: ‘void g_type_init()’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:681) [-Wdeprecated-declarations]
g_type_init();
^
../../src/Text/TextUnix.cpp:57:25: warning: ‘void g_type_init()’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:681) [-Wdeprecated-declarations]
g_type_init();
^
../../src/Text/TextUnix.cpp:61:23: warning: ‘PangoContext* pango_ft2_get_context(double, double)’ is deprecated (declared at /usr/include/pango-1.0/pango/pangoft2.h:111): Use 'pango_font_map_create_context' instead [-Wdeprecated-declarations]
context = pango_ft2_get_context(dpi_x, dpi_y);
^
../../src/Text/TextUnix.cpp:61:57: warning: ‘PangoContext* pango_ft2_get_context(double, double)’ is deprecated (declared at /usr/include/pango-1.0/pango/pangoft2.h:111): Use 'pango_font_map_create_context' instead [-Wdeprecated-declarations]
context = pango_ft2_get_context(dpi_x, dpi_y);
^
compiling TimingUnix.cpp
compiling Utility.cpp
compiling Window.cpp
compiling gosu_wrap.cxx
gosu_wrap.cxx: In function ‘VALUE _wrap_Font_draw_rot(int, VALUE*, VALUE)’:
gosu_wrap.cxx:5483:111: warning: ‘void Gosu::Font::drawRot(const wstring&, double, double, Gosu::ZPos, double, double, double, Gosu::Color, Gosu::AlphaMode) const’ is deprecated (declared at ../../Gosu/Font.hpp:81) [-Wdeprecated-declarations]
((Gosu::Font const *)arg1)->drawRot((std::wstring const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
^
compiling stb_vorbis.c
linking shared-object gosu.so
/usr/bin/ld: /opt/SDL2/lib/libSDL2.a(SDL_dynapi.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/opt/SDL2/lib/libSDL2.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:255: recipe for target 'gosu.so' failed
make: *** [gosu.so] Error 1
make failed, exit code 2
/usr/bin/ld: /opt/SDL2/lib/libSDL2.a(SDL_dynapi.o): relocation R_ARM_THM_MOVW_ABS_NC against 'a local symbol' can not be used when making a shared object; recompile with -fPIC
/opt/SDL2/lib/libSDL2.so
file as well? Can you please try passing that in, instead of the static .a
library?
$ sudo gem install gosu -- --with-cppflags=\"-I/opt/SDL2/include -I/opt/vc/include\" --with-ldflags=\"/opt/SDL2/lib/libSDL2.so /opt/SDL2/lib/libSDL2_ttf.so\"
sudo gem install gosu --pre
until 0.11.4 is out).Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill