Mupen64Plus core broken on Android 4.4

I’ve tried to use the Mupen64Plus core on my GPD XD device which is running Android 4.4. However I get an error saying ‘failed to load libretro core’.

On my Galaxy S8+ running Android 7 the core actually runs fine and very smooth so I’ve posted this issue on a forum for the GPD XD.

The standalone Mupen64Plus FZ app is working just fine on my GPD XD but it uses a different format to save the save games. I use RetroArch on my desktop as well and I would love to share the save games between my desktop and handheld.

I’m not really into coding but someone else on the Dingoonity forum found in the Logcat that it could be related to using the srand() function instead of std::srand() because the srand() isn’t compatible with Android API 19 or lower.

Below you can find a quote of his post.

You’re right Retroarchs mupen core won’t run on the GPD XD :o

And after I did some digging in logcat I found out you’re also right about the version being the problem:

Code: [Select] E/RetroArch( 7191): Failed to open core: “/data/data/com.retroarch/cores/mupen64plus_libretro_android.so” E/RetroArch( 7191): dlopen failed: cannot locate symbol “srand” referenced by “mupen64plus_libretro_android.so”…

In android API 19 (android 4.4.X) the function “srand()” is a static inline function invoking the function “srand48()”. In android API 20 (android 5.X) srand is defined as “void srand(unsigned int)”

So either mupen64plus needs the new srand (I doubt that as AE and FZ edition work on 4.4.4) or the guy that compiled the core did mess up and should have used “std::srand()” instead of “srand()” and compile against API version 19 or lower.

As the core is opensource you could compile your own version or open up an issue thread on libretro’s github page. I might try both if I find the time to do so.

UPDATE: looks like the libretro guys are aware that some symbols arent exporting on something older than 5.0 still opening an issue thread might be useful if a version using std::srand works on both pre- and post-api20 systems

He sugested to compile the code or make an issue on GitHub but I’m not familiar with GitHub nor compiling Android code. I’ve installed the Android Studio software and found the function being called in the file mupen64plus-core\src\main\zip\crypt.h (line 112) but I’ve no clue how to make a core of this so thought maybe one of the actual devs from RetroArch could commit this into a future update of the core or has another workaround?

Thanks in advance!

I’m upping this, because Mupen64Plus still does not work on GPD XD.