Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Problems installing: "SDL2/SDL_ttf.h: No such file"
- - By shadowfirebird Date 2014-12-31 17:33
Trying to get this working with Ruby.  I'm getting an error that suggests the install is looking for the right file in the wrong place. Anyone have any ideas?

Debian Wheezy (well, CrunchBang 11 - the one is based off the other). Ruby 1.9.3-p547.

apt-get install <all the dependencies>, but specifically libsdl-ttf2.0, see below.

gem install gosu (well, bundle install, with gosu in the Gemfile)

Output ends as follows:
In file included from Text-TextUnix.cpp:1:0:
../../src/Text/TextUnix.cpp:8:26: fatal error: SDL2/SDL_ttf.h: No such file or directory
compilation terminated.


I checked the files provided by libsdl-ttf2.0, and I see /usr/include/SDL/SDL_ttf.h -- so, right file, wrong place?

I've just run a nice simple 'gem install gosu'; here's the output:
Building native extensions.  This could take a while...
ERROR:  Error installing gosu:
  ERROR: Failed to build gem native extension.

        /home/shadowfirebird/.rbenv/versions/1.9.3-p547/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

checking for TTF_RenderUTF8_Blended() in -lSDL2_ttf... no
checking for FreeImage_ConvertFromRawBits() in -lfreeimage... yes
checking for FreeImage.h... yes
checking for main() in -lopenal... yes
checking for AL/al.h... yes
creating Makefile

make
compiling gosu_wrap.cxx
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
gosu_wrap.cxx: In function ‘void Gosu::loadBitmap(Gosu::Bitmap&, VALUE)’:
gosu_wrap.cxx:2298:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
gosu_wrap.cxx: In function ‘void Gosu_Window_transform(Gosu::Window*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)’:
gosu_wrap.cxx:2802:9: warning: missing braces around initializer for ‘std::tr1::array<double, 16ul>::value_type [16] {aka double [16]}’ [-Wmissing-braces]
gosu_wrap.cxx: In member function ‘virtual void SwigDirector_Window::update()’:
gosu_wrap.cxx:2890:9: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
gosu_wrap.cxx: In member function ‘virtual void SwigDirector_Window::draw()’:
gosu_wrap.cxx:2897:9: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
gosu_wrap.cxx: In member function ‘virtual void SwigDirector_Window::loseFocus()’:
gosu_wrap.cxx:2934:9: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
gosu_wrap.cxx: In member function ‘virtual void SwigDirector_Window::releaseMemory()’:
gosu_wrap.cxx:2941:9: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
gosu_wrap.cxx: In member function ‘virtual void SwigDirector_Window::buttonDown(Gosu::Button)’:
gosu_wrap.cxx:2949:9: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
gosu_wrap.cxx: In member function ‘virtual void SwigDirector_Window::buttonUp(Gosu::Button)’:
gosu_wrap.cxx:2963:9: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
compiling Graphics-LargeImageData.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from ../../src/Graphics/LargeImageData.cpp:2:0,
                 from Graphics-LargeImageData.cpp:1:
../../src/Graphics/Common.hpp: In function ‘void Gosu::multiplyBitmapAlpha(Gosu::Bitmap&, Gosu::Color::Channel)’:
../../src/Graphics/Common.hpp:104:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../src/Graphics/Common.hpp:105:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
In file included from Graphics-LargeImageData.cpp:1:0:
../../src/Graphics/LargeImageData.cpp: In member function ‘virtual Gosu::Bitmap Gosu::LargeImageData::toBitmap() const’:
../../src/Graphics/LargeImageData.cpp:123:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../src/Graphics/LargeImageData.cpp:124:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../src/Graphics/LargeImageData.cpp: In member function ‘virtual void Gosu::LargeImageData::insert(const Gosu::Bitmap&, int, int)’:
../../src/Graphics/LargeImageData.cpp:131:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../src/Graphics/LargeImageData.cpp:132:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
In file included from ../../Gosu/ImageData.hpp:7:0,
                 from ../../src/Graphics/LargeImageData.hpp:5,
                 from ../../src/Graphics/LargeImageData.cpp:1,
                 from Graphics-LargeImageData.cpp:1:
../../Gosu/Color.hpp: In function ‘Gosu::Color {anonymous}::ipl(Gosu::Color, Gosu::Color, double)’:
../../Gosu/Color.hpp:101:43: warning: ‘result.Gosu::Color::rep’ is used uninitialized in this function [-Wuninitialized]
In file included from Graphics-LargeImageData.cpp:1:0:
../../src/Graphics/LargeImageData.cpp:72:21: note: ‘result.Gosu::Color::rep’ was declared here
compiling Math.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling DirectoriesUnix.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling IO.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling Input-TextInput.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling Text-TextUnix.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from Text-TextUnix.cpp:1:0:
../../src/Text/TextUnix.cpp:8:26: fatal error: SDL2/SDL_ttf.h: No such file or directory
compilation terminated.
make: *** [Text-TextUnix.o] Error 1

Gem files will remain installed in /home/andy/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/gosu-0.8.6 for inspection.
Results logged to /home/andy/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/gosu-0.8.6/ext/gosu/gem_make.out
Parent - - By RunnerPack Date 2014-12-31 18:28
It looks like it's looking for "SDL2/SDL_ttf.h", and you only have "SDL/SDL_ttf.h" (unless that was a typo in your message).
Parent - - By shadowfirebird Date 2014-12-31 20:39 Edited 2014-12-31 22:17
Gaah. I missed that, many thanks. I installed libsdl-ttf not libsdl2-ttf ... which does not appear to be in the repositories for Debian Wheezy.

I'll either have to compile libsdl2 from source or, presumably, wind back my gosu version until I find one compatible with Wheezy.  Can anyone tell me what version I need, since that would be simpler?

EDIT: No need, I seem to have managed to install it from Sid, which is a bit of a surprise...  Thanks RunnerPack...
Parent - By RunnerPack Date 2014-12-31 22:31
Any time, shadowfirebird. I was about to post that (I think) 0.8.0 was the first version using SDL2, and that 0.7.50 would be worth a try. Maybe that'll help someone else, if they're unable to install SDL2.
Up Topic Gosu / Gosu Exchange / Problems installing: "SDL2/SDL_ttf.h: No such file"

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill