dh1tw / remoteAudio-xcompile

Cross Compilation Containers for remoteAudio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Cross-)Compiling remoteAudio with Docker Containers

remoteAudio is a flexible, low latency audio streaming solution (mainly) for remote amateur radio purposes. It is completely Open Source and written in Go. remoteAudio is available for all modern operating systems and architectures.

Despite that Go can cross compile for a variety of architectures and operating systems out of the box, things get complicated once cgo and external C libraries are needed.

This repository contains a set of Dockerfiles with cross compilation chains preinstalled. These cross compilation chains allow building the remoteAudio binaries conveniently with just one command for:

Operating System Architecture
Linux amd64 (64bit)
i386 (32bit)
armhf (32bit)
arm64 (64bit)
Windows amd64 (64bit)
i386 (32bit)

Prerequisites

You need to have docker installed on your system. Docker provides excellent documentation on how to install docker for your OS / distribution.

How to invoke

You can compile the remoteAudio source code directly from the source code directory. In example, for compiling the binary for linux/arm64 you have to execute the following command:

$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp dh1tw/remoteaudio-xcompile:linux-arm64 /bin/sh -c 'make dist'

Get Windows runtime dependencies

For compiling the Windows binaries, the MinGW compiler is used. The needed runtime dependencies (DLLs) can be copied into the source directory after compilation with the following command (Powershell):

$ docker run --rm -v ${pwd}:/usr/src/myapp -w /usr/src/myapp dh1tw/remoteaudio-xcompile:windows-amd64 /bin/sh -c 'make dist && /scripts/getlibs.sh .'

Build containers locally

You can also build the containers locally if you like. For example the one for linux-arm64:

$ docker build -t me/remoteaudio-xcompile:linux-arm64 ./arm64

About

Cross Compilation Containers for remoteAudio

License:MIT License


Languages

Language:Dockerfile 88.8%Language:Shell 11.2%