1PREREQUISITES 2------------- 3 4In order to build CFEngine you need the following tools and libraries installed: 5 6* C compiler supporting C90 + selected C99 constructs: 7 - _Bool type 8 - anonymous aggregates "(MyType) { .foo = 1, .bar = 2 }" 9 - declarations in "for" loop 10 - named initializers 11 - uintmax_t and corresponding printf/scanf formats 12 The following compilers are known to work: 13 - gcc >= 3.0 14 - clang >= 2.6 15* GNU make 16 17* PAM library 18* OpenSSL library 19* PCRE library 20* POSIX threads (pthreads) library, if not provided by the operating system 21* Latest available LMDB (Lightning Memory-mapped DataBase), Tokyo Cabinet or QDBM 22 23* MySQL client library (optional) 24* PostgreSQL client library (optional) 25* libacl library (optional) 26 27In order to build CFEngine cloned from git, you will need the 28following additional tools: 29 30* GNU Automake >= 1.10.1 31* GNU Autoconf >= 2.60 32* GNU Libtool >= 1.5.24 33* Yacc (note: GNU Bison 2.4.2 has troubles invoking m4) 34* Lex 35 36Latest stable versions of the tools and libraries are generally advised. 37 38See INSTALL DEPENDENCIES below for example of deps for various systems. 39 40OPERATING SYSTEMS 41----------------- 42 43CFEngine is regularly built and tested on the following operating systems: 44 45* GNU/Linux (many distributions) 46* Solaris 47* Windows with MinGW 48 49HARDWARE PLATFORMS 50------------------ 51 52CFEngine is regularly built and tested on the following CPU architectures: 53 54* x86 55* x86-64 56* SPARC 57 58OTHER CONFIGURATIONS 59-------------------- 60 61In case you have successfully compiled CFEngine on a different OS and/or using 62different tools or versions of tools, please report it to help-cfengine@ mailing 63list[1]. Please consider running a testsuite (see below), and posting results to 64mailing list too. 65 66[1] https://groups.google.com/forum/#!forum/help-cfengine 67 68BUILD INSTRUCTIONS 69------------------ 70 71From tarball: 72 73$ ./configure [configure options] 74$ make [-jN] 75 76From git checkout: 77 78$ ./autogen.sh [configure options] 79$ make [-jN] 80 81See the available configure options: 82 83$ ./configure --help 84or 85$ ./autogen.sh --help 86 87INSTALLATION INSTRUCTIONS 88------------------------- 89 90CFEngine might be installed in two configurations: 91 92 * (default) Native CFEngine file layout. Everything is installed in 93 /var/cfengine, laid out as a "secondary FHS root". This layout is designed to 94 keep CFEngine running even if most of the system is broken (e.g. /usr is not 95 mounted due to NFS breakage). 96 97* FHS file layout, enabled by --enable-fhs. This layout follows FHS 2.3. 98 99After the build process has completed (see BUILD INSTRUCTIONS above), type: 100 101$ make install 102 103RUNNING TESTSUITE 104----------------- 105 106Please refer to the instructions in tests/README file. 107 108INSTALL DEPENDENCIES 109-------------------- 110 111Here we have examples of command lines for various systems to install dependencies 112needed to build. The version and date checked are noted in parenthesis. Please 113submit PRs with updates to this information. 114 115* CentOS (centos7 2021-07-02) 116 117Note that first you will need to install epel-release (https://fedoraproject.org/wiki/EPEL) for lmdb-devel to be available. 118 119# yum install -y gcc gdb make git libtool autoconf automake byacc flex openssl-devel pcre-devel lmdb-devel pam-devel flex-devel yaml-devel 120 121* Debian (Raspbian 10 2021-07-02) 122 123# apt-get install -y build-essential git libtool autoconf automake bison flex libssl-dev libpcre3-dev libbison-dev libacl1 libacl1-dev lmdb-utils liblmdb-dev libpam0g-dev libtool libyaml-dev 124 125* FreeBSD (12.1 2020-04-07) 126 127See docs/BSD.md 128 129* SUSE (Tumbleweed 2020-02-02) 130 131# zypper install gdb gcc make lmdb autoconf automake libtool git python3 pcre-devel libopenssl-devel pam-devel 132 133* AlpineOS (3.11.3 x86_64 2020-04-13) 134 135# apk add alpine-sdk lmdb-dev openssl-dev bison flex-dev acl-dev pcre-dev autoconf automake libtool git python3 gdb 136# ./autogen.sh --without-pam 137 138* Termux (2020-04-24) 139 140# pkg install build-essential git autoconf automake bison flex liblmdb openssl pcre libacl libyaml 141# ./autogen.sh --without-pam 142