Stellarium is an excellent open source application used for astronomy. It is not directly developed for the macOS, but uses cross platform components which allow it to be compiled on other operating systems.  As development is not macOS specific, it relies on volunteers who give their own time to compile versions for Intel and PPC versions. 

Here we will attempt to cover how to compile under macOS on an Intel MacBook, with macOS 10.14.3 Mojave, from original source code, to make up to date versions easier to compile. 

These notes are based on the original Stellarium website wiki notes, but we have modified them as a result of experiment under macOS.

Below are links to some of the files produced from the build process, app start up and possible errors.

Latest Builds under macOS 10.14.3 Build Log example Start File example Crash Log example
0.18.3 - Qt 5.11.2 buildlog.txt log.txt crashlog.txt

COS Stellarium for macOS - sf.net
Tool Source and File Lab Version
You need a machine with Mac OS X 10.14 or later.

App Store 10.14.3

Install the latest version of Apple's Developer Tools: https://developer.apple.com/xcode/

The MacPorts install later in these notes requires 7.0.1 or later for El Capitan

Apple's latest Xcode Developer Tools , are found at the Apple Developer Connection site (must have a sign in with your Apple id).

Using the latest available version that will run on your OS is recommended. We install from the App Store as part of 'software updates' that become available on a regular basis. The command line tools get updated in a similar way.

To initially get Xcode command line tools, once you have Xcode installed, open a terminal, run 'xcode-select --install', and click the Install button to install the required command line developer tools.You may also have to run 'sudo xcodebuild -license' after the install. The tools may come with later Xcode versions as standard.

macOS Updates 10.1
Tool Source and File Lab Version

Install the latest version of Qt libraries.

The main pkg file in the dmg will guide you through the steps to getting Qt 5.11 Opensource Edition installed on your machine.

It is not necessary to install the entire application, as we are not developing the source code, just compiling it. The figure below shows the only components required here, everything else can be 'unticked'. This saves a considerable amount of disc space.

This version installs in under the user library by default and the whole application now appears to reside under User/Qt5.11.2.

This means that this new version of Qt has to be added to the PATH variable so that the build process can find the libraries it needs. We simply amended our script for release 5.11.2 and above to contain:

echo "Add path to Qt5.11.2 to 'PATH'"

export PATH=~/Qt5.11.2/5.11.2/clang_64/bin:$PATH







Install MacPorts.

Requires Xcode 10.14.3 or later.

Macports can be installed from the Macports website listed on the right, once installed you can use the command below in Terminal.

sudo port -v selfupdate

to update the current MacPorts install.

Use the command below in Terminal to install required tools.

sudo port install intltool (which will install all you need).

To list installed ports use command below in Terminal:

port list installed

To upgrade already installed ports use the command:

sudo port upgrade outdated




Install the latest version of cmake via Terminal using:

$ sudo port install cmake

More information at:




Step Notes Screen examples

Create a build directory under your user home folder with Finder or shell - the following directory is just an example, you can pick any name and path you want. This directory may already exist for projects if you have used Xcode, and we have used this directory to keep all projects together.

$ mkdir ~/Developer

You only have to do this once, the folder can be re-used.

2 Get the latest stellarium source code - now on GITHUB - via this link. It will appear in the user 'Downloads' folder as a folder called "stellarium-master".

Step Notes Screen examples
The entire copying of the downloaded source, packaging and production of a 'dmg' file containing the app is done by the script example shown here. It requires a folder called 'Uploads' in the user directory.

Sample script.