opensoldat icon indicating copy to clipboard operation
opensoldat copied to clipboard

Compile for aarch64

Open NF3RN0 opened this issue 5 years ago • 4 comments

I have successfully compiled the server and client on a Raspberry Pi 4 running Arch Linux Arm. It all works surprisingly well. Might be able fully target arm in the future, however as of right now it took me some work to get it to properly compile. I have not extensively tested it and would imagine performance will take a hit once I add more than just me flying around playing 1v0 CTF.

Build Dependencies:

  • Kernel: 5.4.51-1-ARCH aarch64 GNU/Linux

  • I used this unmerged commit. This I believe is because of this issue. Same issue on arm as is in X86.

  • FPC 3.2.0 aarch64 download and install or build it yourself, does not exist as a package on Arch Linux Arm.

  • Completely remove pascalscript folder and replace with the latest repo.

  • mesa-20.0.7-3 is required as per this issue. The latest Mesa broke soldat. Show up as all red screen just like the issue states.

  • Built the latest repo of GNS.

Update the Makefile for both client and server for fpc to target aarch64.

Comment out /pascalscript/Source/uPSR_dll.pas line 106.

Comment out pascalscript/Source/uPSR_dll.pas line 106

There is one other line that needs to be commented out but it is escaping me right now.

I'll add more details later if need be but this should work.

I could push the changes to the Makefile but not really sure if this project wants to target arm in the future. The other changes I made to pascalscripts are what I did to get it to compile and I do not know what effects they will ultimately have on other architectures.

Edit: FWIW I am using Wayland and Sway window manager.

Cheers.

NF3RN0 avatar Oct 01 '20 04:10 NF3RN0

Can this work on Raspberry Pi OS, ARM? Thanks

HaydenBat avatar Oct 05 '20 01:10 HaydenBat

I'm not against providing support for more platforms. The main question would be how well we can maintain a linux arm build.

Shoozza avatar Oct 05 '20 16:10 Shoozza

It would be possible to rework the build infrastructure to support cross-compiling as well. Those probably should be statically linked then to avoid any issues running them.

sternenseemann avatar Jan 05 '21 10:01 sternenseemann

@NF3RN0 that's great to make Soldat run on Raspberry Pi! Could you create a command-by-command instruction for people like me how to build it, please? I'm running my Raspberry Pi with Ubuntu and unfortunately I'm not that great with 'make'-ing to understand the issues I'm running into. Thanks!

Logrus-ii3 avatar Dec 16 '21 21:12 Logrus-ii3