• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

DOSBox-Staging (install from source error when launched)

Scheduled Pinned Locked Moved Help and Support
dosboxdosbox-stagingdosbox-xinstall issuessourcebuild
18 Posts 2 Posters 1.0k 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.
  • T
    TeknoRaver
    last edited by TeknoRaver 30 Nov 2023, 23:07

    Hey, I've got a massive issue.
    1st, I can't compile anything on my raspberry pi 3b+
    Because every time i compile (for example) dosbox-x (same happened with staging) i get an error because of not enough ram. Same goes for DOSBox-staging unless i compile form the retropie setup thingy.

    Here's the thing!
    I need DOSBox staging or DOSBox-x with slirp
    (compiled with slirp ne2000 support).
    So i changed the setup script to include slirp when compiling: https://pastebin.com/aakAnwWH
    It compiles successfully!

    Issue I'm having is First error it was saying when launched is was missing mt32emu.so or libmt32emu.so... So I included in the setup script sh file to disable it! (pastebin above).

    NOW its saying its missing something called iir.so. Don't think i can disable that and I believe looking at the GitHub its needed.

    Something tells me its nothing ive done wrong, but there is something not Good working when installing dosbox-staging from source.

    -Raspberry Pi 3B+
    -Using FKMS
    (not kms for obvious reasons related to using a pal crt via rgb hdmi-vga-scart)
    -RetroPie Version 4.8
    -installed via raspberry pi imager
    -using official plug (with a fan)
    -using a ps4 controller (Bluetooth)
    -2 USB 2.0 connections (a keyboard and a mouse)

    Can someone help me with this?
    Cheers!

    1 Reply Last reply Reply Quote 0
    • T
      TeknoRaver
      last edited by TeknoRaver 30 Nov 2023, 23:52

      Sorry to double post (apologies to the mods here)
      But I actually fixed it!
      It was a million to one fluke but this is how I managed to fix it being installed from source.
      Posting the solution for others to see with the same problem so please don't take this down:
      You need to add -Dtry_static_libs="iir" to the "Function" part of the code!

      Its located here:
      /home/pi/RetroPie-Setup/scriptmodules/emulators/dosbox-staging.sh

      Go to line 38 and look for this:
      function build_dosbox-staging() {
      local params=(-Dprefix="$md_inst" -Ddatadir="resources")

      Your gonna want to add:
      -Duse_mt32emu="false" & -Dtry_static_libs="iir"
      (and -Duse_slirp="true" if you want internet like me)

      Needs to look like this:
      function build_dosbox-staging() {
      local params=(-Duse_mt32emu="false" -Duse_slirp="true" -Dtry_static_libs="iir" -Dprefix="$md_inst" -Ddatadir="resources")

      now save and compile! ;)

      Hope this helps the devs to add this fix and if not, helps anyone with this same problem
      been spending a week on this and s**** you not just as ive posted asking for help, tried this and it finally workes.

      I still haven't found out why I can't compile without using RetroPie-Setup scriptmodels so I really do need help for that because I legit want to compile dosbox-x but can't actually finish it on the 3b+ due to it not having enough ram to finish it. The same applies to dosbox-staging so why (and how) can I compile staging using the retropie scriptmodels but not in the terminal?

      So any help on that will be a really big favour for me!
      Cheers

      M 1 Reply Last reply 2 Dec 2023, 06:56 Reply Quote 0
      • M
        mitu Global Moderator @TeknoRaver
        last edited by 2 Dec 2023, 06:56

        @TeknoRaver said in DOSBox-Staging (install from source error when launched):

        I still haven't found out why I can't compile without using RetroPie-Setup scriptmodels so I really do need help for that because I legit want to compile dosbox-x but can't actually finish it on the 3b+ due to it not having enough ram to finish it.

        Posting the actual error you get when building might help with solving the issue. If it's memory related, adding more swap during the build will solve it. If you've modified config.txt and allocated too much RAM for the GPU memory, you may not have enough left to compile things.

        Also, I don't see why you'd need FKMS on a Pi3B+ - the default RetroPie image doesn't enable it since it's not needed.

        T 1 Reply Last reply 4 Dec 2023, 09:22 Reply Quote 0
        • T
          TeknoRaver @mitu
          last edited by TeknoRaver 12 Apr 2023, 09:36 4 Dec 2023, 09:22

          @mitu What gpu timing do you recommend?
          Specifically for the pi3b+?

          as for why I'm using fkms,
          I don't have a choice for kms.
          I'm using a hdmi-vga and a vga-scart for my rbg tv!
          Because i'm using pal, enabling kms will just result in a scrambled screen completely ignoring the HDMI timings. So I have to use fkms.
          As for my pi4,
          No chance in hell there's any way to set the HDMI timings regardless if im using kms or fkms for the pi4.

          This is my config.txt:

          # For more options and information see
          # http://rpf.io/configtxt
          # Some settings may impact device functionality. See link above for details
          
          # uncomment if you get no picture on HDMI for a default "safe" mode
          #hdmi_safe=1
          
          # uncomment this if your display has a black border of unused pixels visible
          # and your display can output without overscan
          #disable_overscan=1
          
          # uncomment the following to adjust overscan. Use positive numbers if console
          # goes off screen, and negative if there is too much border
          #overscan_left=16
          #overscan_right=16
          #overscan_top=16
          #overscan_bottom=16
          
          # uncomment to force a console size. By default it will be display's size minus
          # overscan.
          #framebuffer_width=1280
          #framebuffer_height=720
          
          # uncomment if hdmi display is not detected and composite is being output
          #hdmi_force_hotplug=1
          
          # uncomment to force a specific HDMI mode (this will force VGA)
          overscan_scale=0
          hdmi_group=2
          
          # uncomment to force a HDMI mode rather than DVI. This can make audio work in
          # DMT (computer monitor) modes
          #hdmi_drive=2
          
          # uncomment to increase signal to HDMI, if you have interference, blanking, or
          # no display
          #config_hdmi_boost=4
          
          # uncomment for composite PAL
          #sdtv_mode=2
          
          #uncomment to overclock the arm. 700 MHz is the default.
          #arm_freq=800
          
          # Uncomment some or all of these to enable the optional hardware interfaces
          #dtparam=i2c_arm=on
          #dtparam=i2s=on
          #dtparam=spi=on
          
          # Uncomment this to enable infrared communication.
          #dtoverlay=gpio-ir,gpio_pin=17
          #dtoverlay=gpio-ir-tx,gpio_pin=18
          
          # Additional overlays and parameters are documented /boot/overlays/README
          
          # Enable audio (loads snd_bcm2835)
          dtparam=audio=on
          
          [pi4]
          # Enable DRM VC4 V3D driver on top of the dispmanx display stack
          dtoverlay=vc4-fkms-v3d
          max_framebuffers=2
          
          [all]
          dtoverlay=vc4-fkms-v3d
          gpu_mem_256=128
          gpu_mem_512=256
          gpu_mem_1024=256
          hdmi_mode=87
          hdmi_timings=1440 1 112 143 233 560 1 7 4 22 0 0 2 50 1 30125000 1
          
          

          I tried removing the gpu_mem and its compiling so that was the issue thanks.
          But I need to set the gpu_mem!
          Any help with a recommended gpu_mem and if there is any way for the pi3 to work with hdmi_timings using kms would be a massive help

          Edit: Also gotta be honest here...
          I f*** love your megaman avatar man! ;D

          M 1 Reply Last reply 4 Dec 2023, 09:43 Reply Quote 0
          • M
            mitu Global Moderator @TeknoRaver
            last edited by mitu 12 Apr 2023, 09:43 4 Dec 2023, 09:43

            @TeknoRaver said in DOSBox-Staging (install from source error when launched):

            What gpu timing do you recommend?

            None, leave it as default.

            as for why I'm using fkms,
            I don't have a choice for kms.

            A RPI 3 doesn't use either fkms nor kms in RetroPie's image, I don't see why it's needed. The upcoming release will use kms by default for all Pi models though, but that's a different story.

            Because i'm using pal, enabling kms will just result in a scrambled screen completely ignoring the HDMI timings. So I have to use fkms.

            Again, I don't see why FKMS is needed for a Pi3.
            For KMS based systems, resolution switching should work with the switchres RetroArch's options - see https://docs.libretro.com/guides/crtswitchres/. Though the page lists x11 as a requirement for it, recent versions of RetroArch include also support for resolution switching using KMS/DRM.

            As for my pi4,
            No chance in hell there's any way to set the HDMI timings regardless if im using kms or fkms for the pi4.

            Yes, this is known not to work on Pi4 since it uses a different GPU stack and it doesn't rely on the VideoCore firmware based GPU stack. But I don't see how is this related to a RPI 3.

            I tried removing the gpu_mem and its compiling so that was the issue thanks.

            Why are you compiling in the first place ? The binary (for dosbox-staging) distributed by RetroPie already has all the available options included (slirp also).

            But I need to set the gpu_mem!

            Why ? Whatever defaults RetroPie sets is enough for emulation or video playback.

            Any help with a recommended gpu_mem and if there is any way for the pi3 to work with hdmi_timings using kms would be a massive help

            There's no HDMI timings for kms, they only apply to the firmware based GPU drivers, which are not used when kms is included.

            I ... love your megaman avatar man! ;D

            Can you tone down the swearing ? We're trying to have the forum a place for everyone, including children. Thank you.

            T 1 Reply Last reply 4 Dec 2023, 09:48 Reply Quote 0
            • T
              TeknoRaver @mitu
              last edited by TeknoRaver 12 Apr 2023, 10:16 4 Dec 2023, 09:48

              @mitu ok wow, right 1st sorry for the swears, will town it down, seccond, no idea why or how... But I can assure you you I have tested both fkms and kms and they DO change the HDMI timings. So I guess the question is why does fkms redult in a clear image and kms scrambles the picture? As for the gpu_mem, I had to change it because it was giving me a White screen when changing themes.
              What are the default gpu_mem?
              If there isn't any set then I need to know how to get round the White screen problem as so far I had that issue until setting the gpu_mem fixes it. As for crtswitchres, isn't that only an option if using retroarch? Like say if I wanted to use dosbox-x (thats why i originally wanted to compile)... Wouldn't crtswitchres not work since its only
              using retroarchs cores? If it does work with staging or X then how do I get around to setting it up. Looking at the link its talking about getting it to work with retroarch and not retropie (like not the emulationstation themes etc).

              M 1 Reply Last reply 4 Dec 2023, 12:56 Reply Quote 0
              • M
                mitu Global Moderator @TeknoRaver
                last edited by mitu 12 Apr 2023, 12:57 4 Dec 2023, 12:56

                @TeknoRaver said in DOSBox-Staging (install from source error when launched):

                But I can assure you you I have tested both fkms and kms and they DO change the HDMI timings.

                Maybe for the initial boot, to set the default video mode, but dynamically changing it doesn't work correctly. For the VideoCore based drivers, using tvservice to change the resolution it's the easiest and more reliable solution. This works on RetroPie's image for RPI3, no (f)kms involved.

                So I guess the question is why does fkms redult in a clear image and kms scrambles the picture?

                I don't know, I haven't tested a Pi3 with kms only and especially with a converter (or more) involved.

                As for the gpu_mem, I had to change it because it was giving me a White screen when changing themes.

                Which theme ? Just increasing the gpu_mem will not automatically fix this. You need to also increase the VRAM limit in EmulationStation's options.

                What are the default gpu_mem?

                The ones from the config.txt your posted earlier. For a Pi3, 256Mb is allocated to the GPU RAM.

                T 1 Reply Last reply 4 Dec 2023, 14:35 Reply Quote 0
                • T
                  TeknoRaver @mitu
                  last edited by TeknoRaver 12 Apr 2023, 14:39 4 Dec 2023, 14:35

                  @mitu thanks man.
                  The gpu_mem I posted has actually the compiling issues.
                  I didn't know what I changed is actually the default gpu_ram, so it will explain why the themes worked when set.
                  When I remove the gpu_mem settings, I get white themes however, the emulators compile fine.

                  Didn't know anything about increasing the vram in emulatonstation, could you yell me a bit more about that?

                  As for changing the custom dmt htmi timings via crtswitchres & tvservice?
                  Could you give me an example of them both to set ether this:

                  hdmi_timings=1440 1 112 143 233 560 1 7 4 22 0 0 2 50 1 30125000 1
                  

                  Or this:

                  hdmi_cvt=320 312 50 1 0 0 0
                  

                  Those are all the information I'm looking for that I need to move forward with my issues im having,
                  If you could help me answer them, it would be a massive help!

                  M 1 Reply Last reply 4 Dec 2023, 17:36 Reply Quote 0
                  • M
                    mitu Global Moderator @TeknoRaver
                    last edited by 4 Dec 2023, 17:36

                    @TeknoRaver said in DOSBox-Staging (install from source error when launched):

                    The gpu_mem I posted has actually the compiling issues.

                    That's strange, since I actually compiled dosbox-staging on a RPI 3 having the same memory settings and it didn't fail. But you didn't post the exact error, so it may not be related to the lack of memory.

                    When I remove the gpu_mem settings, I get white themes however, the emulators compile fine.

                    Again, which theme ?

                    Didn't know anything about increasing the vram in emulatonstation, could you yell me a bit more about that?

                    Open up the EmulationStation settings menu (default bound to Select) and it's under the Other Options menu.

                    As for changing the custom dmt htmi timings via crtswitchres & tvservice?
                    Could you give me an example of them both to set ether this:
                    ...

                    I don't know how crtswitchres in RetroArch configures things, but you can take a look at the doc page I posted.

                    For tvservice, take a look at https://forums.raspberrypi.com/viewtopic.php?t=24679. It may be a long read, but it's all explained there. For most thing, you probably want to configure a 480i/240p resolution in /boot/config.txt to be used by EmulationStation and then you can change the resolution (to one of the 'super resolutions' you want to set) when a game is started through a runcommand on-start script.
                    This involves generating the video resolution into a custom video mode and then applying it with tvservice:

                    vcgencmd hdmi_timings 320 1 15 30 42 240 1 4 3 15 1 0 0 60 0 6400000 1 > /dev/null # 320x240p Timing 
                    tvservice -e "DMT 87" > /dev/null
                    fbset -depth 8 && fbset -depth 16 && fbset -depth 24 -xres 320 -yres 240 > /dev/null
                    

                    You can restore the default resolution for EmulationStation with a similar set of commands but with an on-end script. Depending on the system used you can generate different video modes (NTSC and/or PAL or even VGA if your monitor supports it).

                    Note that using tvservice will not work correctly when any kms overlay is loaded (so will not work on a Pi4) and I'm still not sure why you think it's needed on a Pi3. DId you perhaps read some configuration notes for a Pi4 and you're trying to apply them to the Pi3 ?

                    Those are all the information I'm looking for that I need to move forward with my issues im having,

                    Hm, you're just at the beginning.

                    T 1 Reply Last reply 4 Dec 2023, 18:26 Reply Quote 0
                    • T
                      TeknoRaver @mitu
                      last edited by 4 Dec 2023, 18:26

                      @mitu DOSBox staging compiles for me using retropie-setup.sh but if I were to compile it using ssh or the terminal, it runs out of memory (which is fixed when removing all gpu_mem options).
                      I have yet no idea why (or whats different) to why it compiles with the gui but not with the terminal or ssh.
                      Cant give you the error yet as im using the sd card for something else at the moment, will reflash retropie at the weekend and let you know. I can also tell you the same thing happened on raspian with those 3 gpu_mem set.
                      Am I right in thinking I should only have just 1 gpu set instead of all 3?

                      As for the themes, ... All of them. Like every single one except for the default.

                      1 Reply Last reply Reply Quote 0
                      • M
                        mitu Global Moderator
                        last edited by mitu 12 Apr 2023, 18:52 4 Dec 2023, 18:31

                        OK, when you have more info add it here in the topic.

                        T 2 Replies Last reply 4 Dec 2023, 19:45 Reply Quote 0
                        • T
                          TeknoRaver @mitu
                          last edited by 4 Dec 2023, 19:45

                          @mitu actually... Just had a thought.
                          I googled the error message a few days ago.
                          I should be able to find it again in my history.

                          Wait here...

                          1 Reply Last reply Reply Quote 0
                          • T
                            TeknoRaver @mitu
                            last edited by 4 Dec 2023, 20:03

                            @mitu I FOUND IT!
                            This was the error message for both dosbox-x & staging when compiling through ssh and terminal
                            (note: Again... Staging compiled fine when using RetroPie-Setup.sh. But not through the terminal e.g. the F4 key)

                            g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[4]: *** [Makefile:441: core_normal.o] Error 1

                            M 1 Reply Last reply 4 Dec 2023, 20:32 Reply Quote 0
                            • M
                              mitu Global Moderator @TeknoRaver
                              last edited by mitu 12 Apr 2023, 20:33 4 Dec 2023, 20:32

                              @TeknoRaver said in DOSBox-Staging (install from source error when launched):

                              g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[4]: *** [Makefile:441: core_normal.o] Error 1

                              This looks like a memory error, yes. I'm unable to reproduce it though with the same memory options that you posted earlier. Not sure about dosbox-x - may need more memory, but dosbox-staging compiles fine.

                              T 1 Reply Last reply 4 Dec 2023, 20:37 Reply Quote 0
                              • T
                                TeknoRaver @mitu
                                last edited by TeknoRaver 12 Apr 2023, 21:10 4 Dec 2023, 20:37

                                @mitu do you want the command prompt I used for compiling staging and dosbox-x?
                                Maybe its not what retropie is doing wrong when compiling... But something I did wrong when I tried to compile. That would explain why staging compiles fine using retropie-setup install scripts but not when I do it manually using ssh.

                                did you compile using ssh with instructions from the dosbox-staging git?
                                Or did you use the retropie's .sh install scripts? Coz that worked for some reason.
                                Also did you use a rpi3b+ with all 3 gpu_mem enabled (even fkms though I highly doubt that matters if im honest)?

                                Because im still not 100% if I'm supposed to only use the 1 and comment out the other 2 or not.

                                M 1 Reply Last reply 4 Dec 2023, 21:39 Reply Quote 0
                                • M
                                  mitu Global Moderator @TeknoRaver
                                  last edited by mitu 12 Apr 2023, 21:41 4 Dec 2023, 21:39

                                  @TeknoRaver said in DOSBox-Staging (install from source error when launched):

                                  Or did you use the retropie's .sh install scripts? Coz that worked for some reason.

                                  I only use the RetroPie's module to compile. I haven't tried the git version, since we only get and compile the released versions. When the next version is released, we'll see if it needs more memory.

                                  dosbox-x is not part of RetroPie, so you're on your own here. But if the error is the same - then it's caused by insufficient memory. Adding more swap can make the compilation go through.

                                  Also did you use a rpi3b+ with all 3 gpu_mem enabled (even fkms though I highly doubt that matters if im honest)?

                                  I've already said this twice.

                                  T 1 Reply Last reply 4 Dec 2023, 22:19 Reply Quote 0
                                  • T
                                    TeknoRaver @mitu
                                    last edited by 4 Dec 2023, 22:19

                                    @mitu cool just checking.
                                    And you add more swap ram via using the vram method you mentioned before right?
                                    If not, how do you add more swap ram?

                                    M 1 Reply Last reply 5 Dec 2023, 03:50 Reply Quote 0
                                    • M
                                      mitu Global Moderator @TeknoRaver
                                      last edited by 5 Dec 2023, 03:50

                                      @TeknoRaver said in DOSBox-Staging (install from source error when launched):

                                      And you add more swap ram via using the vram method you mentioned before right?

                                      No, that's for telling EmulationStation it can use more VRAM from the allocated GPU memory.

                                      If not, how do you add more swap ram?

                                      You create a swap file (see https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04#step-3-creating-a-swap-file ) or modify the default swap file size (see https://forums.raspberrypi.com/viewtopic.php?t=46472).

                                      1 Reply Last reply Reply Quote 0
                                      18 out of 18
                                      • First post
                                        18/18
                                        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.

                                        This community forum collects and processes your personal information.
                                        consent.not_received