$treeview $search $mathjax $extrastylesheet
librsync
2.0.2
$projectbrief
|
$projectbrief
|
$searchbox |
00001 # Installing librsync {#page_install} 00002 00003 ## Requirements 00004 00005 To build librsync you will need: 00006 00007 * A C compiler and appropriate headers and libraries 00008 00009 * [CMake] 00010 00011 * Some build tool supported by CMake: [Make] is most common, 00012 [Ninja] is nicer. 00013 00014 * [popt] command line parsing library 00015 00016 * [Doxygen] - optional, to build docs 00017 00018 [popt]: http://rpm5.org/files/popt/ 00019 [CMake]: http://cmake.org/ 00020 [Doxygen]: https://www.stack.nl/~dimitri/doxygen 00021 [Ninja]: http://build-ninja.org 00022 [Make]: https://www.gnu.org/software/make/ 00023 00024 ## Building 00025 00026 Generate the Makefile by running 00027 00028 $ cmake . 00029 00030 After building you can install `rdiff` and `librsync` for system-wide use. 00031 00032 $ make 00033 00034 To build and run the tests: 00035 00036 $ make check 00037 00038 To install: 00039 00040 $ sudo make install 00041 00042 To build the documentation: 00043 00044 $ make doc 00045 00046 librsync should be widely portable. Patches to fix portability bugs are 00047 welcome. 00048 00049 If you are using GNU libc, you might like to use 00050 00051 MALLOC_CHECK_=2 ./rdiff 00052 00053 to detect some allocation bugs. 00054 00055 librsync has annotations for the SPLINT static checking tool. 00056 00057 00058 ## Build options 00059 00060 The build is customizable by using CMake options in the configure step: 00061 00062 $ cmake -D <option-name>=<value> . 00063 00064 If you are interested in building only the `librsync` target, you can skip 00065 the `rdiff` build. In this way you don't need its dependencies (e.g. `popt`). 00066 To do that, set the `BUILD_RDIFF` option to `OFF`: 00067 00068 $ cmake -D BUILD_RDIFF=OFF . 00069 00070 Be aware that many tests depend on `rdiff` executable, so when it is disabled, 00071 also those tests are. 00072 00073 Compression support is under development (see 00074 [#8](https://github.com/librsync/librsync/issues/8)). It is so disabled by 00075 default. You can turn it on by using `ENABLE_COMPRESSION` option: 00076 00077 $ cmake -D ENABLE_COMPRESSION=ON . 00078 00079 To build code for debug trace messages: 00080 00081 $ cmake -D ENABLE_TRACE=ON . 00082 00083 ## Ninja builds 00084 00085 CMake generates input files for an underlying build tool that will actually do 00086 the build. Typically this is Make, but others are supported. In particular 00087 [Ninja] is a nice alternative. To use it: 00088 00089 $ cmake -G Ninja . 00090 $ ninja check 00091 00092 00093 ## Cygwin 00094 00095 With Cygwin you can build using gcc as under a normal unix system. It 00096 is also possible to compile under Cygwin using MSVC++. You must have 00097 environment variables needed by MSVC set using the Vcvars32.bat 00098 script.