SuperTuxKart porting
-
I would like to try and port SuperTuxKart over to a Clickable for Ubuntu Touch but I really do not know enough about SuperTuxKarts code or Clickable so I am not really getting anywhere.
You can install SuperTuxKart via Libertine since it has an Arm build already but you can not click on anything or enable the touch screen controls.
There are videos of it running on a pinephone but I think it is running Pure OS. There is also an Android build of it.
I have installed everything needed to compile STK and I have all the clickable dev tools installed. I have created a project with clickable but now I am not really sure what to do. Is there anyone out there willing to give a hand or point towards a app porting tutorial for clickable that would be relevant in this case, STK is mostly C++
Thanks
-
I have spent a fair amount of time looking through the STK code and I can not see any way of compiling for different architectures except in the Android section which I believe is more about packaging for release than the actual compiling. It does give some clues to possible flags we can use for the compiler but it is out of my skill set so far.
This makes me think it is all standard make commands used to compile for different Linux architectures but they do not include any examples for how the arm versions available in the debian repos were generated. I myself do not know enough about compiling code to create the correct make files and manifests for Clickable to compile for UT. I have successfully compiled it for x64 while trying to figure out how to compile for different architectures but it was fully automated to the build the host systems architecture.
I can hack my way through programs that already have set up compilation instructions to make changes, fix things etc but I have very little experience when it comes to porting and compiling packages. If someone can set things up to compile using clickable I would be happy to test and modify things to work on UT or even figure out why compilation will not complete. I just don't know how to start making clickable compile STKs code. I am sure it is obvious for those of you with lots of experience. I have already spent some time looking through Tux Racers port to see what changes were made to get it to work with UT and feel it should be possible for STK as they were mostly minor.
-
I have spent a fair amount of time trying to figure out how the arm deb packages were generated without any success.
You can find the Ubuntu repo with arm builds source here but again I find no hints as to how they generate the arm builds except maybe on a machine with the correct architecture.
I found this conversation about compiling c++ code inside of Clickable and it mentions using
Clickable run "make"
which I tried in place of the normal make for compiling STK and got generic errors in the output.
I then did a lot more research to try and see why it will not compile inside the docker image and ended up trying many things.
I feel running the entire build process inside clickables docker image is likely the best route so it can auto detect the target but that did not work. I also tried passing --target with armhf, armv7 and many others to cmake inside clickable but it does not effect the errors and does not create a makefile either.
clickable run "cmake --debug-output /home/Projects/STK/stk-code/" --verbose or clickable run "cmake --debug-output --target armhf /home/Projects/STK/stk-code/" --verbose
I get
CMake Error: The source directory "/home/Projects/STK/stk-code" does not appear to contain CMakeLists.txt.
But if I run it outside of clickable it works and even while passing it a target I do not get any errors and it still sets things up to run on my host system not for arm.
cmake --debug-output --target armhf /home/Projects/STK/stk-code/
I feel like once I see how it should be done I will feel stupid but as of right now I am no closer than when I first posted the idea of porting STK.
Does anyone have any hints or suggestions?
-
@antidroid Are you on telegram? maybe you can better connect to the ones with experience on this topic.
-
@kugiigi Thank you for the suggestion and you are probably correct, but I am not the kind of person that does live or private chatting.
It may just be that it takes me longer to understand and I need to be able to reread, lookup terms and go over the information many times in a way that live chatting does not allow. I also kind of see it as only helping one person and the questions end up having to be asked over and over and are not searchable and accessible days, weeks, months later.
-
@antidroid Yeah I understand, I just think that the people who can help you on this are the opposite, not active here but active in telegram
-
@kugiigi said in SuperTuxKart porting:
@antidroid Yeah I understand, I just think that the people who can help you on this are the opposite, not active here but active in telegram
This is quite a pity because he is right, only forums give persistence to the writing, and easy search, for anybody, even non-logged.
-
The reason I can not find the information is because the people that know prefer to communicate in ways that do not get preserved. I do not want to contribute to that issue and even if I did join and ask the question I wouldn't understand the answer well enough to then post it for others in a comprehensible way.
The funny thing is it only really increases the work load for those people because it makes it harder for others to contribute because they can not find the information they need so they give up leaving only a few core people doing all the work. Then everyone wonders why more people don't roll up their sleeves and get to work fixing bugs rather than complaining.
No matter what I will keep working away and contribute in anyway I can. It does not look like it will be porting apps anytime soon which sadly is one of the big things UT needs to get more users.
-
@antidroid Sorry, I did not intend to make this thread about forum vs chat
I was just giving my guess why you haven't receive any response yet.To be fair, there are of course cons and pros for both forums and chats. They both have their purpose and there are people who thinks the opposite as your opinion. For some, going to forums is more effort than in live chat.
Anyway, hopefully you get responses here I would suggest directly contacting the developers of similar apps/games in the store though, even just via email. Then if you get valuable discussion then you can just post here those information.
-
@antidroid Saw on Telegram @qiangong2 who was already fighting for building STK, don't where it landed, see https://github.com/Qiangong2/stk-code
-
@kugiigi No worries and I do agree 100%. I Started by asking for help on Github in the STK code repo and it was only after a week without any response I reluctantly signed up here.
I am an old aspie and all this social stuff is not for me. I have an email account, github account and now this one. When involved with opensource hardware/software projects I've had accounts on those forums too until I get a new obsession and move on. But I have never had and never will have a facebook, twitter, instagram or other social media account.
Hell I had a feature phone until a few months ago and would still have one if there were any decent ones compatible with the networks where I live. I wanted an Ubuntu phone back when canonical had their crowd funding campaign but they were not available in my Country and the networks were not compatible to import one. I maintain 16 different Android devices for my kids and family (TV's, Tablets and Phones) and honestly I personally can't believe people voluntarily use them. When my last feature phone died and before I found a OPO to flash UT on I simply didn't have a phone. I know it sounds strange to most people but as an aspie everything is black and white, no grey area where I do things that do not make logical sense in my mind.
Sorry for the wall of text. Again an aspie thing, we do not tend to express ourselves concisely.
-
@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.
-
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.
-
This post is deleted! -
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.
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-alphaDownload 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.
-
@antidroid congrats for your successful build ;-). Don't have an arm64 too, so can't test, maybe announce it on Telegram ?
-
@lduboeuf I tested it on my Xperia X and it won't open
The error isWARNING **: 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. -
@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
-
@antidroid
Here are my logs.
http://paste.ubuntu.com/p/79GpQcg54G/ -
@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