Chandra X-Ray Observatory
Skip to the navigation links
Last modified: 26 October 2016


Bugs: Building CIAO from Source

Table of Contents




pkg-config must be version 0.18 or newer

To find out the version on your system:

pkg-config --version

If it is older then 0.18 or is not installed, you can the pkg-config included with the CIAO OTS.

setenv PATH <location of ciao>/ciao-4.9/ots/bin:$PATH

This must be done before running configure.

Download the binary tarfiles to use the precompiled OTS

If you are building from source but wish to use the compiled OTS packaged with CIAO (e.g. the CIAO copy of Python), it is necessary to download both the source and binary files.



There are known problems building CIAO 4.8 on OSX. Building from source on OSX El Capitan, OSX 10.11, is not supported at this time. Users on older OSX systems (10.8, 10.9, 10.10) may contact the CXC Helpdesk who may be able to help.


The $ASCDS_INSTALL/INSTALL_SOURCE instructions that are included in the CIAO distribution may be incomplete or out of date. The most up to date instructions are located in the Rebuilding CIAO 4.9 source with pre-built OTS binaries on Linux and Rebuilding CIAO 4.9 source with pre-built OTS binaries on OS X threads.

Source builds with CIAO using OSX llvm

Newer versions XCode (> 4.2) have switched to using the 'llvm' compiler instead GNU's gcc. There are several incompatibilities in llvm that cause building CIAO to fail.

The llvm compilers have a GNU back compatiblitity mode that is enabled by set the compilers expliciity before running configure (or python

bash> export CC=/usr/bin/gcc
bash> export CXX=/usr/bin/g++ 


tcsh% setenv CC /usr/bin/gcc
tcsh% setenv CXX /usr/bin/g++

CIAO will not build on OSX using newer versions of GCC.

make or make install?

After running ./configure with the correct flags to setup for a source build users may, depending on the packages they downloaded, see a message about running make or make install. Users must run

unix% ./configure --with-fits --with-ascii ...etc...
unix% make install

Building sherpa using pre-compiled XSPEC library requires same version of gfortran

Users building sherpa from source with the CIAO pre-compiled binary OTS packages (recommended) may run into a problem that the version of FORTRAN used to build XSpec must be the same as is used to build sherpa.

Specifically this means that sherpa must be built to link against

Users may need to recompile the XSpec models library with the same version of gfortran.

Last modified: 26 October 2016
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.