Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 927383

Summary: dev-libs/libgit2-glib-1.2.0: error: implicit declaration of function ‘git_error_set_str’ with libgit2-1.8.0
Product: Gentoo Linux Reporter: Dmitriy Baranov <reagentoo>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: UNCONFIRMED ---    
Severity: normal CC: gnome, ionen, leonchik1976, poncho, reagentoo
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/40
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: build log
emerge --info
patch from arch linux to support libgit-1.8

Description Dmitriy Baranov 2024-03-21 08:14:05 UTC
../libgit2-glib-1.2.0/libgit2-glib/ggit-clone-options.c: In function ‘create_repository_wrapper’:
../libgit2-glib-1.2.0/libgit2-glib/ggit-clone-options.c:153:17: error: implicit declaration of function ‘git_error_set_str’; did you mean ‘giterr_set_str’? [-Werror=implicit-function-declaration]
  153 |                 git_error_set_str (GIT_ERROR, error->message);
      |                 ^~~~~~~~~~~~~~~~~
      |                 giterr_set_str

Reproducible: Always
Comment 1 Dmitriy Baranov 2024-03-21 08:19:48 UTC
Created attachment 888027 [details]
build log
Comment 2 Dmitriy Baranov 2024-03-21 08:20:08 UTC
Created attachment 888028 [details]
emerge --info
Comment 3 Ionen Wolkens gentoo-dev 2024-03-21 08:48:01 UTC
Seems git_error_set_str was moved to git2/sys/errors.h in [1] which is not included by the main git2.h that I can see?

Kind of sound(?) like this is an issue with libgit2-1.8.0 given don't think packages are supposed to include anything but git2.h directly (not that I really know libgit2 usage, maybe not supposed to use that function at all).

giterr_set_str still exists but that's the deprecated alias available through deprecated.h (and that one is included)

Regardless of that, there's still the static assert that fails which may indicate it needs updates for 1.8.0 regardless (it does "build" if skip the assert and include git2/sys/errors.h fwiw, but that sounds wrong and there are incompatible pointer types warnings).

[1] https://github.com/libgit2/libgit2/commit/f78ae89bf
Comment 4 Larry the Git Cow gentoo-dev 2024-03-21 09:24:28 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fe93666488fa45b99074f546edd1dc3c8c798c9

commit 6fe93666488fa45b99074f546edd1dc3c8c798c9
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-03-21 09:16:23 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-03-21 09:23:37 +0000

    dev-libs/libgit2-glib: limit to <libgit2-1.8.0 for now
    
    Just as a quick workaround until maintainer(s) have time.
    
    No need for a revbump given binding operator will cause it
    to recheck dependencies when attempting rebuild.
    
    Bug: https://bugs.gentoo.org/927383
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-libs/libgit2-glib/libgit2-glib-1.2.0.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 5 poncho 2024-07-06 08:05:06 UTC
Created attachment 897158 [details, diff]
patch from arch linux to support libgit-1.8

Patch from https://gitlab.archlinux.org/archlinux/packaging/packages/libgit2-glib/-/blob/main/libgit2-glib-1.2.0-libgit2_1.8.patch

Tested in my local overlay and seems to work with dev-vcs/gitg

Resolves the blocker when doing a system update after libgit2-1.8.1 went stable in https://bugs.gentoo.org/934326
Comment 6 poncho 2024-07-06 08:07:54 UTC
https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/40

And this is the upstream pull request