-
Notifications
You must be signed in to change notification settings - Fork 3.5k
build from source fails on cachyos #589
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingeditor/integrationEditor compatibility and CLI integrationEditor compatibility and CLI integrationpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingeditor/integrationEditor compatibility and CLI integrationEditor compatibility and CLI integrationpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
Version
codebase-memory-mcp dev
Platform
Linux (x64)
Install channel
Built from source
Binary variant
standard
What happened, and what did you expect?
clone repo, run scripts/build.sh
got build errors
some related to -Werror=discarded-qualifiers
some related to a missing include needed for recent libgit
gcc (GCC) 16.1.1 20260430
pkg-config --modversion libgit2 1.9.4
I think it is, because gcc 16.1.1 is picky about discarded qualifiers by default.
these changes let it build
❯ git diff
diff --git a/internal/cbm/cbm.c b/internal/cbm/cbm.c
index d611f18..81bc99d 100644
--- a/internal/cbm/cbm.c
+++ b/internal/cbm/cbm.c
@@ -21,6 +21,7 @@
#include "sqlite3.h" // sqlite3_mem_methods, sqlite3_config, SQLITE_CONFIG_MALLOC — bind sqlite to mimalloc
#if defined(HAVE_LIBGIT2)
#include <git2.h> // git_allocator, git_libgit2_opts, GIT_OPT_SET_ALLOCATOR — bind libgit2 to mimalloc
+#include <git2/sys/alloc.h>
#endif
#endif
#include <stdint.h> // uint32_t, uint64_t, int64_t
diff --git a/src/cli/cli.c b/src/cli/cli.c
index 4228dba..8219da6 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -1457,12 +1457,12 @@ int cbm_remove_codex_mcp(const char config_path) {
/ Splice out an existing [CODEX_HOOK_BEGIN .. CODEX_HOOK_END] block (inclusive,
-static char *codex_hook_strip(const char *content) {
+static char *codex_hook_strip(const char *content) {
if (!begin) {
return NULL;
}
Reproduction
reproducible on vanilla cachyos, just clone the repo and try to build.
Logs
Project scale (if relevant)
No response
Confirmations