This document describes how to configure and build erofs-utils from source.

See the README file in the top level directory about the brief overview of erofs-utils.

Dependencies & build

LZ4 1.9.3+ for LZ4(HC) enabled [^1].

XZ Utils 5.3.2alpha+ for LZMA enabled, XZ Utils 5.4+ highly recommended.

libfuse 2.6+ for erofsfuse enabled.

[^1]: It's not recommended to use LZ4 versions under 1.9.3 since unexpected crashes could make trouble to end users due to broken LZ4_compress_destSize() (fixed in v1.9.2), LZ4_compress_HC_destSize() or LZ4_decompress_safe_partial().

How to build with LZ4

To build, the following commands can be used in order:

$ ./autogen.sh
$ ./configure
$ make

mkfs.erofs, dump.erofs and fsck.erofs binaries will be generated under the corresponding folders.

How to build with liblzma

In order to enable LZMA support, build with the following commands:

$ ./configure --enable-lzma
$ make

Additionally, you could specify liblzma target paths with --with-liblzma-incdir and --with-liblzma-libdir manually.

How to build erofsfuse

It's disabled by default as an experimental feature for now due to the extra libfuse dependency, to enable and build it manually:

$ ./configure --enable-fuse
$ make

erofsfuse binary will be generated under fuse folder.

How to install erofs-utils manually

Use the following command to install erofs-utils binaries:

# make install

By default, make install will install all the files in /usr/local/bin, /usr/local/lib etc. You can specify an installation prefix other than /usr/local using --prefix, for instance --prefix=$HOME.