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

Unable to build latest main commit #174

Open
dhasial opened this issue Jul 8, 2024 · 2 comments
Open

Unable to build latest main commit #174

dhasial opened this issue Jul 8, 2024 · 2 comments

Comments

@dhasial
Copy link

dhasial commented Jul 8, 2024

It fails with the same error on both the oomd (0.5.0-1) and oomd-git (v0.5.0.r6.g7ccc7035-1) AUR packages, as well as trying to build from source (commit 4ca0347). It specifically seems to be an issue with the writeMemReclaimAt function.

meson-log.txt
terminal output

@cstaylor
Copy link

cstaylor commented Oct 3, 2024

This patch let me finish compiling:

diff --git a/src/oomd/plugins/Senpai.cpp b/src/oomd/plugins/Senpai.cpp
index aac06f3..ac68020 100644
--- a/src/oomd/plugins/Senpai.cpp
+++ b/src/oomd/plugins/Senpai.cpp
@@ -320,7 +320,7 @@ bool Senpai::resetMemhigh(const CgroupContext& cgroup_ctx) {
 bool Senpai::reclaim(const CgroupContext& cgroup_ctx, int64_t size) {
   auto has_memory_reclaim_opt = hasMemoryReclaim(cgroup_ctx);
   if (has_memory_reclaim_opt && *has_memory_reclaim_opt) {
-    return (bool)Fs::writeMemReclaimAt(cgroup_ctx.fd(), size);
+    return (bool)Fs::writeMemReclaimAt(cgroup_ctx.fd(), size, std::nullopt);
   }

@LtdJorge
Copy link

This patch let me finish compiling:

diff --git a/src/oomd/plugins/Senpai.cpp b/src/oomd/plugins/Senpai.cpp
index aac06f3..ac68020 100644
--- a/src/oomd/plugins/Senpai.cpp
+++ b/src/oomd/plugins/Senpai.cpp
@@ -320,7 +320,7 @@ bool Senpai::resetMemhigh(const CgroupContext& cgroup_ctx) {
 bool Senpai::reclaim(const CgroupContext& cgroup_ctx, int64_t size) {
   auto has_memory_reclaim_opt = hasMemoryReclaim(cgroup_ctx);
   if (has_memory_reclaim_opt && *has_memory_reclaim_opt) {
-    return (bool)Fs::writeMemReclaimAt(cgroup_ctx.fd(), size);
+    return (bool)Fs::writeMemReclaimAt(cgroup_ctx.fd(), size, std::nullopt);
   }

I was going to open an issue just for that. Thanks!

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

3 participants