Page 1 of 1

error when building the git version

PostPosted: 17 May 2014, 18:12
by jin
Hi all,

I tried to build the git version but not successful because of an error:

{l Code}: {l Select All Code}
.../stk-code/src/states_screens/dialogs/registration_dialog.cpp: In member function ‘virtual GUIEngine::EventPropagation RegistrationDialog::processEvent(const string&)’:
.../stk-code/src/states_screens/dialogs/registration_dialog.cpp:77:13: error: reference to ‘Screen’ is ambiguous
             Screen *s = GUIEngine::getCurrentScreen();
             ^
In file included from /usr/include/GL/glx.h:30:0,
                 from .../stk-code/src/graphics/../../lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h:63,
                 from .../stk-code/src/graphics/../../lib/irrlicht/source/Irrlicht/COpenGLDriver.h:25,
                 from .../stk-code/src/graphics/glwrap.hpp:32,
                 from .../stk-code/src/graphics/rtts.hpp:20,
                 from .../stk-code/src/graphics/irr_driver.hpp:50,
                 from .../stk-code/src/guiengine/widgets/model_view_widget.hpp:25,
                 from .../stk-code/src/guiengine/widgets.hpp:29,
                 from .../stk-code/src/states_screens/dialogs/registration_dialog.cpp:22:
/usr/include/X11/Xlib.h:287:3: note: candidates are: typedef struct Screen Screen
 } Screen;
   ^
In file included from .../stk-code/src/guiengine/abstract_state_manager.hpp:25:0,
                 from .../stk-code/src/states_screens/state_manager.hpp:31,
                 from .../stk-code/src/states_screens/dialogs/registration_dialog.cpp:23:
.../stk-code/src/guiengine/screen.hpp:97:11: note:                 class GUIEngine::Screen
     class Screen : public AbstractTopLevelContainer
           ^

.../stk-code/src/states_screens/dialogs/registration_dialog.cpp:78:64: error: cannot dynamic_cast ‘s’ (of type ‘std::string {aka class std::basic_string<char>}’) to type ‘class RegisterScreen*’ (source is not a pointer)
             RegisterScreen *r = dynamic_cast<RegisterScreen*>(s);
                                                                ^
In file included from .../stk-code/src/graphics/rtts.hpp:20:0,
                 from .../stk-code/src/graphics/irr_driver.hpp:50,
                 from .../stk-code/src/states_screens/dialogs/select_challenge.cpp:24:
.../stk-code/src/graphics/glwrap.hpp:108:19: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 template<typename ... Types>
                   ^
.../stk-code/src/graphics/glwrap.hpp:114:19: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 template<typename ... Types>
                   ^
.../stk-code/src/graphics/glwrap.hpp:115:87: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 void loadAndAttach(GLint ProgramID, GLint ShaderType, const char *filepath, Types ... args)
                                                                                       ^
.../stk-code/src/graphics/glwrap.hpp:123:19: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 template<typename ...Types>
                   ^
.../stk-code/src/graphics/glwrap.hpp:129:19: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 template<typename ...Types>
                   ^
.../stk-code/src/graphics/glwrap.hpp:130:70: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 void printFileList(GLint ShaderType, const char *filepath, Types ... args)
                                                                      ^
.../stk-code/src/graphics/glwrap.hpp:136:19: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 template<typename ... Types>
                   ^
.../stk-code/src/graphics/glwrap.hpp:137:29: warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
 GLint LoadProgram(Types ... args)
                             ^

make[2]: *** [CMakeFiles/supertuxkart.dir/src/states_screens/dialogs/registration_dialog.cpp.o] Error 1


Information of my system:
Ubuntu 14.04 x64
gcc version 4.8.2

Can anyone help me with this?

Thanks!

Re: error when building the git version

PostPosted: 17 May 2014, 19:52
by WillemS
Same problem here when compiling Git version 7fcd7a3...

I get a slightly different error message:
{l Code}: {l Select All Code}
/home/willem/SuperTuxKart/stk-code/src/states_screens/dialogs/track_info_dialog.cpp: In destructor ‘virtual TrackInfoDialog::~TrackInfoDialog()’:
/home/willem/SuperTuxKart/stk-code/src/states_screens/dialogs/track_info_dialog.cpp:176:5: fout: reference to ‘Screen’ is ambiguous
     Screen* curr_screen = GUIEngine::getCurrentScreen();
     ^
In file included from /usr/include/GL/glx.h:30:0,
                 from /home/willem/SuperTuxKart/stk-code/src/graphics/../../lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h:63,
                 from /home/willem/SuperTuxKart/stk-code/src/graphics/../../lib/irrlicht/source/Irrlicht/COpenGLDriver.h:25,
                 from /home/willem/SuperTuxKart/stk-code/src/graphics/glwrap.hpp:32,
                 from /home/willem/SuperTuxKart/stk-code/src/graphics/rtts.hpp:20,
                 from /home/willem/SuperTuxKart/stk-code/src/graphics/irr_driver.hpp:50,
                 from /home/willem/SuperTuxKart/stk-code/src/states_screens/dialogs/track_info_dialog.cpp:23:
