Closed jpy-luke closed 2 weeks ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
Fixed by PR #5937.
The systemd
dependency is now made optional, and put behind a feature flag (enabled by default on Linux).
flag systemd
description: Enable systemd support.
default: True
manual: True
For Linux systems that do not support systemd
, disable by configuring cabal with -f -systemd
.
This means, cardano-tracer
builds can now be configured exactly the same as cardano-node
builds wrt. systemd
.
Internal/External External
Area Other build dependencies
Summary
cardano-tracer
module assumes that Host OS Linux implicates the availability systemd-journal. Its cabal file does not obey the build configuration flagsystemd
like the cardano-node module's does. This results in dependency resolution failure on non-systemd build hosts. In addition this is present as a preprocessor macro switch in the module's Journal.hs source, failing the build even when the build configuration has been rectified to obey the systemd flag. Removing the relevant ifdef branches from the relevant source file the project build successfully and it works runtime with logMode FileMode.Steps to reproduce Steps to reproduce the behavior:
cabal build all
Expected behavior When the
flags: -systemd
is present in build configuration,cabal build all
should not fail dependency resolution or trigger attempting to build code paths using Systemd.Journal package. Alternatively systemd is declared as a hard dependency of the project and documented in project build instructions.System info (please complete the following information):
Screenshots and attachments
cardano-tracer/cardano-tracer.cabal
dependency:Error with aforementioned
cardano-tracer/src/Cardano/Tracer/Handlers/Logs/Journal.hs
problem source (truncated):Results naturally in
Additional context There seems to be previous work attempting to mitigate this problem in https://github.com/input-output-hk/cardano-node/blob/master/scripts/gen-cabal-nosystemd.sh and related PR https://github.com/input-output-hk/cardano-node/pull/1775 but this predates cardano-tracer and appears to not have followed the changes.
If trying to force systemd dependency is not a project goal, I can make a PR for evaluation for addressing this. Otherwise it should be documented as a requirement.