Compiling issues on ARM

Hello to all,

I’m trying to compile RetroArch on my BananaPi board. It’s an ARM (armhf) based board on chip A20. (details: http://www.lemaker.org/). I was able to compile an older version of retroarch (I think), so not solving the issues with that I’ve started over with a new fresh Raspbian installation and an updated Retrarch version from git. But now I’m getting a compilation error very at the beginning.

Confiure parameters


 ./configure --prefix=/opt --disable-vg --disable-ffmpeg --disable-sdl --disable-x11 --disable-xvideo --enable-gles --disable-kms --enable-neon --enable-fbo --enable-mali_fbdev --enable-lakka --enable-freetype

Output configure:


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 ... yes
Checking for pkg-config ... /usr/bin/pkg-config
Checking presence of package egl ... yes
Checking function pthread_create in -lpthread ... yes
Checking function dlopen in -ldl ... yes
Checking function socket in -lc ... yes
Checking function getaddrinfo in -lc ... 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 sys/soundcard.h ... 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 ... yes
Checking function AudioUnitInitialize in -framework AudioUnit ... no
Checking presence of package sdl2 with minimum version 2.0.0 ... yes
Checking function cgCreateContext in -lCg ... no
Checking presence of package zlib ... yes
Checking function dlopen in -ldl ... yes
Checking presence of package libxml-2.0 ... yes
Checking presence of package glesv2 ... yes
Checking presence of package libv4l2 ... no
Checking presence of package freetype2 ... yes
Checking presence of package wayland-egl ... no
Checking presence of package xkbcommon with minimum version 0.3.2 ... no
X11, Xext or xf86vm not present. Skipping X11 code paths.
Checking presence of package libudev ... yes
Checking function strlcpy in -lc ... no
Checking function strcasestr in -lc ... yes
Checking function mmap in -lc ... yes
Checking presence of package python3 ... no
Checking presence of predefined macro __ARM_NEON__ ... yes
Creating make config: config.mk
Creating config header: config.h

And here the error:


# make
CC input/linuxraw_input.c
CC input/linuxraw_joypad.c
CC git_version.c
CC frontend/frontend.c
In file included from frontend/menu/../../gfx/shader_common.h:26:0,
                 from frontend/menu/menu_common.h:34,
                 from frontend/frontend.c:25:
frontend/menu/../../gfx/gl_common.h:314:4: error: unknown type name âGLsyncâ
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function âvcos_timer_deleteâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function âvcos_timer_resetâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function âvcos_timer_cancelâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function âvcos_timer_setâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function âvcos_timer_createâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function âvcos_thread_resumeâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function âvcos_thread_runningâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function âvcos_change_preemptionâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function âvcos_thread_relinquishâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function âvcos_thread_get_affinityâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function âvcos_timer_deleteâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function âvcos_timer_resetâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function âvcos_timer_cancelâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function âvcos_timer_setâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function âvcos_timer_createâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function âvcos_thread_resumeâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function âvcos_thread_runningâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function âvcos_change_preemptionâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function âvcos_thread_relinquishâ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function âvcos_thread_get_affinityâ declared but never defined [enabled by default]
make: *** [obj-unix/frontend/frontend.o] Error 1

Could someone suggest me where to look for? It’s strange because on an old installation (some weeks ago) this error was not present. Now, starting from a new installation and an up-to-date RetroArch version, this is what happens. Some packages missing?

Thanks for the help!

Simon

hmm. builds okay here. They were doing some work on menus recently, so it’s possible you got a momentary bad pull. Does it still do it now?

Same error, got fresh 'git clone https://github.com/libretro/RetroArch’ right now.

CC frontend/frontend.c
In file included from frontend/menu/../../gfx/shader_common.h:26:0,
                 from frontend/menu/menu_common.h:34,
                 from frontend/frontend.c:25:
frontend/menu/../../gfx/gl_common.h:314:4: error: unknown type name 'GLsync'

Could be a missing library? Ideas?

Simon

In addition, if I try this repo “https://github.com/AreaScout/RetroArch” the compilation step goes further, but it doesn’t have same support for mali, seems. Would like to stay on official git

Ok, I definetly confirm you that with an older version I’m able to compile it. I’ve taken the old version from an SD used to install an older Raspbian last week. As written before my goal was to start with a fresh installation.

Here the version:

# ./retroarch -v
=== Build =======================================
Compiler: GCC (4.6.3) 32-bit
Built: Sep 15 2014
Version: 1.0.0.2
Git: 080a79d
=================================================

And the features:

# ./retroarch --features

Features:
        SDL:
                SDL drivers: no
        SDL2:
                SDL2 drivers: yes
        X11:
                X11 drivers: no
        wayland:
                Wayland drivers: no
        Threads:
                Threading support: yes
        OpenGL:
                OpenGL driver: yes
        KMS:
                KMS/EGL context support: no
        UDEV:
                UDEV/EVDEV input driver support: yes
        EGL:
                EGL context support: yes
        OpenVG:
                OpenVG output support: no
        XVideo:
                XVideo output: no
        ALSA:
                audio driver: yes
        OSS:
                audio driver: yes
        Jack:
                audio driver: no
        RSound:
                audio driver: no
        RoarAudio:
                audio driver: no
        PulseAudio:
                audio driver: yes
        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: yes
        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: yes
        Python:
                Script support in shaders: no

To bring the compilation successfully to the end I had to copy some includes in the right place and apply this patch:


diff gfx/context/mali_fbdev_ctx.c gfx/context/mali_fbdev_ctx.c_original 
202,207d201
<  typedef struct fbdev_window
<    {
<    unsigned short width;
<    unsigned short height;
<    } fbdev_window;
< 

BTW the issue remains the same. Why the up-to-date version does not compile?

Simon

Ok, I mentioned your findings to Squarepusher, so hopefully he’ll do something to correct the problem. I also heard from kivutar that there’s a Lakka build specifically for bananapi: http://sources.lakka.tv/nightly/

Thank you hunterk,

BTW the Lakka build gives me an image to have a complete system image based on OpenElec, right? What I need is a system with RetroArch compiled but with all the capabilites to have a little linux server with SSH server, a browser and some bash scripts i need to execute it in perl. The goal is a kind of kiosk as server with RetroArch to play a little when needed :slight_smile: I don’t think this could be provided by lakka, or?

Thanks!

Simon

I’ve never used it, myself, but I don’t think there’d be any problem with adding other things to it, though I would guess it comes with SSH at the very least.

Yess, it does. I could in case ask to lakka (where?). The point is, the board (banana-pi) should interact with it’s own GPIO ports and handle external hardware. It will be an arduino attached as well and touchscreen capabilities. All this, into a kiosk. Then, due it’s already in a nice kiosk, nice would be that this could be an emulator as well. So I’m replacing the keyboard with an arcade diy joystick. So, having only a smart openelec sistem, maybe a lot of libraries are missing. Arcade gaming would (maybe) work, but the rest not or not easy. Hope Squarepusher could solve the issues so I can try a native compile on the Raspbian system.

Simon

Hello!

Only to update the post with a good news. I’ve pulled some hours ago the last version from git and was able to compile it. Remains the issue with this file:

gfx/context/mali_fbdev_ctx.c

 # diff gfx/context/mali_fbdev_ctx.c gfx/context/mali_fbdev_ctx.c_modified 
201a202,207
> typedef struct fbdev_window
>    {
>    unsigned short width;
>    unsigned short height;
>    } fbdev_window;
> 

After that, now:

./retroarch -h
===================================================================
RetroArch: Frontend for libretro -- v1.0.0.2 -- 3892c83 --

Compiler: GCC (4.6.3) 32-bit
Built: Sep 17 2014
===================================================================
# ./retroarch --features

Features:
        SDL:
                SDL drivers: no
        SDL2:
                SDL2 drivers: yes
        X11:
                X11 drivers: no
        wayland:
                Wayland drivers: no
        Threads:
                Threading support: yes
        OpenGL:
                OpenGL driver: yes
        KMS:
                KMS/EGL context support: no
        UDEV:
                UDEV/EVDEV input driver support: yes
        EGL:
                EGL context support: yes
        OpenVG:
                OpenVG output support: no
        XVideo:
                XVideo output: no
        ALSA:
                audio driver: yes
        OSS:
                audio driver: yes
        Jack:
                audio driver: no
        RSound:
                audio driver: no
        RoarAudio:
                audio driver: no
        PulseAudio:
                audio driver: yes
        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: yes
        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: yes
        Python:
                Script support in shaders: no

I’ll try now to bring it to work :slight_smile:

Simon

Nice :slight_smile:

I’m glad to hear you got it going. I passed your patch along to Squarepusher but he’s been busy working on 1.1 stuff, so he hasn’t had a chance to look at it.

Don’t worry, it’s ok! Meanwhile, thanks for your support!

Simon