Skip to content

meson: Add build-lsfd option and make rt dependency optional #2941

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

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

jwillikers
Copy link
Contributor

Same as #2879 but for the stable/v2.40 branch.

@github-actions github-actions bot added the STABLE Backport from the main branch to the next stable release. label Apr 9, 2024
A dependency on the rt library is unnecessarily required when checking
for the clock_gettime and timer_create functions.
This causes the build to fail if the rt library is not found.
This should not fail the build as rt is only required for the checks.
Additionally, the lsfd executable and some tests require rt.
There is currently no option to toggle building lsfd.

This PR makes it possible to build without the rt library.
Function checks no longer require rt for the build.
The function checks for the rt library only run when rt is available.
This PR adds an option to allow building without lsfd.
This makes it possible to build without the executable that requires rt.
To not require rt for the test, a additional check has been added.
The effected tests won't be built unless rt has been found.

Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit 06b2705)
Require the rt library for the build-lsfd feature.

Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit 2439502)
@jwillikers jwillikers force-pushed the stable-meson-optional-rt branch from a1b444c to 712e927 Compare April 9, 2024 21:58
@karelzak karelzak merged commit 013c366 into util-linux:stable/v2.40 Apr 15, 2024
23 checks passed
@jwillikers jwillikers deleted the stable-meson-optional-rt branch April 15, 2024 12:05
jwillikers added a commit to jwillikers/util-linux that referenced this pull request Apr 16, 2024
The cherry-pick of util-linux#2879 in PR util-linux#2941 to the stable/v2.40 branch didn't
include the removal of mq_libs like it should have.
I must have resolved a conflict incorrectly in the cherry-pick.
This just removes the lingering definitions which are no longer used.
The extra find_library call for rt is a problem.

Signed-off-by: Jordan Williams <jordan@jwillikers.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STABLE Backport from the main branch to the next stable release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants