Build instructions for the Apache Lucy C library

Clownfish dependency

IMPORTANT: The Apache Lucy C library depends on the Clownfish object system which must be built first. Please read this section, or your build will probably FAIL.

Lucy needs the following Clownfish components:

  • The command-line Clownfish compiler ‘cfc’.
  • The Clownfish header files of the Clownfish runtime.
  • The ‘libcfish’ shared library.

If you installed Clownfish to /usr/local or /usr on UNIX, no further action should be required. If you installed Clownfish to an alternate location, make sure to use the --clownfish-prefix configure option:

./configure --clownfish-prefix=[clownfish-install-dir]

It's also possible to build Lucy with an uninstalled Clownfish build from the Clownfish source directory. To setup the required environment variables, source the file devel/bin/ from the Clownfish source tree:

source [path_to_clownfish]/devel/bin/

Or, if you're on the Windows shell:


Building under UNIX and derivatives or Cygwin

./configure --prefix [install-prefix]
make test
make install

Building under Windows

You need MSVC or gcc as C compiler and nmake, mingw32-make, or standard GNU make as make utility. When building under cmd.exe, configure with:

configure.bat --prefix [install-prefix]


[environment] ./configure [options] [-- [cflags]]



Enable code coverage. Create HTML pages with coverage data using lcov by running “make coverage”.


Specify an alternative location for Clownfish if it isn't installed in a system directory.

Environment variables


The C compiler.


The target compiler when cross-compiling. CC can be set in addition to specify the host compiler.