Cannnot build mupen64 on raspbian bookworm
-
Hello,
I currently own raspberry pi 5 with 8GB of RAM and raspbian 12 bookworm. I use official raspberry pi 5 power supply.
The result ofuname -a
, is:Linux raspberrypi 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux
uname -m
, gives:aarch64
I tried to follow manual installation steps, but it always ends with mupen64 error. It does not seem to bother other emulators, because NES and SNES games are working flawlessly.
I ranapt update
&upgrade
to make sure everything is up to date.After investigating the logs created after installation, I found that there are several ARM registers errors.
mupen64plus-core/src/device/r4300/new_dynarec/arm64/linkage_arm64.S: Assembler messages: mupen64plus-core/src/device/r4300/new_dynarec/arm64/linkage_arm64.S:63: Error: ARM register expected -- `mov w0,w1' mupen64plus-core/src/device/r4300/new_dynarec/arm64/linkage_arm64.S:67: Error: ARM register expected -- `mov w0,w2' mupen64plus-core/src/device/r4300/new_dynarec/arm64/linkage_arm64.S:71: Error: ARM register expected -- `mov w0,w3'
Those errors seems to be the cause for next errors, which are:
make: *** [Makefile:667: mupen64plus-core/src/device/r4300/new_dynarec/arm64/linkage_arm64.o] Error 1 make: *** Waiting for unfinished jobs.... /tmp/ccPNDa7x.s: Assembler messages: /tmp/ccPNDa7x.s:13946: Error: selected processor does not support requested special purpose register -- `mrs r4,ctr_el0' /tmp/ccPNDa7x.s:13986: Error: bad instruction `dc civac,r10' /tmp/ccPNDa7x.s:14005: Error: selected processor does not support `dsb ish' in ARM mode /tmp/ccPNDa7x.s:14018: Error: bad instruction `ic ivau,r0' /tmp/ccPNDa7x.s:14032: Error: selected processor does not support `dsb ish' in ARM mode /tmp/ccPNDa7x.s:14035: Error: selected processor does not support `isb' in ARM mode /tmp/ccPNDa7x.s:15022: Error: selected processor does not support requested special purpose register -- `mrs r2,ctr_el0' /tmp/ccPNDa7x.s:15058: Error: bad instruction `dc civac,r4' /tmp/ccPNDa7x.s:15075: Error: selected processor does not support `dsb ish' in ARM mode
Those issues combined finally result in this last error message found in the logs:
make: *** [Makefile:670: mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.o] Error 1 Could not successfully build lr-mupen64plus-next - N64 emulator - Mupen64Plus + GLideN64 for libretro (next version) (/home/myslaw/Downloads/RetroPie-Setup/tmp/build/lr-mupen64plus-next/mupen64plus_next_libretro.so not found).
I tried to fix the issue by installing vulkan, as suggested in some thread, but that did not help. I also tried to run the setup script with some
__=rpi
parameter as suggested in other thread, but that also did not help.Is there something I could do to fix the issue. What am I missing?
I will be glad for any help I can get. -
-
@abj Now I've added that parameter at the top of
/boot/firmware/config.txt
file, rebooted. Then I've executed RetroPie-Setup script and chosen following options:
Manage packages -> main -> lr-mupen64plus-next -> install from source -> yesIt failed with same errors. So I tried:
Manage packages -> main -> mupen64plus -> install from source -> yesThat didn't help either.
-
I can't reproduce this issue. Both
mupen64plus
andlr-mupen64plus-next
installed without issues. -
@myslaw said in Cannnot build mupen64 on raspbian bookworm:
Is there something I could do to fix the issue. What am I missing?
You're probably using the wrong installation image. Did you install the 32bit RaspiOS image on the Pi5 ? Reinstall using the 64bit image.
-
@mitu Is there any way I can validate that? I didn't install it myself, since I bought official SD card, with the system preinstalled.
-
@myslaw said in Cannnot build mupen64 on raspbian bookworm:
@mitu Is there any way I can validate that?
Validate what, exactly ? I can confirm - just like @abj did - that Mupen64Plus has no issues compiling/installing on a 64bit operating syste.
I didn't install it myself, since I bought official SD card, with the system preinstalled.
That's ok, you can install it yourself if you have a spare PC from https://www.raspberrypi.com/software.
-
@mitu said in Cannnot build mupen64 on raspbian bookworm:
Validate what, exactly ?
That I am running 32bit RaspiOS image, rather than 64bit image. All ways I've checked on web, seem to indicate, that I am currently on 64bit system. Maybe I missed something.
@mitu said in Cannnot build mupen64 on raspbian bookworm:
That's ok, you can install it yourself if you have a spare PC from https://www.raspberrypi.com/software.
After using raspberry imager with 64bit system, all build stages ended successfully.
Thank you for helping me!
-
That I am running 32bit RaspiOS image, rather than 64bit image. All ways I've checked on web, seem to indicate, that I am currently on 64bit system. Maybe I missed something.
Maybe. Run the following command
getconf LONG_BIT
and it should print the 'bits' used by the OS (not the kernel). If it says
32
, then you're running a 32bit OS, otherwise (prints64
) you're on a 64bit OS.NB: the Pi5 cannot run with a 32bit Linux kernel and even when installing the RaspiOS 32bit version it will boot with a 64 bit kernel. Any commands involving
uname
to determine whether the system is 32 or 64bits will show the wrong result on a 32bit system, since the kernel is 64 bit. TL;DR - use the 64 bit image for Pi4 / Pi5. -
@mitu Ah, good to know. Might be handy in the future.
Changing the image to 64 bit resolved all the building issues, so after running the RetroSetup script, no errors were logged.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.