Fail-Safe C: Compilation


Source-code Compilation

Prerequisite

To compile Fail-Safe C compiler, the following components are required:

  • Objective Caml: version 3.09 or later.
    • Version 3.10 or later is preferable.
    • Version 3.11.0 or later is recommended on ARM architecture.
    • findlib: 1.1 or later.
    • extlib: 1.5 or later.
  • Gnu C Compiler (gcc): version 4.1 or later.
  • GNU binutils: 2.15 or later.
  • Bohem’s GC library: version 6.0 or later.
  • Perl: 5.8 or later.

Under Debian GNU/Linux version 4.0 (etch), most of those software can be installed using standard package systems. The name of the packages are:

  • ocaml-nox (or ocaml), ocaml-native-compilers, ocaml-findlib, libextlib-ocaml-dev.
    • In lenny or later, camlp4 package is also required.
    • ocaml-native-compiler package is not required if it is unavailable on the host architecture.
  • gcc-3.4.
  • binutils.
  • libgc-dev.
  • libgdbm-dev (for standard library).
  • perl.

Compilation

After downloaded the source code, invoke ”./configure” and ”make” commands at the top of the downloaded directory.

The script ”driver/fscc” in the downloaded source file is the main driver of the Fail-Safe C system.

You can install it to the system directory using ”make intstall” command (by default, it will be installed as /usr/local/bin/fscc).

Alternatively, you can directly invoke the drier script inside the compiled source tree.

Once compilation is succeed, proceed to the usage page.