Compile From Source
If looking for old instructions for 0.7.0 version or older,
follow the old instructions.
rifiuti2 switched over to CMake since 0.8.0.
For the impatient
$ tar -Jxf rifiuti2-0.8.0-Source.tar.xz # or do git checkout
$ cmake -S rifiuti2-0.8.0 -B _build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
$ cmake --build _build
$ cd _build && ctest -T test --progress; cd ..
$ cmake --install _build --prefix <somewhere> # for packagersCompile Requirements
-
cmake≥ 3.17 -
ninja(good oldmakeshould work too ifcmakeis not usingNinjagenerator, but not rigorously tested) -
glib≥ 2.40 (deveopment headers and libraries) -
pkgconf(some Linux might only have the obsoletepkg-config) - C compiler — both
gccandclangare tested - (Solaris only)
iconv/extrapackage - (optional)
xmllintutility fromlibxml2is used for some tests
On Windows
Only MSYS2 is supported; rifiuti2 doesn't build with
Visual Studio yet. It is easiest to install all requirements with
following command, once you obtain a MSYS2 shell of
desired environment:
$ pacboy -S toolchain:p glib2:p cmake:p libxml2:pDistributed Windows binaries are built under MINGW32 and UCRT64
MSYS2 environments.
Build Procedure
-
Extract source archive, or use a
gitcheckout folder directly if you are feeling brave. -
Configure step: out-of-tree build is the standard recommanded practice for
cmake. The TL;DR procedure on top of document uses folder named_buildoutside source tree to place all built content. Various config can be changed in this step.- Say if one wants to use non-default compiler (default is
ccfound in path), add-D CMAKE_C_COMPILER=/path/to/compiler - Default build type is
RelWithDebInfo. One can change it to-D CMAKE_BUILD_TYPE=Debugfor a debug build, for example.
- Say if one wants to use non-default compiler (default is
-
Build step:
cmake --build _buildcreates all executables under_buildfolder. The programs are now ready for use. -
Test step: though not strictly necessary, it is recommended to perform this step to ensure safety. Note that
ctestmust be executed inside build folder.
rifiuti2 can be used immediately without installing.
If compile or test step fails, please report problem, describing your OS and compile environment, and attach relevant testsuite log file(s) if needed.