2 Configuring and installing GNU lightning

Here we will assume that your system already has the dependencies necessary to build GNU lightning. For more on dependencies, see GNU lightning’s README-hacking file.

The first thing to do to build GNU lightning is to configure the program, picking the set of macros to be used on the host architecture; this configuration is automatically performed by the configure shell script; to run it, merely type:

     ./configure

The configure accepts the --enable-disassembler option, hat enables linking to GNU binutils and optionally print human readable disassembly of the jit code. This option can be disabled by the --disable-disassembler option.

configure also accepts the --enable-devel-disassembler, option useful to check exactly hat machine instructions were generated for a GNU lightning instrction. Basically mixing jit_print and jit_disassembly.

The --enable-assertions option, which enables several consistency hecks in the run-time assemblers. These are not usually needed, so you can decide to simply forget about it; also remember that these consistency checks tend to slow down your code generator.

The --enable-devel-strong-type-checking option that does extra type checking using assert. This option also enables the --enable-assertions unless it is explicitly disabled.

The option --enable-devel-get-jit-size should only be used when doing updates or maintenance to lightning. It regenerates the jit_$ARCH]-sz.c creating a table or maximum bytes usage when translating a GNU lightning instruction to machine code.

After you’ve configured GNU lightning, run make as usual.

GNU lightning has an extensive set of tests to validate it is working correctly in the build host. To test it run:

    make check

The next important step is:

    make install

This ends the process of installing GNU lightning.