Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is systemd a hard dependency? #4

Open
DidierSpaier opened this issue Jul 13, 2023 · 2 comments
Open

Is systemd a hard dependency? #4

DidierSpaier opened this issue Jul 13, 2023 · 2 comments

Comments

@DidierSpaier
Copy link

From the Slint maintainer:

Hi,

I built it in a Slint system, typing from the root of the cloned directory:
cargo fetch --locked --target "x86_64-unknown-linux-gnu"
cargo build --release --frozen

So far, so good. Then from target/release:

didier[release]$ ./pod-kast
thread 'main' panicked at 'called Result::unwrap() on an Err value:
SdError("failed to print to journal at '/run/systemd/journal/socket': libsystemd
error: No such file or directory (os error 2)")',
/home/didier/.cargo/registry/src/github.com-1ecc6299db9ec823/systemd-journal-logger-0.3.1/src/lib.rs:309:56
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Then:
didier[release]$ RUST_BACKTRACE=1 ./pod-kast
thread 'main' panicked at 'called Result::unwrap() on an Err value:
SdError("failed to print to journal at '/run/systemd/journal/socket': libsystemd
error: No such file or directory (os error 2)")',
/home/didier/.cargo/registry/src/github.com-1ecc6299db9ec823/systemd-journal-logger-0.3.1/src/lib.rs:309:56
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: <systemd_journal_logger::JournalLog<K,V> as log::Log>::log
4: log::__private_api_log
5: pod_kast::main
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose
backtrace.

Does this mean that that libsystemd is a hard dependency? If that's case I won't
be able to provide it for Slint.

@mlytle4218
Copy link
Owner

Hello Didier,

It's not. Its configured for syslog as the default. I've been leaning toward making it not the default.

you'll need to check something. I haven't run quite the way you have before. I am relying on the cargo deb to create a deb file. That deb installation process makes a .pod-kast folder in the home folder of the user installing it. If you have that folder and there is a config file in it (pod-kast-config), there is a section with logging_type = "syslog". If you misspell syslog at all, it won't use syslog anymore but start rolling log files in .pod-kast/logs/ which uses a different library, and won't panic if it doesn't find systemd.

Marc

@DidierSpaier
Copy link
Author

Hello Marc,

thanks, that did the trick.

As an side, instructions to build this software, as much distribution-agnostic as possible, would help to package it for several distributions. This being said I will try to package it for Slint in the coming days.

Didier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants