Stellarium is an excellent open source application used for astronomy. It is not directly developed for the iMac and OS X, but uses cross platform components which allow it to be compiled on other operating systems.  As development is not OS X 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 OS X on an Intel iMac with OS X 10.11.2 El Capitan from original source code, to make up to date versions easier to compile.  These notes are based on the Stellarium website wiki notes, but we have modified them as a result of experiment on our iMac.

Original Stellarium Wiki link http://stellarium.org/wiki/index.php/Compilation_on_Mac_OS_X

Latest Builds under OS X 10.11.6 Build Log File Start File Crash Log
0.90.0 - Qt 5.7.0 buildlog.txt log.txt crashlog.txt

COS Stellarium for OS X - sf.net
COS Stellarium for OS X - launchpad.net
Tool Source and File Lab Version
You need a machine with Mac OS X 10.11 (latest version 10.11) or later.

App Store El Capitan 10.11.2 - 09/12/2015

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 also have to run 'sudo xcodebuild -license' after the install.

OS X Updates 7.2.0 Installed 09/12/2015
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.5 Opensource Edition installed on your machine.

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

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 0.15.n and above to contain:

echo "add path to Qt5.5.1"

export PATH=~/Qt5.5.1/5.5/clang_64/bin:$PATH







Installed 09/12/2015

Install MacPorts.

Requires Xcode 7.0.1 or later for El Capitan

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




Installed 26/10/2013

Install the latest version of cmake via Terminal using

$ sudo port install cmake

More information at:



Installed 26/10/2013

Install bazaar making use of macports via Terminal

$ sudo port install bzr


Install from download.

More information at:


2.7.0 (?)

Installed 26/10/2013

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.

Finder screen
2 Using 'Finder' open folder 'Developer', if a previous stellarium 'branch' directory exists, then rename 'stellarium_nn' where 'nn' is a number.

3 Using shell change to Developer directory and in that directory checkout the sources with the bzr command - this does require a shell session.  This will download the stellarium source into a new folder called "stellarium", under the "Developer" folder.  Note that at any point you can delete this "stellarium" folder and and start the download process again from step 3.

$ cd ~/Developer

$ bzr branch lp:stellarium stellarium

Screen Print 1

Screen Print 2

Step Notes Screen examples
4 We setup the build directory under the "stellarium" folder once it is downloaded.

$ cd stellarium
$ mkdir -p builds/macosx 

[ -p : the parameter will also create all directories leading up to the given directory that do not exist already. If the given directory already exists, ignore the error ]

$ cd builds/macosx [Example Screen 3]

If anything goes wrong in later steps we can delete the contents of macosx and start again at step 4.

5 Then we run cmake - No changes to CMakeLists.txt at this time.

$ cmake ../..


6 Then we run make to compile all the objects from the CMake files lists.

$ make


Step Notes Screen examples
8 To produce the final package that can run as a standalone application (delete or rename any previous build):

$ make install

$ make mac_app

The app package is built in macosx.

Build Log

Startup Log : Startup Error Log (if crash)

To repeat the process, return to step 2, our script does all this automatically.

Sample script.