From: Oto Šťáva Date: Thu, 16 May 2024 10:02:46 +0000 (+0200) Subject: doc/dev: update building from sources X-Git-Tag: v6.0.12~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcf9cac9794d7db56557d23d77c18a72b1276e72;p=thirdparty%2Fknot-resolver.git doc/dev: update building from sources Removed some outdated stuff. --- diff --git a/doc/dev/build.rst b/doc/dev/build.rst index d3d87dce9..d621abb39 100644 --- a/doc/dev/build.rst +++ b/doc/dev/build.rst @@ -6,8 +6,8 @@ Cloning the repository ********************** -.. note:: Maybe you do not need to build from source? - See `<../gettingstarted-install.html>`_. +.. note:: Latest up-to-date packages for various distributions can be obtained + from web ``_. Knot Resolver is written for UNIX-like systems using modern C standards. Beware that some 64-bit systems with LuaJIT 2.1 may be affected by @@ -78,7 +78,9 @@ Dependencies ============ .. note:: This section lists basic requirements. Individual modules - might have additional build or runtime dependencies. + might have additional build or runtime dependencies. You may also use ``apkg + build-dep`` from the above section to install the dependencies, then build + Knot Resolver manually using Meson. The following dependencies are needed to build and run Knot Resolver with core functions: @@ -98,8 +100,6 @@ The following dependencies are needed to build and run Knot Resolver with core f There are also *optional* packages that enable specific functionality in Knot Resolver: -.. TODO cqueues is really used on multiple places, sometimes indirectly - .. csv-table:: :header: "Optional", "Needed for", "Notes" @@ -113,22 +113,22 @@ Resolver: "cmocka_", "``unit tests``", "Unit testing framework." "dnsdist_", "``proxyv2 test``", "DNS proxy server" "Doxygen_", "``documentation``", "Generating API documentation." - "Sphinx_, sphinx-tabs_ and sphinx_rtd_theme_", "``documentation``", "Building this - documentation." + "Sphinx_, sphinx-tabs_, and sphinx_rtd_theme_", "``documentation``", "Building this documentation." "breathe_", "``documentation``", "Exposing Doxygen API doc to Sphinx." - "libprotobuf_ 3.0+", "``modules/dnstap``", "Protocol Buffers support for - dnstap_." + "libprotobuf_ 3.0+", "``modules/dnstap``", "Protocol Buffers support for dnstap_." "`libprotobuf-c`_ 1.0+", "``modules/dnstap``", "C bindings for Protobuf." - "libfstrm_ 0.2+", "``modules/dnstap``", "Frame Streams data transport - protocol." + "libfstrm_ 0.2+", "``modules/dnstap``", "Frame Streams data transport protocol." "luacheck_", "``lint-lua``", "Syntax and static analysis checker for Lua." "`clang-tidy`_", "``lint-c``", "Syntax and static analysis checker for C." "luacov_", "``check-config``", "Code coverage analysis for Lua modules." .. [#] If ``meson >= 0.49`` isn't available for your distro, check backports - repository or use python pip to install it. -.. [#] We test GCC and Clang. We depend on GNU extensions to the C standard, - in particular ``__attribute__((cleanup))``. + repository or use python pipx to install it. +.. [#] Requires ``__attribute__((cleanup))`` and ``-MMD -MP`` for + dependency file generation. We test GCC and Clang, and ICC is likely to work as well. +.. [#] You can use variables ``_CFLAGS`` and ``_LIBS`` + to configure dependencies manually (i.e. ``libknot_CFLAGS`` and + ``libknot_LIBS``). On reasonably new systems most of the dependencies can be resolved from packages. ``apkg build-dep`` is one option of obtaining them (see above). @@ -146,18 +146,16 @@ https://www.knot-dns.cz/download/ Compilation =========== -Folowing meson command creates new build directory named ``build_dir``, configures installation path to ``/tmp/kr`` and enables static build (to allow installation to non-standard path). -You can also configure some :ref:`build-options`, in this case enable ``manager``, which is disabled by default. +The following meson command creates a new build directory named ``build_dir`` and configures the installation path to ``/tmp/kr``. .. code-block:: bash - $ meson build_dir --prefix=/tmp/kr + $ meson setup build_dir --prefix=/tmp/kr After that it is possible to build and install Knot Resolver. .. code-block:: bash - $ meson setup build_dir --prefix=/tmp/kr --default-library=static $ ninja -C build_dir # install Knot Resolver into the previously configured '/tmp/kr' path @@ -294,8 +292,9 @@ its parent directories are writable by kresd process (after package installation Installing the manager from source ********************************** -Additional dependencies are needed to run Knot Resolver with the ``manager``. -All dependencies are also listed in `pyproject.toml `_ which is our authoritative source. +Additional dependencies are needed to build and run Knot Resolver with the ``manager``. +All dependencies are also listed in `pyproject.toml `_ which is our authoritative source. +Please note that starting with version 6, Knot Resolver is only officially supported in conjunction with ``manager``. .. csv-table:: :header: "Requirement", "Notes" @@ -307,6 +306,7 @@ All dependencies are also listed in `pyproject.toml