Cairo is a 2D graphics library with support for multiple output devices. It is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available.

Availability and Restrictions


The following versions of Cairo are available on OSC clusters:

1.12.18 X(GI)
1.14.2  X(GI)*
* Current default version; G = available with gnu; I =  available with intel
* On Owens, there is the system installation of Cairo. You can access it without the module loads. 

You can use  module spider cairo  to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.


Cairo is available to all OSC users without restriction.

Publisher/Vendor/Repository and License Type, Open source


Usage on Oakley


To configure your environment for use of Cairo, run the following command:  module load cairo . The default version will be loaded. To select a particular Cairo version, use  module load cairo/version . For example, use module load cairo/1.14.2  to load Cairo 1.14.2.

Building with Cairo

The Cairo library provides the following variables for use at build time:

Variable Use
$CAIRO_CFLAGS Use during your compilation step for programs
$CAIRO_LIBS Use during your linking step programs


For example, to build the code myprog.c with the Cairo library you would use:

icc -o myprog myprog.c $CAIRO_LIBS $CAIRO_CFLAGS

Further Reading

Fields of Science: