libgit2 0.27.0 FTB: ggit-config.c:298:41: error: too few arguments to function call
@ilovezfs
Submitted by ilovezfs Link to original bug (#794890)
Description
The build fails with libgit2 0.27.0 due to https://github.com/libgit2/libgit2/commit/529e873cef18ec98246d32d28c7a0b0e3467fe27 "config: pass repository when opening config files"
Full log https://gist.github.com/ilovezfs/4b68dd8af97fd5b3ac35124738b37cf6
I can work around it with the following patch:
diff --git a/libgit2-glib/ggit-config.c b/libgit2-glib/ggit-config.c index b6536ce..2785574 100644 --- a/libgit2-glib/ggit-config.c +++ b/libgit2-glib/ggit-config.c @@ -295,6 +295,7 @@ ggit_config_add_file (GgitConfig *config, ret = git_config_add_file_ondisk (_ggit_native_get (config), path, (git_config_level_t)level,
-
NULL, force); g_free (path);
The error is
[14/85] Compiling C object 'libgit2-glib/git2-glib-1.0@sha/ggit-commit-parents.c.o'. [15/85] Compiling C object 'libgit2-glib/git2-glib-1.0@sha/ggit-config-entry.c.o'. [16/85] Compiling C object 'libgit2-glib/git2-glib-1.0@sha/ggit-config.c.o'. FAILED: libgit2-glib/git2-glib-1.0@sha/ggit-config.c.o clang -Ilibgit2-glib/git2-glib-1.0@sha -Ilibgit2-glib -I../libgit2-glib -I. -I../ -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/glib/2.56.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libgit2/0.27.0/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -O2 -g -ffast-math -fstrict-aliasing -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Wcast-align -Wno-unused-local-typedefs -Werror=implicit -Werror=init-self -Werror=main -Werror=missing-braces -Werror=return-type -Werror=array-bounds -Werror=write-strings -DLIBGIT2_GLIB_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -D_REENTRANT -DGIT_SSH=1 '-DG_LOG_DOMAIN="Ggit"' -MD -MQ 'libgit2-glib/git2-glib-1.0@sha/ggit-config.c.o' -MF 'libgit2-glib/git2-glib-1.0@sha/ggit-config.c.o.d' -o 'libgit2-glib/git2-glib-1.0@sha/ggit-config.c.o' -c ../libgit2-glib/ggit-config.c ../libgit2-glib/ggit-config.c:298:41: error: too few arguments to function call, expected 5, have 4 force); ^ /usr/local/Cellar/libgit2/0.27.0/include/git2/config.h:208:1: note: 'git_config_add_file_ondisk' declared here GIT_EXTERN(int) git_config_add_file_ondisk( ^ /usr/local/Cellar/libgit2/0.27.0/include/git2/common.h:42:27: note: expanded from macro 'GIT_EXTERN'
define GIT_EXTERN(type) extern \
^
1 error generated. [17/85] Compiling C object 'libgit2-glib/git2-glib-1.0@sha/ggit-cred-plaintext.c.o'. [18/85] Compiling C object 'libgit2-glib/git2-glib-1.0@sha/ggit-cred.c.o'. [19/85] Compiling C object 'libgit2-glib/git2-glib-1.0@sha/ggit-index-entry.c.o'. [20/85] Generating ggit-enum-types.c with a meson_exe.py custom command. [21/85] Compiling C object 'libgit2-glib/git2-glib-1.0@sha/ggit-diff.c.o'. ninja: build stopped: subcommand failed.
Version: 3.26.x
Resolution: RESOLVED OBSOLETE