Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: raspberry pi 2  (Read 7500 times)

0 Members and 1 Guest are viewing this topic.

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
raspberry pi 2
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: raspberry pi 2
« Reply #1 on: October 31, 2015, 02:32:52 am »
Well what dev libs have you installed? xcb randr?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: raspberry pi 2
« Reply #2 on: October 31, 2015, 03:27:51 am »
yes, libxcb_randr0-dev.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: raspberry pi 2
« Reply #3 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.

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: raspberry pi 2
« Reply #4 on: November 02, 2015, 10:52:48 am »
the compilation is not the problem, the problem is broken symbol link. maybe error in cmakelist ?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: raspberry pi 2
« Reply #5 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?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: raspberry pi 2
« Reply #6 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.
 

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: raspberry pi 2
« Reply #7 on: November 02, 2015, 10:45:11 pm »
You can start by simply adding the lib to the linker flag in CMake.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: raspberry pi 2
« Reply #8 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 ? :)

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: raspberry pi 2
« Reply #9 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.

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: raspberry pi 2
« Reply #10 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 )

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: raspberry pi 2
« Reply #11 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 ).

 

anything