[libgit2] Compile issue on debian-unstable

Lubomir I. Ivanov neolit123 at gmail.com
Fri Feb 20 12:20:07 PST 2015


On 20 February 2015 at 20:51, Miika Turkia <miika.turkia at gmail.com> wrote:
> On Fri, Feb 20, 2015 at 8:17 PM, Willem Ferguson
> <willemferguson at zoology.up.ac.za> wrote:
>>
>> On 19/02/2015 07:02, Miika Turkia wrote:
>>>
>>>
>>>
>>> As supossed, I had a v0.20.0  version built from scratch overlaped with
>>> the debian package. Cleaned it and the macro worked fine as debian version
>>> (v0.21.3) has three parameters defined .
>>>
>>> I think the wrapper was set to support three parameters because v0.21 (at
>>> least the one packaged in debian) had only those 3 and fourth was introduced
>>> later.  But agree with you  3 completely different versions of the same
>>> library function in less than a  year is a mess  (saying it smooth and
>>> politely).
>>>
>> On Ubuntu Utopic (14.10) I also have the problem with only 1 parameter for
>> git_remote _fetch
>>
>> #define LIBGIT2_VERSION "0.20.0"
>>
>> I use the attached patch on my tree, but never sent it out as I have no
>> clue about how the libgit versioning/API works.
>>
>> miika
>>
>> I was away for two weeks and got out of touch with respect to the mess
>> with libgit2. I run Ubuntu 14.4 and the default version of libgit-dev is
>> V19.
>> Does the latest Subsurface master run with libgit2 V19? The first #if in
>> that file appears to provide for this
>>
>> #if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR <= 20
>>
>> but I get make errors as discussed previously on this forum. Upon
>> applying Miika's patch (above, to git-access.c), I get the following:
>>
>> .obj/git-access.o: In function `is_git_repository':
>> git-access.c:(.text+0x327): undefined reference to `git_remote_fetch'
>
>
> Looks like this function was introduced on 0.20.0.
> https://libgit2.github.com/libgit2/#HEAD/group/remote/git_remote_fetch
>
>>
>> Is there a sane solution for Debian/Ubuntu?
>
>
> Try the attached patch. At least it should allow you to compile again.
>

patch looks good to me,
git_remote_fetch() replaced with 1 should work fine for 0.19 as long
as the error is non-fatal (as the usage comment suggests).

ACK.

but while it builds i don't really understand the impact of the
function always failing.
in that sense, perhaps we *shouldn't* really support 0.19 and users
should always update instead...probably best to do so, as when we add
more features it will become more and more broken for older versions
such as 0.19!

lubomir
--


More information about the subsurface mailing list