Tagged with archlinuxarm

EmulationStation: "Error initializing SDL!" on Raspberry Pi 2

I installed Arch Linux ARM on my rPi2, overwriting Raspbian. AUR has all the packages I need to build a game station myself. I built EmulationStation (git) with makepkg, but it wouldn't start:

[tristan@rpi2 ~]$ emulationstation 
lvl0:   Error initializing SDL!
        No available video device
lvl0:   Renderer failed to initialize!
lvl0:   Window failed to initialize!

Erwan35 found out the solution is to recompile SDL2 with OpenGL ES and Raspberry Pi 2 support. The [PKGBUILD](https://aur.archlinux.org/packages/sd/sdl2-opengles/PKGBUILD) for SDL2 with OpenGL ES support doesn't explicitly set the --host flag, and then the Raspberry Pi 2 is not detected properly.

Wrong ./configure output:

...
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
...

Make sure you run ./configure for SDL2 with the following options (update the PKGBUILD accordingly):

/configure --prefix=/usr \
    --enable-sdl-dlopen \
    --disable-arts --disable-esd --disable-nas \
    --enable-alsa \
    --disable-pulseaudio \
    --disable-video-wayland \
    --without-x --disable-video-x11 --disable-x11-shared \
    --disable-video-x11-xcursor --disable-video-x11-xinerama \
    --disable-video-x11-xinput --disable-video-x11-xrandr \
    --disable-video-x11-scrnsaver --disable-video-x11-xshape \
    --disable-video-x11-vm --disable-video-opengl \
    --disable-video-directfb --disable-rpath \
    --enable-video-opengles --host=arm-raspberry-linux-gnueabihf

Correct ./configure output:

...
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... arm-raspberry-linux-gnueabihf
...

Install the newly built SDL2 and EmulationStation will launch fine:

[tristan@rpi2 sdl2-opengles]$ emulationstation
lvl0:   es_systems.cfg file does not exist!
lvl0:   Example config written!  Go read it at "/home/tristan/.emulationstation/es_systems.cfg"!
Tagged , ,