Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL issue on Raspberry Pi2 #395

Open
erwan35 opened this issue Feb 19, 2015 · 17 comments
Open

SDL issue on Raspberry Pi2 #395

erwan35 opened this issue Feb 19, 2015 · 17 comments

Comments

@erwan35
Copy link

erwan35 commented Feb 19, 2015

Hello,

I'm trying to have emulationstation running on Raspberry Pi2 (archlinux).

I'm not sure whether the problem is coming from the raspberry, archlinux, sdl2 or emulationstation but at least I got to start somewhere :)

The first try I have done was to use https://aur.archlinux.org/packages/em/emulationstation-git-unstable-rpi/PKGBUILD which rely on https://aur.archlinux.org/packages/sd/sdl2-opengles/PKGBUILD because I wanted to launch it from the console.

The result is :
[erwan@pi2 ~]$ emulationstation
lvl0: Error initializing SDL!
No available video device
lvl0: Renderer failed to initialize!
lvl0: Window failed to initialize!
(same result under X11)

So I decided to try with https://aur.archlinux.org/packages/em/emulationstation-git/PKGBUILD (which doesn't rely on https://aur.archlinux.org/packages/sd/sdl2-opengles/PKGBUILD and the result is the same on the console and I got this under X11 :

[erwan@pi2 ~]$ emulationstation
lvl0: Error creating SDL window!
Couldn't find matching GLX visual
lvl0: Renderer failed to initialize!
lvl0: Window failed to initialize!

Do you think of anything I should try to have this cool piece of software working ?

Cheers
Erwan

@Aloshi
Copy link
Owner

Aloshi commented Feb 21, 2015

I've actually run into this issue myself. I think it's because SDL2 isn't properly compiling in the Raspberry Pi video driver. I believe RetroPie compiles SDL2 with ./configure --disable-video-opengl, which unintuitively makes SDL2 include the RPi OpenGL ES stuff (here, and I've seen it mentioned elsewhere). I haven't had a chance to test this myself, but it's somewhere to start.

@bkacjios
Copy link

I too have this issue. Followed the build directions for standalone.

@erwan35
Copy link
Author

erwan35 commented Feb 25, 2015

Hello,

I got it ! At least on archlinux but that should be the same on raspbian.

[root@pi2 ~]# /usr/share/libtool/build-aux/config.guess
armv7l-unknown-linux-gnueabihf

So it not matching :

    case "$host" in
         *-raspberry-linux*)

in SDL2-2.0.3 ./configure

The result of the ldd is :

[root@pi2 ~]# ldd /usr/lib/libSDL2-2.0.so.0.2.1.orig
libm.so.6 => /usr/lib/libm.so.6 (0x76de4000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x76dcf000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x76da7000)
librt.so.1 => /usr/lib/librt.so.1 (0x76d90000)
libc.so.6 => /usr/lib/libc.so.6 (0x76c50000)
/usr/lib/ld-linux-armhf.so.3 (0x76f52000)

instead of :

[root@pi2 ~]# ldd /usr/lib/libSDL2-2.0.so.0.2.1
libm.so.6 => /usr/lib/libm.so.6 (0x76daf000)
libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x76d91000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x76d7c000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x76d54000)
librt.so.1 => /usr/lib/librt.so.1 (0x76d3c000)
libc.so.6 => /usr/lib/libc.so.6 (0x76bfd000)
libvcos.so => /opt/vc/lib/libvcos.so (0x76beb000)
libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x76bdd000)
/usr/lib/ld-linux-armhf.so.3 (0x76f3a000)

Several workarounds :

  • modify ./configure so it match the guess :
    -raspberry-linux|armv7l-unknown-linux-gnueabihf)
  • pass an extra option to the ./configure
    --host=arm-raspberry-linux-gnueabihf

But the best would be to have the host guess working but that's another story :)

Cheers
Erwan

@bkacjios
Copy link

Yeah, that fixed it for me too. Thanks!

@NGamba
Copy link

NGamba commented Mar 2, 2015

HI !
I have the same trouble, running Emulationstation on Raspbian ! Where do I launch ./configure on Raspbian ? Thanks for your help !

@delston
Copy link

delston commented Mar 3, 2015

This makes me sad, any idea when this will be resolved? Come on bring me joy by fixing this :)

@ostroso
Copy link

ostroso commented May 5, 2015

Hi, i've the same problem but on x86 architecture.
I'm trying to have a retropie-like system on intel broadwell without Xorg based on ArchLinux.
Retroarch works blazing fast but i can't run EmulationStation due to those sdl2 compiling problems. I've achieved to compile sdl2 with directfb support but when i launch

export SDL_VIDEODRIVER=directfb && emulationstation

it hangs up without output. But the system is not freezed because if i turn it off it shows the logout output.
Has anyone tried and succeed on doing such a thing on x86?

@ignaciohita
Copy link

I fixed following these instructions:
https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/

@ryanbillingsley
Copy link

Much thanks to @ignaciohita for that link. Using those instructions and re-installing retropie fixed my issues.

@ignaciohita
Copy link

You're welcome! I think admin should update the stand alone guide instructions to include that, because if you follow current steps in Raspberry Pi 2 is not working, you have to install SDL2 in the way described in the link I supplied.

@snigel
Copy link

snigel commented Sep 21, 2015

The current guide says that the freetype path may need to be added for rpi2. I had to add it for rpi1.
I created a ticket on a few oddities in the installation guide, issue #514

@davecahill
Copy link

+1 on @ignaciohita 's link - worked for me too on Raspberry Pi 2 Model B.

@proplayer77
Copy link

i have a raspberry pi 2 B also but im new to console, need to learn more. But need this RP working for my retropie arcade project so is it possible to get "noob" instructions, how to get to that file, edit it and how to save it.

I get this same:

lvl0: Error initializing SDL!
No available displays
lvl0: Renderer failed to initialize!
lvl0: Window failed to initialize!
pi@retropie:~ $

im using mobaXterm and Xming, so i use Putty SSH style for now to get it running first.

@robertybob
Copy link

@proplayer77 Just use RetroPie ?

@proplayer77
Copy link

im using it?

@proplayer77
Copy link

but dont have hdmi display in use now to test retropie. Or of course my tv would do the trick.

@robertybob
Copy link

Then you want the RetroPie forums, they use a different Emulationstation to this one.

mmatyas pushed a commit to mmatyas/EmulationStation that referenced this issue Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests