nephewtom / supertux

Automatically exported from code.google.com/p/supertux
GNU General Public License v3.0
0 stars 0 forks source link

Build fail when compiling with gcc #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. in the mac terminal type:  cmake .. -DCMAKE_INSTALL_PREFIX=../dist/ 
-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER=gcc -DCMAKE_C_COMPILER=gcc && 
make
2.
3.

What is the expected output? What do you see instead?
Meyley of build fail 
[ 33%] Building CXX object CMakeFiles/supertux2.dir/src/lisp/parser.cpp.o
In file included from 
/Users/benjaminleduc/Codes-sources/supertux/src/lisp/parser.cpp:23:0:
/Users/benjaminleduc/Codes-sources/supertux/src/lisp/parser.hpp: In constructor 
'lisp::Parser::Parser(bool)':
/Users/benjaminleduc/Codes-sources/supertux/src/lisp/parser.hpp:65:18: warning: 
'lisp::Parser::obst' will be initialized after [-Wreorder]
   struct obstack obst;
                  ^
/Users/benjaminleduc/Codes-sources/supertux/src/lisp/parser.hpp:63:10: warning: 
  'char** lisp::Parser::searchpath' [-Wreorder]
   char** searchpath;
          ^
/Users/benjaminleduc/Codes-sources/supertux/src/lisp/parser.cpp:33:1: warning:  
 when initialized here [-Wreorder]
 Parser::Parser(bool translate) :
 ^

[ 75%] Building CXX object CMakeFiles/supertux2.dir/src/supertux/main.cpp.o
In file included from 
/Users/benjaminleduc/Codes-sources/supertux/src/audio/sound_manager.hpp:24:0,
                 from /Users/benjaminleduc/Codes-sources/supertux/src/supertux/main.cpp:39:
/System/Library/Frameworks/OpenAL.framework/Headers/al.h:30:0: warning: 
ignoring #pragma export on [-Wunknown-pragmas]
  #pragma export on
 ^
In file included from 
/Users/benjaminleduc/Codes-sources/supertux/src/audio/sound_manager.hpp:24:0,
                 from /Users/benjaminleduc/Codes-sources/supertux/src/supertux/main.cpp:39:
/System/Library/Frameworks/OpenAL.framework/Headers/al.h:717:0: warning: 
ignoring #pragma export off [-Wunknown-pragmas]
  #pragma export off
 ^
In file included from 
/Users/benjaminleduc/Codes-sources/supertux/src/audio/sound_manager.hpp:25:0,
                 from /Users/benjaminleduc/Codes-sources/supertux/src/supertux/main.cpp:39:
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:30:0: warning: 
ignoring #pragma export on [-Wunknown-pragmas]
  #pragma export on
 ^
In file included from 
/Users/benjaminleduc/Codes-sources/supertux/src/audio/sound_manager.hpp:25:0,
                 from /Users/benjaminleduc/Codes-sources/supertux/src/supertux/main.cpp:39:
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:274:0: warning: 
ignoring #pragma export off [-Wunknown-pragmas]
  #pragma export off
 ^

/Users/benjaminleduc/Codes-sources/supertux/src/util/utf8_iterator.cpp:27:13: 
warning: 'std::string {anonymous}::encode_utf8(uint32_t)' declared 'static' but 
never defined [-Wunused-function]
 std::string encode_utf8(uint32_t code);
             ^
/Users/benjaminleduc/Codes-sources/supertux/src/video/sdl/sdl_renderer.cpp:31:14
: warning: 'SDL_Surface* {anonymous}::apply_alpha(SDL_Surface*, float)' defined 
but not used [-Wunused-function]
 SDL_Surface *apply_alpha(SDL_Surface *src, float alpha_factor)
              ^
In file included from 
/Users/benjaminleduc/Codes-sources/supertux/src/audio/ogg_sound_file.hpp:21:0,
                 from /Users/benjaminleduc/Codes-sources/supertux/src/audio/ogg_sound_file.cpp:17:
/usr/local/include/vorbis/vorbisfile.h:75:21: warning: 'OV_CALLBACKS_DEFAULT' 
defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_DEFAULT = {
                     ^
/usr/local/include/vorbis/vorbisfile.h:82:21: warning: 'OV_CALLBACKS_NOCLOSE' 
defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_NOCLOSE = {
                     ^
/usr/local/include/vorbis/vorbisfile.h:89:21: warning: 
'OV_CALLBACKS_STREAMONLY' defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_STREAMONLY = {
                     ^
/usr/local/include/vorbis/vorbisfile.h:96:21: warning: 
'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = {
                     ^
In file included from 
/Users/benjaminleduc/Codes-sources/supertux/src/audio/ogg_sound_file.hpp:21:0,
                 from /Users/benjaminleduc/Codes-sources/supertux/src/audio/sound_file.cpp:28:
/usr/local/include/vorbis/vorbisfile.h:75:21: warning: 'OV_CALLBACKS_DEFAULT' 
defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_DEFAULT = {
                     ^
/usr/local/include/vorbis/vorbisfile.h:82:21: warning: 'OV_CALLBACKS_NOCLOSE' 
defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_NOCLOSE = {
                     ^
/usr/local/include/vorbis/vorbisfile.h:89:21: warning: 
'OV_CALLBACKS_STREAMONLY' defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_STREAMONLY = {
                     ^
/usr/local/include/vorbis/vorbisfile.h:96:21: warning: 
'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used [-Wunused-variable]
 static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = {

Original issue reported on code.google.com by G.Benjam...@gmail.com on 5 Mar 2014 at 1:13

GoogleCodeExporter commented 9 years ago
It looks like you missed the punch-line with your copied output.  However, I 
found that building fails on Linux as well with the error:

/usr/bin/ld: CMakeFiles/supertux2.dir/src/object/level_time.cpp.o: undefined 
reference to symbol 'floor@@GLIBC_2.2.5'
/usr/bin/ld: note: 'floor@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so 
try adding it to the linker command line

Although it appears to tell you exactly how to fix the problem, I wasn't able 
to do it in the short time I had with my rudimentary knowledge.

Original comment by LMH.0...@gmail.com on 8 Mar 2014 at 7:14

GoogleCodeExporter commented 9 years ago

Original comment by to...@mozilla-uk.org on 10 Mar 2014 at 12:01

GoogleCodeExporter commented 9 years ago
The floor@@GLIBC_2.2.5 issue looks like an inconsistent build, remove build 
directory and try again.

Also the C++ compiler should probably be: -DCMAKE_CXX_COMPILER=g++, not gcc.

Original comment by grum...@gmail.com on 11 Aug 2014 at 7:00