Config in CubieBoard2 (Cubieez) fails because of check_lib

Hi there

I’m trying to build RetroArch from git sources on my Cubie2, now that the interesting mali+fbdev has been added. However, I can’t succeed because qb/config.libs.sh script fails:


cubie@cubieez:~/RetroArch$ sudo CFLAGS="-mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math -Ofast" ./configure --disable-x11 --enable-mali_fbdev  --disable-sdl --disable-netplay --disable-bsv_movie --enable-udev
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_hostChecking 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 -lEGLChecking existence of -lEGL ... no
Checking function pthread_create in -lpthreadChecking function pthread_create in -lpthread ... no
Checking function dlopen in -ldlChecking function dlopen in -ldl ... no
Checking function fcntl in -lcChecking function fcntl in -lc ... no
Checking function getopt_long in -lcChecking function getopt_long in -lc ... no
Dynamic loading of libretro is enabled, but your platform does not appear to have dlopen(), use --disable-dynamic or --with-libretro="-lretro".

It seems to be a problem with something check_lib() is doing, but I don’t know what. Obviously I can use programs wich use dynamic libs, and EGL is installed and in working order: MALI test works well on fbdev. So, what could be failing here? Thanks!

Problem solved. I was passing some cflags unsupported by the compiler (old gcc 6.x). I found out by echoing what check_libs() was trying to do in


"$CC" -o "$TEMP_EXE" "$TEMP_C" $INCLUDE_DIRS $LIBRARY_DIRS $4 $CFLAGS $LDFLAGS $2 >>config.log 2>&1 && answer='yes'

and replicating what it does: trying to compile a simple c file myself with these flags. So -lEGL or -ldl wasn’t really the problem.

I also had to change fbdev_window by mali_native_window in line 202 of gfx/context/mali_fbdev_ctx.c

Thanks anyway :slight_smile: