Can't install RetroArch on Mageia 6

I tried installing it using Flatpak, but i everytime i try to run it, i get this error:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libEGL warning: DRI2: failed to authenticate
Then i tried compiling it from source, it goes smoothly until:
LD retroarch
/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-mageia-linux-gnu/5.5.0/../../../libxkbcommon.so when searching for -lxkbcommon
/bin/ld: skipping incompatible /lib/libxkbcommon.so when searching for -lxkbcommon
/bin/ld: skipping incompatible /usr/lib/libxkbcommon.so when searching for -lxkbcommon
/bin/ld: cannot find -lxkbcommon
collect2: error: ld returned 1 exit status
Makefile:187: recipe for target 'retroarch' failed
make: *** [retroarch] Error 1

For the self-compile, you can probably add --disable-x11 to your configure options to just leave that dependency out, as it seems the one provided isn’t ABI-compatible with the one that RA needs.

For the libGL error, it happens a lot with Nvidia cards, I believe. See this issue: