Bug 254475 - [GLib] Build system does not gracefully fallback to libelogind
Summary: [GLib] Build system does not gracefully fallback to libelogind
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-25 19:49 PDT by apteryx
Modified: 2023-03-27 11:17 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description apteryx 2023-03-25 19:49:39 PDT
Hello,

When using elogind instead of systemd, the build fails because FindJournald.cmake looks for pkg_check_modules(PC_SYSTEMD QUIET libsystemd) but the pkg-config file of elogind is called libelogind.pc.

There should be a fallback implemented like so:

pkg_check_modules(PC_SYSTEMD QUIET libsystemd libelogind)
if (NOT PC_SYSTEMD_FOUND)
    pkg_check_modules(PC_SYSTEMD QUIET libelogind)
endif()

I'll send a patch if I remember the process :-).

Thank you!
Comment 1 apteryx 2023-03-25 19:53:04 PDT
I meant:

pkg_check_modules(PC_SYSTEMD QUIET libsystemd)
if (NOT PC_SYSTEMD_FOUND)
    pkg_check_modules(PC_SYSTEMD QUIET libelogind)
endif()
Comment 2 apteryx 2023-03-26 19:04:32 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11989
Comment 3 EWS 2023-03-27 11:17:37 PDT
Committed 262163@main (f2566d6ee880): <https://commits.webkit.org/262163@main>

Reviewed commits have been landed. Closing PR #11989 and removing active labels.