• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

SuperTuxKart porting

Scheduled Pinned Locked Moved App Development
29 Posts 7 Posters 4.7k Views 1 Watching
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.
    • A Offline
      AntiDroid @lduboeuf
      last edited by 19 Feb 2021, 11:31

      @lduboeuf Thank you very much. He at least has a start there and maybe if I can get it to at least complain about compiling I can figure it out.

      1 Reply Last reply Reply Quote 0
      • A Offline
        AntiDroid
        last edited by AntiDroid 28 Feb 2021, 02:24

        UPDATE Feb 28, 2021

        I am making progress. You can find the repo here

        There are still some issues. Maybe one of the people here that actually know what they are doing can spot what I am doing wrong. I also have an open dialog with the STK developers in github.

        Clickable Arm64 build

        This one builds completely and creates a clickable. I tried installing it on my OnePlus 6T which is running a GSI from a few months ago. It is the only arm64 device I have and is not a stable device.

        I get

        Fatal error: /home/phablet/Downloads/supertuxkart_1.2.0-ubports_arm64.click fail
        WARNING:root:signiture check failed, but installing anyway as requested
        Cannot install /home/phablet/Downloads/supertuxkart_1.2.0-ubports_arm64.click F
        

        There may be more to the message but UT_tweak tools output window does not wrap and has no side scroll I could find.

        Clickable Armhf build

        Armhf builds all the object files and only fails at the last step creating the executable which fails at

        Linking CXX executable bin/supertuxkart
        lib/angelscript/projects/cmake/libangelscript.a(as_callfunc.cpp.o): In function `CallSystemFunction(int, asCContext*)':
        as_callfunc.cpp:(.text+0x1e4): undefined reference to `CallSystemFunctionNative(asCContext*, asCScriptFunction*, void*, unsigned long*, void*, unsigned long long&, void*)'
        
        

        I get the feeling

        as_callfunc.cpp.o
        

        should be a call to

        as_callfunc_arm.cpp.o
        

        and that means it is not detecting the architecture correctly?? It appears to be related to Anglescript (Again https://github.com/supertuxkart/stk-code/issues/2411 https://github.com/supertuxkart/stk-code/pull/2195 https://github.com/supertuxkart/stk-code/issues/2569 and others) and compiling for arm. Again I am not sure how I would do this without modifying STKs code. I would rather do it from the clickable build files.

        Clickable desktop build

        I can build all the object files and even build an executable but it fails at the very end with.

        Installing /home/Projects/stk/stk-code/ubuntu_touch/manifest.json
        Installing /home/Projects/stk/stk-code/ubuntu_touch/supertuxkart.apparmor
        Installing /home/Projects/stk/stk-code/ubuntu_touch/supertuxkart.desktop
        Installing /home/Projects/stk/stk-code/ubuntu_touch/icon.png
        Successfully built package in './supertuxkart_1.2.0-ubports_amd64.click'.
        /home/Projects/stk/stk-code/ubuntu_touch/build/x86_64-linux-gnu/app/supertuxkart_1.2.0-ubports_amd64.click: pass
        non-network local connections being added to access control list
        Mounting device home to /home/.clickable/home
        [error  ] FileManager: Could not find file 'supertuxkart.git'in any standard location (esp. ../data).
        [error  ] FileManager: Last location checked '/./share/supertuxkart/data/'.
        [fatal  ] FileManager: Set $SUPERTUXKART_DATADIR to point to the data directory.
        Command exited with non-zero exit status 1, see above for details. This is most likely not a problem with Clickable.
        

        The solution is here I think https://forum.freegamedev.net/viewtopic.php?f=18&t=7595 but I would like to implement it from the clickable build files rather than modifying anything in the STK code or having to do it manually but I have not figured that one out yet.

        1 Reply Last reply Reply Quote 1
        • A Offline
          AntiDroid
          last edited by 1 Mar 2021, 09:12

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • A Offline
            AntiDroid
            last edited by AntiDroid 3 Jan 2021, 09:34 1 Mar 2021, 09:21

            Alpha testing


            I have successfully built an Arm64 click package of SuperTuxKart. I am unable to test it due to my only arm64 device thinking it is armhf.

            From talking with the people over at STK it may work out of the box without any other changes since this version uses sdl2 to interface with the touchscreen and sensors. :crossed_fingers:

            If you would like to test it out you can download it here.
            https://github.com/Intrinsically-Sublime/stk-code/releases/tag/V1.2.0-alpha

            Download it directly on the phone to the downloads directory.

            Then from the command line.

            cd ./Downloads
            sudo pkcon install-local ./supertuxkart_1.2.0-ubports_arm64.click --allow-untrusted
            

            I honestly do not know if it will do anything at all.

            L A 2 Replies Last reply 1 Mar 2021, 10:09 Reply Quote 1
            • L Offline
              lduboeuf @AntiDroid
              last edited by 1 Mar 2021, 10:09

              @antidroid congrats for your successful build ;-). Don't have an arm64 too, so can't test, maybe announce it on Telegram ?

              K 1 Reply Last reply 1 Mar 2021, 10:38 Reply Quote 0
              • K Offline
                kugiigi @lduboeuf
                last edited by 1 Mar 2021, 10:38

                @lduboeuf I tested it on my Xperia X and it won't open
                The error is

                WARNING **: Unable to exec `supertuxkart` in `/opt/click.ubuntu.com/.click/users/phablet/supertuxkart`: No such file or directory
                

                Looks like you're executing on the wrong directory. The binary is at /opt/click.ubuntu.com/supertuxkart/current/bin/ in the current installation.

                K 1 Reply Last reply 1 Mar 2021, 10:51 Reply Quote 0
                • K Offline
                  kugiigi @kugiigi
                  last edited by 1 Mar 2021, 10:51

                  @kugiigi I tried to manually execute the binary and gets the error below

                  error while loading shared libraries: libvorbisfile.so.3: cannot open shared object file: No such file or directory
                  
                  A A 3 Replies Last reply 1 Mar 2021, 11:04 Reply Quote 0
                  • A Offline
                    aarontheissueguy @AntiDroid
                    last edited by 1 Mar 2021, 11:03

                    @antidroid
                    Here are my logs.
                    http://paste.ubuntu.com/p/79GpQcg54G/

                    A 1 Reply Last reply 1 Mar 2021, 11:06 Reply Quote 0
                    • A Offline
                      AntiDroid @kugiigi
                      last edited by AntiDroid 3 Jan 2021, 11:07 1 Mar 2021, 11:04

                      @kugiigi Thank you. I will look into this. I should probably build it with the debug flag enabled so we get a little more information.

                      Just so I understand. The click installed but fails to run or it fails to install?

                      EDIT: Reread your message and understand now

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        AntiDroid @aarontheissueguy
                        last edited by 1 Mar 2021, 11:06

                        @aarontheissueguy Thanks

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          AntiDroid @kugiigi
                          last edited by 1 Mar 2021, 11:43

                          @kugiigi said in SuperTuxKart porting:

                          I tried to manually execute the binary and gets the error below

                          Where did you find the binary installed? Was it where it was supposed to be?

                          /opt/click.ubuntu.com/.click/users/phablet/supertuxkart
                          
                          K 1 Reply Last reply 1 Mar 2021, 11:51 Reply Quote 0
                          • K Offline
                            kugiigi @AntiDroid
                            last edited by 1 Mar 2021, 11:51

                            @antidroid Well it seems that click files are located in multiple directories, most likely just symlinks. First is at /opt/click.ubuntu.com/supertuxkart/current/bin but it also exists at /opt/click.ubuntu.com/.click/users/phablet/supertuxkart/bin. The latter seems to be the path used in the desktop files of click apps. I honestly have no idea where your app is wrong. I compared it to other working apps and it seems correct.

                            1 Reply Last reply Reply Quote 1
                            • A Offline
                              abmyii @kugiigi
                              last edited by 1 Mar 2021, 13:19

                              @AntiDroid You need to package the required libraries in the click. This is how I do it for Neverball: https://gitlab.com/abmyii/neverball-touch/-/blob/master/clickable.json#L43-58

                              The method I use to identify them is just trial-and-error. I assume it runs on your device because you have the libraries already installed, whereas most devices don't have those libraries preinstalled.

                              @kugiigi What you could try is to use the libraries packaged with Neverball when running the game manually, since it should have most (if not all) of the required libraries. To do that, run:

                              export LD_LIBRARY_PATH=/opt/click.ubuntu.com/neverball.abmyii/current/lib/aarch64-linux-gnu:/opt/click.ubuntu.com/*.abmyii/current/lib/*
                              

                              And then run SuperTuxKart manually as you did before.

                              K 1 Reply Last reply 1 Mar 2021, 14:01 Reply Quote 3
                              • K Offline
                                kugiigi @abmyii
                                last edited by 1 Mar 2021, 14:01

                                @abmyii I tried that but now it's looking for libopenal.so.1

                                A A 2 Replies Last reply 1 Mar 2021, 15:46 Reply Quote 0
                                • A Offline
                                  abmyii @kugiigi
                                  last edited by 1 Mar 2021, 15:46

                                  @kugiigi If you are up for it, you can just manually download all the required libs until it works - there shouldn't be too many more TBH. The process is a bit finicky, but doable. I can explain how to, if you are interested.

                                  Unfortunately I don't have an arm64 device, else I would have tried it myself.

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    AntiDroid @kugiigi
                                    last edited by 1 Mar 2021, 22:07

                                    @abmyii Thank you very much you have saved me having to figure out how to add the libs. I had looked through UBports development guide for dependencies but wasn't sure exactly how to go about it. I now see with your information it is this section.

                                    @kugiigi It is easy for me to add the libs but difficult to figure out which ones it needs without a working device.

                                    No pressure on anyone to test this, it can wait until I have a working device. People can fork my repo and build it themselves too. I have included build instructions in the ubuntu_touch folder README. I have just updated the repo with the current clickable.json incuding the known needed libs so far.

                                    T 1 Reply Last reply 3 Mar 2021, 18:40 Reply Quote 1
                                    • T Offline
                                      Trischi @AntiDroid
                                      last edited by 3 Mar 2021, 18:40

                                      @antidroid I had to install libvorbisfile3 and libopenal1.

                                      Now this appears:

                                      [error ] FileManager: Could not find file 'supertuxkart.git'in any standard location (esp. ../data).
                                      [error ] FileManager: Last location checked '/./share/supertuxkart/data/'.
                                      [fatal ] FileManager: Set $SUPERTUXKART_DATADIR to point to the data directory.

                                      Sony Xperia X Performance

                                      A 1 Reply Last reply 3 Mar 2021, 18:59 Reply Quote 1
                                      • A Offline
                                        AntiDroid @Trischi
                                        last edited by 3 Mar 2021, 18:59

                                        @trischi Thank you, I will look into it.

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