Unix Support

Building, installing and running software

This course is part of the Scientific Computing series.

It is common for a student or researcher to find a piece of software or to have one thrust upon them by a supervisor which they must then build, install and use. It is a myth that any of this requires system privilege. This course demonstrates the building, installation and use of typical software ranging from trivially easy examples (the "configure, make, install" scheme) through to fairly complex Makefiles belonging to real world applications. Common errors and what they mean will be covered and explanations will be given on how to avoid them.

By the end of the course the student should be able to manage their own software without needing to pester their system administrator.

Course description

Afternoon one:

  • Location of software
  • Unpacking software
  • Importance of keeping records
  • The configure script
  • Running make with a configured Makefile
  • Installing software
  • Software dependencies
  • The pkg-config command

Afternoon two:

  • Working without the configure script
  • Compilation, linking and execution
  • Using make without a Makefile
  • make's built-in rules
  • make macros
  • Setting macros to the Makefile
  • Multi-file builds
  • Adding rules to the Makefile
  • Traditional targets
  • Using external libraries
  • Building libraries and using them

Afternoon three:

  • A real world Makefile
  • Recursive make
  • Multiple attempts
  • Understanding make error messages
  • Error codes
  • Building significant Makefiles from scratch
  • Wildcard syntax

Notes

The course notes for the “Building, installing and running software” course are available in various formats.

Day one Foils (PDF) Notes (PDF) Both (PDF) Source (ODP)
Day two Foils (PDF) Notes (PDF) Both (PDF) Source (ODP)
Day three Foils (PDF) Notes (PDF) Both (PDF) Source (ODP)
  • The course features a dummy lab book, available as either ODT or as PDF.
  • The appendix to the third day containing information on Unix signals is available separately as ODT or as PDF.
  • The directory containing all the example code, appearing as /ux/Lessons/Building in the course, is available as a gzipped tarball: Building.tgz (11MB).

The title of this document is: Building, installing and running software
URL: http://www-uxsup.csx.cam.ac.uk/courses/moved.Building/index.html