Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to install gem gosu 0.11.0 #371

Closed
Sylvain303 opened this issue Jan 11, 2017 · 2 comments
Closed

fail to install gem gosu 0.11.0 #371

Sylvain303 opened this issue Jan 11, 2017 · 2 comments
Assignees

Comments

@Sylvain303
Copy link

Some error installing on xubuntu 16.10

with rvm ruby 2.4

/home/sylvain/.rvm/gems/ruby-2.4.0-rc1/gems/gosu-0.11.0/ext/gosu

sudo apt  install build-essential libsdl2-dev \
                  libsdl2-ttf-dev libpango1.0-dev \
                  libgl1-mesa-dev libopenal-dev libsndfile1-dev                 

/home/sylvain/.rvm/gems/ruby-2.4.0-rc1/extensions/x86_64-linux/2.4.0/gosu-0.11.0/mkmf.log

conftest.c:13:57: error: ‘TTF_RenderUTF8_Blended’ undeclared (first use in this function)
 int t(void) { void ((*volatile p)()); p = (void ((*)()))TTF_RenderUTF8_Blended; return !p; }
                                                         ^~~~~~~~~~~~~~~~~~~~~~
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in

libsdl2-ttf-dev is already the newest version (2.0.14+dfsg1-1).

g++ --version
g++ (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005

errors:

current directory: /home/sylvain/.rvm/gems/ruby-2.4.0-rc1/gems/gosu-0.11.0/ext/gosu
/home/sylvain/.rvm/rubies/ruby-2.4.0-rc1/bin/ruby -r ./siteconf20170111-16439-qy1y2o.rb extconf.rb
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 -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:

  /home/sylvain/.rvm/gems/ruby-2.4.0-rc1/extensions/x86_64-linux/2.4.0/gosu-0.11.0/mkmf.log

current directory: /home/sylvain/.rvm/gems/ruby-2.4.0-rc1/gems/gosu-0.11.0/ext/gosu
make "DESTDIR=" clean

current directory: /home/sylvain/.rvm/gems/ruby-2.4.0-rc1/gems/gosu-0.11.0/ext/gosu
make "DESTDIR="
compiling ../../src/Audio.cpp
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
In file included from ../../src/Audio.cpp:1:0:
../../src/ALChannelManagement.hpp: In member function ‘std::pair<int, int> Gosu::ALChannelManagement::reserve_channel()’:
../../src/ALChannelManagement.hpp:73:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (current_tokens[i] == NO_TOKEN) {
                     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../../src/ALChannelManagement.hpp: In member function ‘int Gosu::ALChannelManagement::source_if_still_playing(int, int) const’:
../../src/ALChannelManagement.hpp:89:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (channel != NO_FREE_CHANNEL && current_tokens[channel] == token) {
                                               ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from ../../src/OggFile.hpp:3:0,
                 from ../../src/Audio.cpp:2:
../../src/AudioFile.hpp: In member function ‘const std::vector<char>& Gosu::AudioFile::decoded_data()’:
../../src/AudioFile.hpp:48:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (read_bytes < INCREMENT) {
                     ~~~~~~~~~~~^~~~~~~~~~~
../../src/Audio.cpp: In member function ‘bool Gosu::SampleInstance::playing() const’:
../../src/Audio.cpp:76:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return false;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/Audio.cpp: In member function ‘bool Gosu::SampleInstance::paused() const’:
../../src/Audio.cpp:86:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return false;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/Audio.cpp: In member function ‘void Gosu::SampleInstance::pause()’:
../../src/Audio.cpp:96:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/Audio.cpp: In member function ‘void Gosu::SampleInstance::resume()’:
../../src/Audio.cpp:104:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/Audio.cpp: In member function ‘void Gosu::SampleInstance::stop()’:
../../src/Audio.cpp:116:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/Audio.cpp: In member function ‘void Gosu::SampleInstance::change_volume(double)’:
../../src/Audio.cpp:124:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/Audio.cpp: In member function ‘void Gosu::SampleInstance::change_pan(double)’:
../../src/Audio.cpp:132:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/Audio.cpp: In member function ‘void Gosu::SampleInstance::change_speed(double)’:
../../src/Audio.cpp:140:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (source == ALChannelManagement::NO_SOURCE) return;
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/cassert:44:0,
                 from ../../src/Audio.cpp:8:
../../src/Audio.cpp: In member function ‘Gosu::SampleInstance Gosu::Sample::play_pan(double, double, double, bool) const’:
../../src/Audio.cpp:222:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     assert (source != ALChannelManagement::NO_SOURCE);
             ~~~~~~~^~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
compiling ../../src/Bitmap.cpp
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
In file included from ../../Gosu/Bitmap.hpp:7:0,
                 from ../../src/Bitmap.cpp:1:
../../Gosu/Color.hpp:17:14: error: ‘uint32_t’ in namespace ‘std’ does not name a type
         std::uint32_t rep;
              ^~~~~~~~
../../Gosu/Color.hpp:25:22: error: ‘uint8_t’ in namespace ‘std’ does not name a type
         typedef std::uint8_t Channel;
                      ^~~~~~~
../../Gosu/Color.hpp:39:23: error: expected ‘)’ before ‘red’
         Color(Channel red, Channel green, Channel blue)
                       ^~~
../../Gosu/Color.hpp:44:23: error: expected ‘)’ before ‘alpha’
         Color(Channel alpha, Channel red, Channel green, Channel blue)
                       ^~~~~
../../Gosu/Color.hpp:56:32: error: ‘Channel’ has not been declared
         static Color from_ahsv(Channel alpha, double h, double s, double v);
                                ^~~~~~~
../../Gosu/Color.hpp:58:9: error: ‘Channel’ does not name a type
         Channel red() const
         ^~~~~~~
../../Gosu/Color.hpp:63:9: error: ‘Channel’ does not name a type
         Channel green() const
         ^~~~~~~
../../Gosu/Color.hpp:68:9: error: ‘Channel’ does not name a type
         Channel blue() const
         ^~~~~~~
../../Gosu/Color.hpp:73:9: error: ‘Channel’ does not name a type
         Channel alpha() const
         ^~~~~~~
../../Gosu/Color.hpp:78:22: error: ‘Channel’ has not been declared
         void set_red(Channel value)
                      ^~~~~~~
../../Gosu/Color.hpp:84:24: error: ‘Channel’ has not been declared
         void set_green(Channel value)
                        ^~~~~~~
../../Gosu/Color.hpp:90:23: error: ‘Channel’ has not been declared
         void set_blue(Channel value)
                       ^~~~~~~
../../Gosu/Color.hpp:96:24: error: ‘Channel’ has not been declared
         void set_alpha(Channel value)
                        ^~~~~~~
../../Gosu/Color.hpp:121:14: error: ‘uint32_t’ in namespace ‘std’ does not name a type
         std::uint32_t argb() const { return alpha() << 24 | red() << 16 | green() << 8 | blue(); }
              ^~~~~~~~
../../Gosu/Color.hpp:124:14: error: ‘uint32_t’ in namespace ‘std’ does not name a type
         std::uint32_t bgr() const { return blue() << 16 | green() << 8 | red(); }
              ^~~~~~~~
../../Gosu/Color.hpp:127:14: error: ‘uint32_t’ in namespace ‘std’ does not name a type
         std::uint32_t abgr() const { return alpha() << 24 | blue() << 16 | green() << 8 | red(); }
              ^~~~~~~~
../../Gosu/Color.hpp:130:14: error: ‘uint32_t’ in namespace ‘std’ does not name a type
         std::uint32_t gl() const { return rep; }
              ^~~~~~~~
../../Gosu/Color.hpp: In constructor ‘Gosu::Color::Color(unsigned int)’:
../../Gosu/Color.hpp:35:97: error: no matching function for call to ‘Gosu::Color::Color(unsigned int, unsigned int, unsigned int, unsigned int)’
         : Color((argb >> 24) & 0xff, (argb >> 16) & 0xff, (argb >> 8) & 0xff, (argb >> 0) & 0xff)
                                                                                                 ^
../../Gosu/Color.hpp:34:9: note: candidate: Gosu::Color::Color(unsigned int)
         Color(unsigned argb)
         ^~~~~
../../Gosu/Color.hpp:34:9: note:   candidate expects 1 argument, 4 provided
../../Gosu/Color.hpp:29:9: note: candidate: Gosu::Color::Color()
         Color()
         ^~~~~
../../Gosu/Color.hpp:29:9: note:   candidate expects 0 arguments, 4 provided
../../Gosu/Color.hpp:15:11: note: candidate: constexpr Gosu::Color::Color(const Gosu::Color&)
     class Color
           ^~~~~
../../Gosu/Color.hpp:15:11: note:   candidate expects 1 argument, 4 provided
../../Gosu/Color.hpp:15:11: note: candidate: constexpr Gosu::Color::Color(Gosu::Color&&)
../../Gosu/Color.hpp:15:11: note:   candidate expects 1 argument, 4 provided
../../Gosu/Color.hpp: In member function ‘void Gosu::Color::set_red(int)’:
../../Gosu/Color.hpp:80:13: error: ‘rep’ was not declared in this scope
             rep &= ~(0xff << RED_OFFSET);
             ^~~
../../Gosu/Color.hpp: In member function ‘void Gosu::Color::set_green(int)’:
../../Gosu/Color.hpp:86:13: error: ‘rep’ was not declared in this scope
             rep &= ~(0xff << GREEN_OFFSET);
             ^~~
../../Gosu/Color.hpp: In member function ‘void Gosu::Color::set_blue(int)’:
../../Gosu/Color.hpp:92:13: error: ‘rep’ was not declared in this scope
             rep &= ~(0xff << BLUE_OFFSET);
             ^~~
../../Gosu/Color.hpp: In member function ‘void Gosu::Color::set_alpha(int)’:
../../Gosu/Color.hpp:98:13: error: ‘rep’ was not declared in this scope
             rep &= ~(0xff << ALPHA_OFFSET);
             ^~~
../../Gosu/Color.hpp: In function ‘bool Gosu::operator<(Gosu::Color, Gosu::Color)’:
../../Gosu/Color.hpp:147:56: error: ‘class Gosu::Color’ has no member named ‘gl’
     inline bool operator<(Color a, Color b) { return a.gl() < b.gl(); }
                                                        ^~
../../Gosu/Color.hpp:147:65: error: ‘class Gosu::Color’ has no member named ‘gl’
     inline bool operator<(Color a, Color b) { return a.gl() < b.gl(); }
                                                                 ^~
../../Gosu/Color.hpp: In function ‘bool Gosu::operator==(Gosu::Color, Gosu::Color)’:
../../Gosu/Color.hpp:148:57: error: ‘class Gosu::Color’ has no member named ‘gl’
     inline bool operator==(Color a, Color b) { return a.gl() == b.gl(); }
                                                         ^~
../../Gosu/Color.hpp:148:67: error: ‘class Gosu::Color’ has no member named ‘gl’
     inline bool operator==(Color a, Color b) { return a.gl() == b.gl(); }
                                                                   ^~
../../Gosu/Color.hpp: In function ‘bool Gosu::operator!=(Gosu::Color, Gosu::Color)’:
../../Gosu/Color.hpp:149:57: error: ‘class Gosu::Color’ has no member named ‘gl’
     inline bool operator!=(Color a, Color b) { return a.gl() != b.gl(); }
                                                         ^~
../../Gosu/Color.hpp:149:67: error: ‘class Gosu::Color’ has no member named ‘gl’
     inline bool operator!=(Color a, Color b) { return a.gl() != b.gl(); }
                                                                   ^~
../../src/Bitmap.cpp: In function ‘void Gosu::apply_color_key(Gosu::Bitmap&, Gosu::Color)’:
../../src/Bitmap.cpp:99:34: error: ‘class Gosu::Color’ has no member named ‘red’
                     red += color.red();
                                  ^~~
../../src/Bitmap.cpp:100:36: error: ‘class Gosu::Color’ has no member named ‘green’; did you mean ‘set_green’?
                     green += color.green();
                                    ^~~~~
../../src/Bitmap.cpp:101:35: error: ‘class Gosu::Color’ has no member named ‘blue’; did you mean ‘value’?
                     blue += color.blue();
                                   ^~~~
../../src/Bitmap.cpp:104:88: error: no matching function for call to ‘Gosu::Color::Color(int, std::vector<Gosu::Color>::size_type, std::vector<Gosu::Color>::size_type, std::vector<Gosu::Color>::size_type)’
                     green / surrounding_colors.size(), blue / surrounding_colors.size()));
                                                                                        ^
