Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Cross Compiling for macOS on Linux with Darling

Hansem Ro edited this page May 12, 2022 · 3 revisions

Status: Builds in Darling environment and works in macOS.

  1. Install darling.
# Arch Linux
yay -S darling-git
  1. Download Command Line Tools for Xcode (12.4) from Apple Developer portal.

  2. Install Command Line Tools in darling shell.

$ darling shell
Darling [.]$ hdiutil attach /path/to/Command_Line_tools_for_Xcode_12.4.dmg
Darling [.]$ cd /Volumes/Command_Line_Tools_for_Xcode_12.4/
Darling [.]$ /usr/bin/installer -pkg Command\ Line\ Tools.pkg -target /
  1. Install brew and dependencies in Darling environment.
pip3 install scons
  1. Clone repo
git clone https://github.com/hansemro/GDClip
  1. Retrieve submodules
cd GDClip && make prep
  1. Build with make PLATFORM=osx inside darling shell (parallelize build by setting NPROC variable)

  2. Retrieve built library at ./bin/libgdclip.dylib

Darling shell hangs

Partial solution: In a new shell, kill darling with darling shutdown and try again.