libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.31k stars 1.84k forks source link

Building in Cubian-Debian- (CubieBoard, CubieBoard2, CubieTruck) #415

Closed vanfanel closed 9 years ago

vanfanel commented 10 years ago

Hi,

I just got RetroArch to build in Cubian (Debian) on a CubieBoard2. The same distro is shared among the three boards mentioned, so having it working would bring three more platforms in a row.

In order to make it build, I had to copy over /usr/include/GLES2 headers directory from my desktop x86 machine running Lubuntu 13.10 with mesa-based GLES2 to my cubie2, because installing the MALI400 binary drivers from sunxi-mali git installs old gles2.h and gles2ext.h versions, wich lack GLchar definition. Note that the MALI driver isn't a mesa implementation, but a binary blob. It should, however, build with the newer gles2 header files, and it does.

This is how I configure RetroArch:

cubie@Cubian:~/retro/src/RetroArch$ ./configure --disable-x11 --enable-gles --disable-oss --disable-sdl --disable-netplay --disable-bsv_movie 
Checking operating system ... Linux
Checking for suitable working C compiler ... /usr/bin/gcc
Checking for suitable working C++ compiler ... /usr/bin/g++
Checking for availability of switch -std=gnu99 in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-result in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-variable in /usr/bin/gcc ... yes
Checking function bcm_host_init in -lbcm_host ... no
Checking for pkg-config ... /usr/bin/pkg-config
Checking presence of package egl ... no
Checking existence of -lEGL ... yes
Checking function pthread_create in -lpthread ... yes
Checking function dlopen in -ldl ... yes
Checking function fcntl in -lc ... yes
Checking function getopt_long in -lc ... yes
Checking presence of package alsa ... yes
Checking presence of header file soundcard.h ... no
Checking existence of -lossaudio ... no
Checking function alcOpenDevice in -lopenal ... no
Checking presence of package rsound with minimum version 1.1 ... no
Checking presence of package libroar ... no
Checking presence of package jack with minimum version 0.120.1 ... no
Checking presence of package libpulse ... no
Checking function AudioUnitInitialize in -framework AudioUnit ... no
Ignoring Cg. Desktop OpenGL is not enabled.
SDL is disabled. Disabling SDL_image.
Checking presence of package zlib ... yes
Checking presence of package libavcodec with minimum version 54 ... no
Checking presence of package libavformat with minimum version 54 ... no
Checking presence of package libavutil with minimum version 51 ... no
Checking presence of package libswscale with minimum version 2.1 ... no
Checking function dlopen in -ldl ... yes
Checking presence of package gbm with minimum version 9.0 ... no
Checking presence of package libdrm ... yes
Checking presence of package libxml-2.0 ... no
Checking presence of package glesv2 ... no
Checking existence of -lGLESv2 ... yes
Checking presence of package vg ... no
Checking existence of -lOpenVG ... no
Checking presence of package libv4l2 ... no
Checking presence of package freetype2 ... yes
Checking presence of package xkbcommon with minimum version 0.3 ... no
X11, Xext or xf86vm not present. Skipping X11 code paths.
Checking presence of package libudev ... no
Checking function strlcpy in -lc ... no
Checking function strcasestr in -lc ... yes
Checking function mmap in -lc ... yes
Checking presence of package python3 ... no
Creating make config: config.mk
Creating config header: config.h

Note that, even if egl and glesv2 packages aren't found (I suppose it looks for mesa implementations) it founds -lGLESv2 and -lEGL. In fact, it builds fine.

After building, these are the features I got:

cubie@Cubian:~/retro$ ./retroarch --features