/usr/include/X11/Xlib.h:287:3: note: kandidaten zijn: typedef struct Screen Screen
 } Screen;
   ^
In file included from /home/willem/SuperTuxKart/stk-code/src/states_screens/dialogs/track_info_dialog.cpp:25:0:
/home/willem/SuperTuxKart/stk-code/src/guiengine/screen.hpp:97:11: note:                  class GUIEngine::Screen
     class Screen : public AbstractTopLevelContainer
           ^
/home/willem/SuperTuxKart/stk-code/src/states_screens/dialogs/track_info_dialog.cpp:176:13: fout: ‘curr_screen’ was not declared in this scope
     Screen* curr_screen = GUIEngine::getCurrentScreen();
             ^
make[2]: *** [CMakeFiles/supertuxkart.dir/src/states_screens/dialogs/track_info_dialog.cpp.o] Fout 1
make[1]: *** [CMakeFiles/supertuxkart.dir/all] Fout 2
make: *** [all] Fout 2


This probably happened today, since I also pulled and compiled Git version 4331a5c this afternoon, and that went fine. ;)

Re: error when building the git version

PostPosted: 18 May 2014, 13:20
by hiker
Hi,
WillemS {l Wrote}:This probably happened today, since I also pulled and compiled Git version 4331a5c this afternoon, and that went fine. ;)

I've tried to fix the compilation issues in c11946. Could you check if that helped, since I can't reproduce the problem on my linux (nor our travis ci).

Cheers,
Joerg

Re: error when building the git version

PostPosted: 18 May 2014, 13:52
by WillemS
For me, version c119460 compiles again, but it seems like there are problems with the rendering now (on the new Chocolate track). It seems like nothing is painted anymore, except for the GUI:
Image
Furthermore, with the "Old Mine light test" track, I get a segfault when starting the race:
{l Code}: {l Select All Code}
Program received signal SIGSEGV, Segmentation fault.
0x000000000061fe58 in IrrDriver::generateSkyboxCubemap() ()
(gdb) bt
#0  0x000000000061fe58 in IrrDriver::generateSkyboxCubemap() ()
#1  0x00000000006207f8 in IrrDriver::renderSkybox(irr::scene::ICameraSceneNode const*) ()
#2  0x00000000006221b8 in IrrDriver::renderScene(irr::scene::ICameraSceneNode*, std::vector<IrrDriver::GlowData, std::allocator<IrrDriver::GlowData> >&, float, bool) ()
#3  0x00000000006229f0 in IrrDriver::renderGLSL(float) ()
#4  0x0000000000659b9d in IrrDriver::update(float) ()
#5  0x00000000006077a3 in MainLoop::run() ()
#6  0x00000000005bf1a5 in main ()


Yesterday in version 4331a5c the graphics seemed to work normally, and I didn't get a segfault there.

For reference, I am using the closed-source fglrx driver for ATI. (I switched yesterday from the open-source radeon driver to fglrx, since radeon doesn't seem to be able to run the new version of STK at all anymore ;) I'm not complaining at all; the new graphics look great!)

