Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

How to start with crosscompiling Mac -> AROS ARM64

Last updated on 17 hours ago
B
BohunMember
Posted 3 days ago
I know, its simply for developers, but I dont understand what I need to do to start crosscompiling Sad

Gemini:

To cross-compile from macOS for the AROS AArch64 platform (ARM64, e.g., for Pinebook, 64-bit Raspberry Pi 3/4, or QEMU virtual machines), your local gcc-16 is not enough.

AROS uses a specific ELF binary format with its own ABI, C standard library (clib2 or AROS libc), and a set of AmigaOS/AROS system headers (<proto/dos.h>, <proto/intuition.h>, etc.).

Here is how to set up the workflow:

Step 1: Set Up the Environment (Docker / Container)

Building the AROS toolchain directly on macOS can be troublesome due to the default case-insensitive filesystem and specific GNU tool requirements. The cleanest approach on macOS Apple Silicon is using a Linux container (e.g., OrbStack or Docker Desktop).
AROS source and configuration script:
The AROS repository includes scripts to configure the cross-toolchain:
Bash

git clone https://github.co...m/AROS.git
cd AROS
./configure --target=arm64-arm-aarch64
make toolchain
make sdk


SDK build output:
The output directory will contain:
The compiler: aarch64-aros-gcc (or a wrapper script calling gcc with the appropriate flags)
The sysroot/SDK tree with AROS headers and libraries: .../AROS/Development

Step 2: Configure a Compiler Wrapper
In practice, compiling a program for AROS involves calling the compiler with the --sysroot parameter pointing to the SDK files:
Bash

aarch64-aros-gcc --sysroot=/path/to/AROS/Development main.c -o my_program


You can create a simple wrapper script on macOS at ~/bin/aros-gcc:

Bash

#!/bin/bash
# If you have the toolchain locally:
/path/to/toolchain/aarch64-aros-gcc --sysroot=/path/to/AROS/Development "$@"

# OR if you run it via Docker:
# docker run --rm -v "$(pwd):/work" -w /work aros-sdk aarch64-aros-gcc "$@"


Remember to make it executable: chmod +x ~/bin/aros-gcc.

Step 3: Integrate with Geany on macOS
Once you have the aros-gcc command accessible in your terminal:
Open your source code file in Geany (e.g., a program using AROS libraries).
Go to: Build $rightarrow$ Set Build Commands.In the C source commands section:
Compile:
Plaintext

aros-gcc -Wall -c "%f"

Build:
Plaintext

aros-gcc -Wall -o "%e" "%f"


Click OK to save.
Example Test Code for AROS

C

#include <proto/dos.h>
#include <proto/exec.h>
#include <stdio.h>

