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

    Could not successfully build sdl2 on Bullseye

    Scheduled Pinned Locked Moved Help and Support
    build failedraspberry pi 4dietpibullseye
    16 Posts 6 Posters 7.3k 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.
    • F
      FericousPom @windg
      last edited by

      @windg I got it working to build LibSDL but then it failed to build retroarch (haven't checked why yet)

      In file "./scriptmodules/supplementary/sdl2.sh" I changed the git line to:

      gitPullOrClone "$md_build/$pkg_ver" https://github.com/libsdl-org/SDL "main"
      

      After this, it worked to build libsdl. But I don't recommend anyone to do this. Like you said, better to wait for official release.

      1 Reply Last reply Reply Quote 0
      • F
        Folly @windg
        last edited by Folly

        @windg

        I am trying on a RPI3 with Desktop Raspbian bullseye.

        I just used (there was no need to use --fix-broken) :

        sudo apt install libsdl2-2.0-0 libsdl2-dev
        

        After that I could install, for example, emulationstation from source but the setup still wants to install SDL2 from source which will fail every time.

        @FericousPom

        Adding your line in ./scriptmodules/supplementary/sdl2.sh doesn't work here on my RPI3 ,compilation will also fail.

        1 Reply Last reply Reply Quote 1
        • F
          Folly
          last edited by Folly

          This is how we can fool the system and install binary packages of buster (do it on your own risk !) .

          --> I edited these next lines <-- :

          /home/pi/RetroPie-Setup/scriptmodules/system.sh :
          lines 168 - 169 :

          __os_release="10"    
          __os_codename="buster"   
          

          When needed, for RPI3 or lower, comment line 72 (not needed for RPI4) :

          #isPlatform "kms" && __binary_path+="/kms"
          

          I tested these binaries and worked ok:

          • mame
          • lr-mess
          • lr-bluemsx

          I tested openmsx but I got into trouble as it will try to force an older SDL2 binary to be installed, which does not match with other libraries debending on SDL2 >= 2.0.12

          After that I had to restore with :

          sudo apt install libsdl2-2.0-0 libsdl2-dev
          

          ( If SDL2 is installed earlier, as explained in the next post, you will probably not have above issue )

          1 Reply Last reply Reply Quote 1
          • F
            Folly @FericousPom
            last edited by Folly

            @fericouspom

            (Updated post 7 February 2022)

            With a fresh install you have to do the following to fix the SDL2 problem.

            Edit line 19 and line 37 of the original /home/pi/RetroPie-Setup/scriptmodules/supplementary/sdl2.sh.

            Edit line 19 (edit version to 2.0.18 or 2.0.20) to :

            echo "2.0.20"
            

            Edit line 37 (add libsamplerate0-dev) to :

            local depends=(libsamplerate0-dev libasound2-dev libudev-dev libibus-1.0-dev libdbus-1-dev fcitx-libs-dev libsndio-dev)
            

            Then :
            - install SDL2 separately from source
            - install the other packages -> basic install
            - reboot the raspberry pi
            - everything should work

            p.s.
            Look also at this post to fix the emulationstation install :
            https://retropie.org.uk/forum/topic/31924/could-not-successfully-build-sdl2-on-bullseye/11

            Edit : the module-script for emulationstation has been updated and as far as I know will now install correctly (installing emulationstation from source).

            DarksaviorD 1 Reply Last reply Reply Quote 1
            • DarksaviorD
              Darksavior @Folly
              last edited by Darksavior

              (OUTDATED DON'T USE)
              You can now install sdl2 on bullseye with 2.0.20 from this repo: https://github.com/joolswills/RetroPie-Setup/tree/sdl_2.0.16

              I had to fool around with some scripts so they'd build to test a game and the performance is worse than buster and I get screen tearing/jerky video once every few seconds. I wouldn't bother wasting the time until it's done.

              T 1 Reply Last reply Reply Quote 1
              • R
                rafaelrafael
                last edited by

                Is there some coordinate effort to get retropie working with bullseye? I'd like to contribute, if there is someone already leading that effort.

                F 1 Reply Last reply Reply Quote 0
                • F
                  Folly
                  last edited by Folly

                  The next problem is that omxplayer is marked obsolete in bullseye.
                  So it's removed from the bullseye repository.
                  Therefor installing emulationstation will fail as it can't install omxplayer.

                  A workaround is to install emulationstation-dev from the experimental packages.

                  An other workaround is to comment or remove the lines 140,141,142 from the emulationstation.sh script.
                  Although we can get it working this way, there will probably be a few things that will not work correctly.

                  Edit :
                  I prefer the second solution because it creates es_systems.cfg in the correct directory.
                  With emulationstation-dev you have to update/copy es_systems.cfg when you add systems.
                  Or use pegasus-frontend as @Darksavior suggests in post 16.

                  1 Reply Last reply Reply Quote 0
                  • F
                    Folly @rafaelrafael
                    last edited by Folly

                    @rafaelrafael said in Could not successfully build sdl2 on Bullseye:

                    Is there some coordinate effort to get retropie working with bullseye? I'd like to contribute, if there is someone already leading that effort.

                    They are busy, though it's reverted back to "2.0.10" :
                    https://github.com/RetroPie/RetroPie-Setup/commit/0d45d6bb0fbce3fd1b251353b0ee712ef92ace8e

                    1 Reply Last reply Reply Quote 0
                    • F Folly referenced this topic on
                    • F Folly referenced this topic on
                    • F Folly referenced this topic on
                    • T
                      tavuntu @Darksavior
                      last edited by

                      @Darksavior said in Could not successfully build sdl2 on Bullseye:

                      https://github.com/joolswills/RetroPie-Setup/tree/sdl_2.0.16

                      Looks like they took this down? maybe moved it?

                      DarksaviorD 1 Reply Last reply Reply Quote 0
                      • DarksaviorD
                        Darksavior @tavuntu
                        last edited by Darksavior

                        @tavuntu Follow @Folly 's guide.

                        I guess this deserves an update. I've been using 64bit bullseye lite for months now with little issues now using Folly's guide. I no longer get any screen tearing. There are some performance issues with lr-snes9x with minor drops so I'm not sure if the installer script needs to be optimized. In the past it would give me some armv6 error when building but that seems to be gone.

                        T 1 Reply Last reply Reply Quote 1
                        • T
                          tavuntu @Darksavior
                          last edited by tavuntu

                          @Darksavior Alright, thanks for the info. I've been trying to run retroarch (no emulationstations, only retroarch binary + cores) in DietPi using that same guide to "fool" the script, unfortunately it is not straight forward (and that makes sense since it's not a supported system). Have you ever seen an error like libbrcmOpenVG.so: cannot open shared object file? I tried googling.

                          DarksaviorD 1 Reply Last reply Reply Quote 0
                          • F Folly referenced this topic on
                          • DarksaviorD
                            Darksavior @tavuntu
                            last edited by Darksavior

                            @tavuntu Sorry, no. After I set up my controllers with ES I switch to the pegasus-frontend with my custom theme.

                            1 Reply Last reply Reply Quote 0
                            • F Folly referenced this topic on
                            • F Folly referenced this topic on
                            • 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.