SFML community forums

Help => General => Topic started by: Cpl.Bator on June 08, 2015, 09:30:46 am

Title: Raspberry PI 2
Post by: Cpl.Bator on June 08, 2015, 09:30:46 am
Hello everyone, i've got problem when i compile SFML 2.3 on my PI2 with GLES.
i've got wrong header location :

[ 18%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o
In file included from /opt/vc/include/interface/vcos/vcos_assert.h:149:0,
                 from /opt/vc/include/interface/vcos/vcos.h:114,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from /home/pi/SFML-2.3/src/SFML/Window/EGLCheck.hpp:32,
                 from /home/pi/SFML-2.3/src/SFML/Window/EglContext.hpp:33,
                 from /home/pi/SFML-2.3/src/SFML/Window/GlContext.cpp:66:
/opt/vc/include/interface/vcos/vcos_types.h:38:33: fatal error: vcos_platform_types.h: Aucun fichier ou dossier de ce type
compilation terminated.
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:80: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o] Error 1
CMakeFiles/Makefile2:155: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2


vcos_types.h call vcos_platform_types.h with include in the same location, but vcos_platform_types.h is inside child folder ( pthreads ).

without GLES , SFML-2.3 work fine, but in software... ;)
Title: Re: Raspberry PI 2
Post by: Mario on June 08, 2015, 09:46:23 am
This seems to be a platform bug, since it's included from a system provided header, not SFML.

Issue and discussion on GitHub. (https://github.com/raspberrypi/firmware/issues/34)
Title: Re: Raspberry PI 2
Post by: Cpl.Bator on June 08, 2015, 08:00:02 pm
yes, i known this "bug", but, when i resolve him, i've got another problem :

[ 16%] Built target sfml-system
[ 17%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o
In file included from /home/pi/SFML-2.3/src/SFML/Window/GlContext.cpp:66:0:
/home/pi/SFML-2.3/src/SFML/Window/EglContext.hpp:163:12: error: ‘XVisualInfo’ does not name a type
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:80: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o] Error 1
CMakeFiles/Makefile2:155: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
 
Title: Re: Raspberry PI 2
Post by: Mario on June 08, 2015, 08:20:47 pm
Okay, that sounds more like a SFML thing. :)

Edit:

Try to include "<X11/Xutil.h>" in EglContext.hpp. You might want to try the 2.3.x branch on GitHub as well.
Title: Re: Raspberry PI 2
Post by: Cpl.Bator on June 09, 2015, 12:07:37 am
sfml compile fine, no error, but, when i try to compile an sfml program, i've got a lot of undefined reference (xcb_...) on libsfml-window.so and glblendequation0ES on graphic.so. all dependencies are installed (gles & lot of xcb x11, in dev version )
i don't understand.
Title: Re: Raspberry PI 2
Post by: Mario on June 10, 2015, 10:19:34 am
Are you building static or shared SFML? That shouldn't happen with the shared version (as they're already linked).
Title: Re: Raspberry PI 2
Post by: Cpl.Bator on June 10, 2015, 11:20:28 am
in shared, that's what i don't understand this behavior. i will try after work the ldd command on all SFML lib to see the dependencies.