In file included from ../../Gosu/Bitmap.hpp:7:0,
                 from ../../src/Bitmap.cpp:1:
../../Gosu/Color.hpp:34:9: note: candidate: Gosu::Color::Color(unsigned int)
         Color(unsigned argb)
         ^~~~~
../../Gosu/Color.hpp:34:9: note:   candidate expects 1 argument, 4 provided
../../Gosu/Color.hpp:29:9: note: candidate: Gosu::Color::Color()
         Color()
         ^~~~~
../../Gosu/Color.hpp:29:9: note:   candidate expects 0 arguments, 4 provided
../../Gosu/Color.hpp:15:11: note: candidate: constexpr Gosu::Color::Color(const Gosu::Color&)
     class Color
           ^~~~~
../../Gosu/Color.hpp:15:11: note:   candidate expects 1 argument, 4 provided
../../Gosu/Color.hpp:15:11: note: candidate: constexpr Gosu::Color::Color(Gosu::Color&&)
../../Gosu/Color.hpp:15:11: note:   candidate expects 1 argument, 4 provided
../../src/Bitmap.cpp: In function ‘void Gosu::unapply_color_key(Gosu::Bitmap&, Gosu::Color)’:
../../src/Bitmap.cpp:112:16: error: ‘class Gosu::Color’ has no member named ‘alpha’
         if (p->alpha() == 0)
                ^~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
Makefile:233 : la recette pour la cible « Bitmap.o » a échouée
make: *** [Bitmap.o] Erreur 1

make failed, exit code 2
@jlnr jlnr closed this as completed in 51182b3 Jan 12, 2017
@jlnr
Copy link
Member

jlnr commented Jan 12, 2017

The message about SDL2_ttf might be misleading. I think the real problem is that I forgot #include <cstdint> in Color.hpp, and somehow no other compiler has caught that mistake.

To make sure that this has really fixed the issue, I've pushed gosu-0.11.1.pre1, so please run gem install gosu --pre and see if that works.

@jlnr jlnr self-assigned this Jan 12, 2017
@Sylvain303
Copy link
Author

Yes, it worked to install. Thanks.

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

No branches or pull requests

2 participants