Features:
    SDL:
        SDL drivers: no
    Threads:
        Threading support: yes
    OpenGL:
        OpenGL driver: yes
    KMS:
        KMS/EGL context support: no
    UDEV:
        UDEV/EVDEV input driver support: no
    EGL:
        EGL context support: yes
    OpenVG:
        OpenVG output support: no
    XVideo:
        XVideo output: no
    ALSA:
        audio driver: yes
    OSS:
        audio driver: no
    Jack:
        audio driver: no
    RSound:
        audio driver: no
    RoarAudio:
        audio driver: no
    PulseAudio:
        audio driver: no
    DirectSound:
        audio driver: no
    XAudio2:
        audio driver: no
    zlib:
        PNG encode/decode and .zip extraction: yes
    OpenAL:
        audio driver: no
    External:
        External filter and plugin support: yes
    Cg:
        Cg pixel shaders: no
    libxml2:
        libxml2 XML parsing: no
    SDL_image:
        SDL_image image loading: no
    FBO:
        OpenGL render-to-texture (multi-pass shaders): yes
    Dynamic:
        Dynamic run-time loading of libretro library: yes
    FFmpeg:
        On-the-fly recording of gameplay with libavcodec: no
    FreeType:
        TTF font rendering with FreeType: yes
    Netplay:
        Peer-to-peer netplay: no
    Python:
        Script support in shaders: no

The relevant parts in the cfg file I'm using look like this:

libretro_path = "/home/cubie/retro/cores/fceumm_libretro.so"
system_directory = "/home/cubie/retro/nintendo"
rgui_browser_directory = "/home/cubie/retro/nintendo"
config_save_on_exit = "true"
rewind_enable = "false"
rewind_granularity = "1"
video_shader_enable = "false"
video_aspect_ratio = "-1.000000"
video_xscale = "3.000000"
video_yscale = "3.000000"
video_crop_overscan = "true"
video_scale_integer = "false"
video_smooth = "true"
video_refresh_rate = "60.016998"
video_vsync = "true"
video_hard_sync = "false"
video_hard_sync_frames = "0"
video_black_frame_insertion = "false"
video_swap_interval = "1"
aspect_ratio_index = "2"
audio_rate_control = "true"
audio_rate_control_delta = "0.005000"
savefile_directory = "default"
savestate_directory = "default"
video_shader_dir = "default"
overlay_directory = "default"
input_overlay_opacity = "1.000000"
input_overlay_scale = "1.000000"
gamma_correction = "false"
triple_buffering_enable = "false"
info_msg_enable = "false"
soft_filter_enable = "false"
flicker_filter_enable = "false"
flicker_filter_index = "0"
soft_filter_index = "0"
current_resolution_id = "0"
custom_viewport_width = "1080"
custom_viewport_height = "768"
custom_viewport_x = "135"
custom_viewport_y = "0"
video_font_size = "48.000000"
sound_mode = "0"
state_slot = "0"
audio_mute = "0"
screen_orientation = "0"
custom_bgm_enable = "false"
video_gpu_screenshot = "true"
video_rotation = "0"
screenshot_directory = "default"
input_libretro_device_p1 = "1"
input_libretro_device_p2 = "1"
input_libretro_device_p3 = "1"
input_libretro_device_p4 = "1"
input_libretro_device_p5 = "1"
input_libretro_device_p6 = "1"
input_libretro_device_p7 = "1"
input_libretro_device_p8 = "1"
fps_show = "false"
autosave_interval = "0"
video_threaded = "false"
video_fullscreen = "false"
video_driver = "gl"
audio_driver = "alsa"
audio_out_rate = "44100"
rgui_config_directory = "default"
rgui_show_start_screen = "false"
game_history_size = "100"

(I'm omitting input options, etc, as the problem is unrelated to input)

However, running with a core and a ROM results in this error:

Frontend supports RGB565 - will use that instead of XRGB1555.
RetroArch [ERROR] :: Cannot open video driver ... Exiting ...
RetroArch [ERROR] :: Fatal error received in: "init_video_input()"

Note that the MALI driver installation instructions here: http://linux-sunxi.org/Binary_drivers include a EGL/GLES test, wich I can run without problems.

Archangl7 commented 8 years ago

i got it to build also, but when it try to launch it i get: unable to load driver : mali_drm_dri.so ti show with lsmod. Any idea what is going on here? By the way, the only distro that let me compile out of the box was cubieez. The most recent version at this time.