RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Cannnot build mupen64 on raspbian bookworm

    Scheduled Pinned Locked Moved Help and Support
    raspberry pi 5mupen64raspbianbookwormbuild
    10 Posts 3 Posters 982 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      myslaw
      last edited by myslaw

      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 of uname -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 ran apt 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.

      abjA mituM 2 Replies Last reply Reply Quote 0
      • abjA
        abj @myslaw
        last edited by abj

        @myslaw

        Do you have set in /boot/firmware/config.txt file this parameter?

        kernel=kernel8.img
        

        `Please be patient, my English is not very good.`

        M 1 Reply Last reply Reply Quote 0
        • M
          myslaw @abj
          last edited by myslaw

          @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 -> yes

          It failed with same errors. So I tried:
          Manage packages -> main -> mupen64plus -> install from source -> yes

          That didn't help either.

          1 Reply Last reply Reply Quote 0
          • abjA
            abj
            last edited by abj

            I can't reproduce this issue. Both mupen64plus andlr-mupen64plus-next installed without issues.

            `Please be patient, my English is not very good.`

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @myslaw
              last edited by

              @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.

              M 1 Reply Last reply Reply Quote 1
              • M
                myslaw @mitu
                last edited by

                @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.

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @myslaw
                  last edited by

                  @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.

                  M 1 Reply Last reply Reply Quote 1
                  • M
                    myslaw @mitu
                    last edited by

                    @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!

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @myslaw
                      last edited by

                      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 (prints 64) 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.

                      M 1 Reply Last reply Reply Quote 1
                      • M
                        myslaw @mitu
                        last edited by

                        @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.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        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.