SFML community forums

Help => General => Topic started by: Cpl.Bator on October 30, 2015, 02:37:15 pm

Title: raspberry pi 2
Post by: Cpl.Bator on October 30, 2015, 02:37:15 pm
Hi everyone, i start new topic with RPI2 and the last SFML version. i use cmake-qt-gui for visualize easily informations , firstly i've got an error with  OPENGL_gl_LIBRARY , i use gles , i cheat with /usr/lib/arm-linux-gnueabihf/libEGL.so for bypass the error.
After configuration is okay , i launch a compilation with sample , i've got no error with the library , just with an example :
(click to show/hide)

the sfml lib has been created in my build/lib/ folder, i launch an ldd -r on sfml-graphics part for see if library have a problem , and i see that's :

(click to show/hide)

i've got a lot of undefined symbol xcb_randr... , but , i have installed the dev lib.
Title: Re: raspberry pi 2
Post by: eXpl0it3r on October 31, 2015, 02:32:52 am
Well what dev libs have you installed? xcb randr?
Title: Re: raspberry pi 2
Post by: Cpl.Bator on October 31, 2015, 03:27:51 am
yes, libxcb_randr0-dev.
Title: Re: raspberry pi 2
Post by: Mario on November 02, 2015, 09:01:05 am
While I haven't tried it on my Raspberry Pi 2, I think it's similar to the first Raspberry Pi: Hardware acceleration works differently compared to normal desktop systems, as such don't expect high performance just yet (but feel free to do some research on context creation and try to fix it :)).

It should compile just fine though.
Title: Re: raspberry pi 2
Post by: Cpl.Bator on November 02, 2015, 10:52:48 am
the compilation is not the problem, the problem is broken symbol link. maybe error in cmakelist ?
Title: Re: raspberry pi 2
Post by: eXpl0it3r on November 02, 2015, 11:07:31 am
You can always try to add the missing lib yourself.

What version of SFML are you using?
Title: Re: raspberry pi 2
Post by: Cpl.Bator on November 02, 2015, 09:13:54 pm
the 2.3.2. How can add dependencies with cmake (with sfml cmake files) ? there is already FindXCB.cmake in cmake/modules folder.
 
Title: Re: raspberry pi 2
Post by: eXpl0it3r on November 02, 2015, 10:45:11 pm
You can start by simply adding the lib to the linker flag in CMake.
Title: Re: raspberry pi 2
Post by: Cpl.Bator on November 03, 2015, 03:26:39 pm
There is no effect with add lib to CMAKE_xxx_LINKER_FLAGS , i test with a simple example i've been found on tutorial here : http://www.sfml-dev.org/tutorials/2.3/graphics-draw.php

i compile in command line :
g++ main.cpp -lsfml-system -lsfml-window -lsfml-graphics -lxcb-randr -lxcb-util -lxcb-image
i add some lib to avoid ldd error

when i launch program i've got an ouput error with gles :

libEGL warning: DRI2: failed to authenticate
Failed to create window
Failed to activate the window's context
Erreur de segmentation
 

Laurent, for christmass , do you want a rpi2 ? :)
Title: Re: raspberry pi 2
Post by: Mario on November 03, 2015, 03:55:25 pm
That's most likely happening due to the issue described: Context creation works differently on the Raspberry Pi (2) and normal desktop code won't run out of the box.
Title: Re: raspberry pi 2
Post by: Cpl.Bator on November 03, 2015, 04:06:02 pm
Is strange, SFML support GLES ? without gles , sfml work fine on rpi2 ( with window at desktop size )
Title: Re: raspberry pi 2
Post by: Cpl.Bator on November 03, 2015, 05:30:35 pm
Thanks exploit3r to get me on the right way.
i add "-lGLESv1_CM -lGLESv2 -lEGL -lxcb-randr -lxcb-util -lxcb-image" on CMAKE_SHARED_LINKER_FLAG to avoid ldd -r error's.
Fine, but, i think i dont use hardware graphics, there is no difference between soft/hard in performance ( just turn sprite with deltatime is "jumpy" in two case ).