int main(int argc, char **argv) {
PutStr("Hello from AROS AArch64!n"Wink;
printf("Called with arguments: %dn", argc);
return 0;
}


Pressing F9 in Geany will produce a binary ready to be transferred to an AROS system or booted inside QEMU (qemu-system-aarch64).
B
BohunMember
Posted 3 days ago
Please explain to me what exactly I should do in the first step
D
deadwoodAROS Dev
Posted 2 days ago
I can't help you with Docker - I don't use it. However if you install Linux in a VM on your Mac, I can give you step by step instructions how to get a cross compiler. Let me know.

Note: I see Ubuntu 26.04 has ARM64 image - you should install that version of Linux.
Edited by deadwood on 21-08-2026 01:26, 2 days ago
ArgoArgoJunior Member
Posted 2 days ago

Bohun wrote:

@Bohun - Please explain to me what exactly I should do in the first step


You should be able to install the Arm64 Ubuntu 26.04 Docker image from within Docker Desktop when you create the container

https://hub.docke...?tag=26.04

From there, you just enter the Linux environment and run git clone in the terminal
B
BohunMember
Posted 2 days ago
I configured the SDK. I compiled Hello World. After running it on the Raspberry Pi, I saw Guru. I think I'll give up on this, but thank you for your help.
D
deadwoodAROS Dev
Posted 2 days ago
Can you tell me if the attached program also Guru's for you (run it from Shell)?
You do not have access to view attachments
B
BohunMember
Posted 2 days ago
yes, same guru with your and my file
Edited by Bohun on 21-08-2026 15:04, 2 days ago
You do not have access to view attachments
D
deadwoodAROS Dev
Posted 1 day ago
Are you using the latest nightly build on you Raspberry Pi? I think there were some breaking changes in the last couple of days and the cross compiler compiled "today" will not generate executable working with a nightly build from 1-2 weeks ago.
B
BohunMember
Posted 1 day ago
My system is from August 18th. I assume your HelloWorld is starting correctly on your Pi? I thought the toolchain was simply generated incorrectly.

On a side note, since my Pi is in a laptop case and I have limited access to the SD card, I was thinking about updating the system – downloading the NB via wget, unpacking the archive, and replacing the files on reboot or restart. It might be worth building something like this.
D
deadwoodAROS Dev
Posted 1 day ago
The changes that I mentioned went in in the evening of 18th so your system from morning of 18th is probably not compatible anymore. Please try using latest nightly and the try again my helloworld.

PS. I don't have RPi to test.
B
BohunMember
Posted 1 day ago
They work! Your program and mine Smile
Thanks
D
deadwoodAROS Dev
Posted 1 day ago
See, I knew we are gonna make it work Smile

Just keep in mind that such breaking changes can occur more often. You might wanna consider some automation that will re-build your toolchain when they happen and re-compile your to-be-written software.
B
BohunMember
Posted 23 hours ago
Okay, I'll keep that in mind. I'm glad I can finally start writing something for the Pi. The first tests are positive.
B
BohunMember
Posted 19 hours ago
I'm proud to present the first program I compiled on the Raspberry Pi. It's a port of an earlier program I wrote in Hollywood. It prints PDF files to a network printer equipped with a PDF interpreter. In my case, it's a Brother HL-L3230CDW color laser printer. I chose it a few years ago specifically for Amigas.

And... I printed a PDF document on it on a Raspberry Pi 3B+ running AROS ARM64 Smile


Oh, I forgot, the GUI is in Polish...
The buttons are "scan network," "select PDF file," and "print."
Edited by Bohun on 22-08-2026 09:38, 19 hours ago
retrofaza, aha, sonountaleban, A500Fan, Deremon, Argo
You do not have access to view attachments
D
deadwoodAROS Dev
Posted 19 hours ago
Very nice! So I guess AI is quite capable in trasforming Hollywood to C right? Are you using the documentation package I shared ealier? That should help teach AI about specific AROS APIs.
M
miker1264Software Dev
Posted 18 hours ago
Very cool.

Which method, MUI or Custom are you using for the 3d buttons? I like that button style.

It's great that it works on RasPi. I have one in my PiStorm 32 Lite.

AROS running on Raspberry Pi is a great path forward. The hardware is relatively inexpensive and fun to use.
B
BohunMember
Posted 17 hours ago
@miker 1264
The GUI is made in MUI.
I share your enthusiasm for the Raspberry Pi. I wonder if it would be possible to run AROS natively on Pistorm.

@deadwood
Yes, translating the code from Hollywood to C went smoothly. I didn't even use an agent, just two Gemini prompts. As you can see, the AI ​​even handled RapaGUI.
Yes, translating the code from Hollywood to C went smoothly. I didn't even use the agent, just two Gemini prompts. As you can see, the AI ​​even handled RapaGUI. I didn't use the documentation you provided, but I will before larger projects. I need to do a lot of setup for C and AROS specifically, because so far I've been focusing on Hollywood.
amigamiaamigamiaAdmin
Posted 17 hours ago

deadwood wrote:

@deadwood - I can't help you with Docker - I don't use it. However if you install Linux in a VM on your Mac, I can give you step by step instructions how to get a cross compiler. Let me know.

Note: I see Ubuntu 26.04 has ARM64 image - you should install that version of Linux.


Perhaps this can help configuring a Docker image for ARM development?

https://github.com/BlitterStudio/aros-compiler-docker
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Users who participated in discussion: amigamia, deadwood, Argo, miker1264, Bohun