Edit: Git-version 0ccac4c is not compiling anymore :(
{l Code}: {l Select All Code}
[ 57%] Building CXX object CMakeFiles/supertuxkart.dir/src/graphics/render.cpp.o
/home/willem/SuperTuxKart/stk-code/src/graphics/render.cpp:36:42: fatale fout: graphics/shadow_importance.hpp: Bestand of map bestaat niet
 #include "graphics/shadow_importance.hpp"
                                          ^
compilation terminated.
make[2]: *** [CMakeFiles/supertuxkart.dir/src/graphics/render.cpp.o] Fout 1
make[1]: *** [CMakeFiles/supertuxkart.dir/all] Fout 2
make: *** [all] Fout 2

(Bestand of map bestaat niet means: File or folder does not exist.)
I don't know if that is related, though...

Re: error when building the git version

PostPosted: 19 May 2014, 00:01
by hiker
WillemS {l Wrote}:For me, version c119460 compiles again, but it seems like there are problems with the rendering now (on the new Chocolate track). It seems like nothing is painted anymore, except for the GUI:

There is a lot of work happening on the graphics side of things, so by now this might have changed again. If not, ideally try to contact us on irc: since typically we can't reproduce the problems, we might need your help to fix them.
...
Edit: Git-version 0ccac4c is not compiling anymore :(
{l Code}: {l Select All Code}
[ 57%] Building CXX object CMakeFiles/supertuxkart.dir/src/graphics/render.cpp.o
/home/willem/SuperTuxKart/stk-code/src/graphics/render.cpp:36:42: fatale fout: graphics/shadow_importance.hpp: Bestand of map bestaat niet
 #include "graphics/shadow_importance.hpp"
                                          ^
compilation terminated.
make[2]: *** [CMakeFiles/supertuxkart.dir/src/graphics/render.cpp.o] Fout 1
make[1]: *** [CMakeFiles/supertuxkart.dir/all] Fout 2
make: *** [all] Fout 2

(Bestand of map bestaat niet means: File or folder does not exist.)
I don't know if that is related, though...

Do a 'touch sources.cmake' (in the top folder of STK), that will fix this issue.

Cheers,
Joerg

Re: error when building the git version

PostPosted: 19 May 2014, 19:04
by jin
Hi,

I've compiled the git version: ebcce3d. There's no compilation error now :) . I can enter the user interface. But when I tried to start a race, the program crashed :cry: .

{l Code}: {l Select All Code}
[warn   ] [IrrDriver Temp Logger]: Level 2: X Error: GLXBadFBConfig
[warn   ] [IrrDriver Temp Logger]: Level 2: From call : unknown
[warn   ] [IrrDriver Temp Logger]: Level 3: Vertex shader compilation failed at position -1:
[warn   ] [IrrDriver Temp Logger]: Level 3: Pixel shader compilation failed at position -1:
[warn   ] [IrrDriver Temp Logger]: Level 3: Vertex shader compilation failed at position -1:
[warn   ] [IrrDriver Temp Logger]: Level 3: Pixel shader compilation failed at position -1:
[info   ] IrrDriver: OPENGL VERSION IS 3.3
[info   ] irr_driver: GLSL supported.
...
[error  ] GLWrap: Error in shader
[error  ] GLWrap: 0:3(1): error: syntax error, unexpected $end
[error  ] GLWrapp: Error when linking these shaders :
[error  ] GLWrapp: ../data/shaders/screenquad.vert
[error  ] GLWrapp:
[error  ] GLWrapp: error: linking with uncompiled shader
[error  ] GLWrap: Error in shader
[error  ] GLWrap: 0:3(1): error: syntax error, unexpected $end
...
[error  ] GLWrapp: Error when linking these shaders :
[error  ] GLWrapp: ../data/shaders/screenquad.vert
[error  ] GLWrapp:
[error  ] GLWrapp: error: linking with uncompiled shader
...
[error  ] Irrlicht: Could not load texture: ../data/../../stk-assets/tracks/20_luna/
[error  ] irr_driver: Texture '../data/../../stk-assets/tracks/20_luna/' not found.
[error  ] icon_button: Texture '../data/../../stk-assets/tracks/20_luna/' not found!


Here is my mesa version:
{l Code}: {l Select All Code}
$ glxinfo | grep "OpenGL version"
OpenGL version string: 3.0 Mesa 10.1.0

Re: error when building the git version

PostPosted: 24 May 2014, 01:10
by Auria
jin {l Wrote}:Hi,

I've compiled the git version: ebcce3d. There's no compilation error now :) . I can enter the user interface. But when I tried to start a race, the program crashed :cry: .

{l Code}: {l Select All Code}
[warn   ] [IrrDriver Temp Logger]: Level 2: X Error: GLXBadFBConfig
[warn   ] [IrrDriver Temp Logger]: Level 2: From call : unknown
[warn   ] [IrrDriver Temp Logger]: Level 3: Vertex shader compilation failed at position -1:
[warn   ] [IrrDriver Temp Logger]: Level 3: Pixel shader compilation failed at position -1:
[warn   ] [IrrDriver Temp Logger]: Level 3: Vertex shader compilation failed at position -1:
[warn   ] [IrrDriver Temp Logger]: Level 3: Pixel shader compilation failed at position -1:
[info   ] IrrDriver: OPENGL VERSION IS 3.3
[info   ] irr_driver: GLSL supported.
...
[error  ] GLWrap: Error in shader
[error  ] GLWrap: 0:3(1): error: syntax error, unexpected $end
[error  ] GLWrapp: Error when linking these shaders :
[error  ] GLWrapp: ../data/shaders/screenquad.vert
[error  ] GLWrapp:
[error  ] GLWrapp: error: linking with uncompiled shader
[error  ] GLWrap: Error in shader
[error  ] GLWrap: 0:3(1): error: syntax error, unexpected $end
...
[error  ] GLWrapp: Error when linking these shaders :
[error  ] GLWrapp: ../data/shaders/screenquad.vert
[error  ] GLWrapp:
[error  ] GLWrapp: error: linking with uncompiled shader
...
[error  ] Irrlicht: Could not load texture: ../data/../../stk-assets/tracks/20_luna/
[error  ] irr_driver: Texture '../data/../../stk-assets/tracks/20_luna/' not found.
[error  ] icon_button: Texture '../data/../../stk-assets/tracks/20_luna/' not found!


Here is my mesa version:
{l Code}: {l Select All Code}
$ glxinfo | grep "OpenGL version"
OpenGL version string: 3.0 Mesa 10.1.0


Hi,

could you please re-test? this problem might now have been fixed