Btrfs progs v4.10.2
[btrfs-progs-unstable/devel.git] / INSTALL
blob0465fb02aeeece641c674197a5af51c2b66af9b0
1 Installation instructions
2 =========================
4 The Btrfs utility programs require the following libraries/tools to build:
6 - libuuid - provided by util-linux, e2fsprogs/e2fslibs or libuuid
7 - libblkid - block device id library
8 - liblzo2 - LZO data compression library
9 - zlib - ZLIB data compression library
11 For the btrfs-convert utility:
13 - e2fsprogs - ext2/ext3/ext4 file system libraries, or called e2fslibs
15 Generating documentation:
17 - asciidoc - text document format tool
18 - xmlto - text document format tool
20 XATTR library should be provided by the standard C library or by
22 - libattr - extended attribute library
24 Please note that the package names may differ according to the distribution.
25 See https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories#Dependencies .
28 Building from sources
29 ---------------------
31 To build from git sources you need to generate the configure script using the
32 autotools:
34     $ ./autogen.sh
36 To build from the released tarballs:
38     $ ./configure
39     $ make
40     $ make install
42 You may disable building some parts like documentation, btrfs-convert or
43 backtrace support. See ./configure --help for more.
45 Specific CFLAGS or LDFLAGS should be set like
47     $ CFLAGS=... LDFLAGS=... ./configure --prefix=/usr
49 and not as arguments to make. You can specify additional flags to build via
50 variables EXTRA_CFLAGS and EXTRA_LDFLAGS that get appended to the predefined
51 values of the respective variables. There are further build tuning options
52 documented in the Makefile.
54     $ make EXTRA_CFLAGS=-ggdb3
56 The build utilizes autotools, dependencies for generating the configure
57 scripts are:
59 * autconf, autoheader
60 * automake, aclocal
61 * pkg-config
64 Statically built binaries
65 -------------------------
67 The makefiles are ready to let you build static binaries of the utilities. This
68 may be handy in rescue environments. Your system has to provide static version
69 of the libraries.
71     $ make static
72     $ make btrfs.static
73     $ make btrfs-convert.static
75 The resulting binaries have the '.static' suffix, the intermediate object
76 files do not conflict with the normal (dynamic) build.
79 References:
80 * https://btrfs.wiki.kernel.org