Re: [gitg] Problem to compile libgit2-glib-0.0.10



It doesn't look like you actually downloaded the v0.20.0 release. When I download it I find in refs.h:

GIT_EXTERN(int) git_reference_has_log(git_reference *ref);

Also, libgit2-glib will find libgit2 using pkg-config, so you don't need those CPPFLAGS/CFLAGS overrides that you are doing. Just make sure that pkg-config can find the installed libgit2 pc file. Easiest is probably to install libgit2 in either /usr/local or $HOME/.local. If pkg-config doesn't pick it up, you might need to explicitly set PKG_CONFIG_PATH=/usr/local/lib/pkgconfig (or PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig depending on where you install libgit2)


Jesse


2014/1/11 Anthony Cassaigne <anthony cassaigne gmail com>
Sorry but again, I hit an error when I'm trying to compile libgit2-glib-0.0.10.

So I upgrade  libgit2-0 to 0.20.0 by downloading source code and compile it.
I ran configure script including path to libgit2 v0.20.0 with these options

./configure CPPFLAGS="-I/home/acassaigne/Downloads/libgit2/include"
CFLAGS="-I/home/acassaigne/Downloads/libgit2/include"
Second step I compile it by simple make command :
make
...
  CC       ggit-oid.lo
  CC       ggit-patch.lo
  CC       ggit-push.lo
  CC       ggit-ref.lo
ggit-ref.c: In function 'ggit_ref_has_reflog':
ggit-ref.c:422:2: error: too few arguments to function 'git_reference_has_log'
  return git_reference_has_log (_ggit_native_get (ref)) == 1;
  ^
In file included from
/home/acassaigne/Downloads/libgit2/include/git2/diff.h:14:0,
                 from
/home/acassaigne/Downloads/libgit2/include/git2/checkout.h:12,
                 from /home/acassaigne/Downloads/libgit2/include/git2.h:16,
                 from ggit-ref.h:25,
                 from ggit-ref.c:21:
/home/acassaigne/Downloads/libgit2/include/git2/refs.h:569:17: note:
declared here
 GIT_EXTERN(int) git_reference_has_log(git_repository *repo, const
char *refname);

Where I'm wrong ?

Thanks


On Fri, Jan 10, 2014 at 12:07 AM, Ignacio Casal Quinteiro
<nacho resa gmail com> wrote:
> Hi Anthony,
>
> yeah you need 0.20.0 and clearly we should require that version in
> libgit2-glib.
> We'll fix it soon.
>
> Cheers.
>
>
> On Fri, Jan 10, 2014 at 12:02 AM, Anthony Cassaigne
> <anthony cassaigne gmail com> wrote:
>>
>> Thanks for your help.
>>
>> I have version 0.19.0-2
>>
>> dpkg -l libgit2-0
>> Desired=Unknown/Install/Remove/Purge/Hold
>> |
>> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
>> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
>> ||/ Name                    Version          Architecture     Description
>>
>> +++-=======================-================-================-====================================================
>> ii  libgit2-0:amd64         0.19.0-2         amd64
>> low-level Git library
>>
>> On Thu, Jan 9, 2014 at 11:48 PM, Jesse van den Kieboom
>> <jessevdk gnome org> wrote:
>> > Looks like your version of libgit2 is too old. Which version do you have
>> > installed?
>> >
>> >
>> > 2014/1/9 Anthony Cassaigne <anthony cassaigne gmail com>
>> >>
>> >> Hello,
>> >>
>> >>
>> >> I like gitg and I would like to test newer version 0.3.1.
>> >> So I'm starting by download source code of libgit2-glib-0.0.10
>> >>
>> >> I followed install instructions included in INSTALL file.
>> >> First step ./configure run fine
>> >> It's finish by this output result :
>> >> configure: creating ./config.status
>> >> config.status: creating libgit2-glib-1.0.pc
>> >> config.status: creating Makefile
>> >> config.status: creating docs/Makefile
>> >> config.status: creating docs/reference/Makefile
>> >> config.status: creating docs/reference/version.xml
>> >> config.status: creating examples/Makefile
>> >> config.status: creating libgit2-glib/Makefile
>> >> config.status: creating tests/Makefile
>> >> config.status: creating config.h
>> >> config.status: executing depfiles commands
>> >> config.status: executing libtool commands
>> >>
>> >> So let's go for the second step :
>> >> make
>> >> And I got these errors
>> >> make  all-recursive
>> >> make[1]: Entering directory
>> >> `/home/acassaigne/Downloads/libgit2-glib-0.0.10'
>> >> Making all in libgit2-glib
>> >> make[2]: Entering directory
>> >> `/home/acassaigne/Downloads/libgit2-glib-0.0.10/libgit2-glib'
>> >> make  all-am
>> >> make[3]: Entering directory
>> >> `/home/acassaigne/Downloads/libgit2-glib-0.0.10/libgit2-glib'
>> >>   CC       ggit-enum-types.lo
>> >>   CC       ggit-blame.lo
>> >> In file included from ggit-blame.c:21:0:
>> >> ggit-blame.h:75:46: error: unknown type name 'git_blame'
>> >>  GgitBlame     *_ggit_blame_wrap             (git_blame *blame);
>> >>                                               ^
>> >> ggit-blame.c:103:1: error: unknown type name 'git_blame_hunk'
>> >>  ggit_blame_hunk_wrap (const git_blame_hunk *gblame_hunk)
>> >>  ^
>> >> ggit-blame.c: In function 'ggit_blame_hunk_wrap':
>> >> ggit-blame.c:110:41: error: request for member 'lines_in_hunk' in
>> >> something not a structure or union
>> >>   blame_hunk->lines_in_hunk = gblame_hunk->lines_in_hunk;
>> >>                                          ^
>> >> ggit-blame.c:112:60: error: request for member 'final_commit_id' in
>> >> something not a structure or union
>> >>   blame_hunk->final_commit_id = _ggit_oid_wrap
>> >> (&gblame_hunk->final_commit_id);
>> >>                                                             ^
>> >> ggit-blame.c:113:51: error: request for member
>> >> 'final_start_line_number' in something not a structure or union
>> >>   blame_hunk->final_start_line_number =
>> >> gblame_hunk->final_start_line_number;
>> >>                                                    ^
>> >> ggit-blame.c:115:17: error: request for member 'final_signature' in
>> >> something not a structure or union
>> >>   if (gblame_hunk->final_signature)
>> >>                  ^
>> >> ggit-blame.c:118:37: error: request for member 'final_signature' in
>> >> something not a structure or union
>> >>     _ggit_signature_wrap (gblame_hunk->final_signature,
>> >>                                      ^
>> >> ggit-blame.c:123:59: error: request for member 'orig_commit_id' in
>> >> something not a structure or union
>> >>   blame_hunk->orig_commit_id = _ggit_oid_wrap
>> >> (&gblame_hunk->orig_commit_id);
>> >>                                                            ^
>> >> ggit-blame.c:124:50: error: request for member
>> >> 'orig_start_line_number' in something not a structure or union
>> >>   blame_hunk->orig_start_line_number =
>> >> gblame_hunk->orig_start_line_number;
>> >>                                                   ^
>> >> ggit-blame.c:126:17: error: request for member 'orig_signature' in
>> >> something not a structure or union
>> >>   if (gblame_hunk->orig_signature)
>> >>                  ^
>> >> ggit-blame.c:129:37: error: request for member 'orig_signature' in
>> >> something not a structure or union
>> >>     _ggit_signature_wrap (gblame_hunk->orig_signature,
>> >>                                      ^
>> >> ggit-blame.c:134:47: error: request for member 'orig_path' in
>> >> something not a structure or union
>> >>   blame_hunk->orig_path = g_strdup (gblame_hunk->orig_path);
>> >>                                                ^
>> >> ggit-blame.c: At top level:
>> >> ggit-blame.c:307:19: error: unknown type name 'git_blame'
>> >>  _ggit_blame_wrap (git_blame *blame)
>> >>                    ^
>> >> ggit-blame.c: In function 'ggit_blame_get_hunk_count':
>> >> ggit-blame.c:321:2: error: implicit declaration of function
>> >> 'git_blame_get_hunk_count' [-Werror=implicit-function-declaration]
>> >>   return git_blame_get_hunk_count (_ggit_native_get (blame));
>> >>   ^
>> >> ggit-blame.c:321:2: warning: nested extern declaration of
>> >> 'git_blame_get_hunk_count' [-Wnested-externs]
>> >> ggit-blame.c: In function 'ggit_blame_get_hunk_by_line':
>> >> ggit-blame.c:330:2: error: implicit declaration of function
>> >> 'git_blame_get_hunk_byline' [-Werror=implicit-function-declaration]
>> >>   return ggit_blame_hunk_wrap (git_blame_get_hunk_byline
>> >> (_ggit_native_get (blame),
>> >>   ^
>> >> ggit-blame.c:330:2: warning: nested extern declaration of
>> >> 'git_blame_get_hunk_byline' [-Wnested-externs]
>> >> ggit-blame.c:331:58: warning: passing argument 1 of
>> >> 'ggit_blame_hunk_wrap' makes pointer from integer without a cast
>> >> [enabled by default]
>> >>                                                           line));
>> >>                                                           ^
>> >> ggit-blame.c:103:1: note: expected 'const int *' but argument is of
>> >> type
>> >> 'int'
>> >>  ggit_blame_hunk_wrap (const git_blame_hunk *gblame_hunk)
>> >>  ^
>> >> ggit-blame.c: In function 'ggit_blame_get_hunk_by_index':
>> >> ggit-blame.c:340:2: error: implicit declaration of function
>> >> 'git_blame_get_hunk_byindex' [-Werror=implicit-function-declaration]
>> >>   return ggit_blame_hunk_wrap (git_blame_get_hunk_byindex
>> >> (_ggit_native_get (blame),
>> >>   ^
>> >> ggit-blame.c:340:2: warning: nested extern declaration of
>> >> 'git_blame_get_hunk_byindex' [-Wnested-externs]
>> >> ggit-blame.c:341:59: warning: passing argument 1 of
>> >> 'ggit_blame_hunk_wrap' makes pointer from integer without a cast
>> >> [enabled by default]
>> >>                                                            idx));
>> >>                                                            ^
>> >> ggit-blame.c:103:1: note: expected 'const int *' but argument is of
>> >> type
>> >> 'int'
>> >>  ggit_blame_hunk_wrap (const git_blame_hunk *gblame_hunk)
>> >>  ^
>> >> ggit-blame.c: In function 'ggit_blame_from_buffer':
>> >> ggit-blame.c:368:2: error: unknown type name 'git_blame'
>> >>   git_blame *gblame;
>> >>   ^
>> >> ggit-blame.c:374:2: error: implicit declaration of function
>> >> 'git_blame_buffer' [-Werror=implicit-function-declaration]
>> >>   ret = git_blame_buffer (&gblame,
>> >>   ^
>> >> ggit-blame.c:374:2: warning: nested extern declaration of
>> >> 'git_blame_buffer' [-Wnested-externs]
>> >> ggit-blame.c:385:2: error: implicit declaration of function
>> >> '_ggit_blame_wrap' [-Werror=implicit-function-declaration]
>> >>   return _ggit_blame_wrap (gblame);
>> >>   ^
>> >> ggit-blame.c:385:2: warning: nested extern declaration of
>> >> '_ggit_blame_wrap' [-Wnested-externs]
>> >> ggit-blame.c:385:2: warning: return makes pointer from integer without
>> >> a cast [enabled by default]
>> >> cc1: some warnings being treated as errors
>> >> make[3]: *** [ggit-blame.lo] Error 1
>> >> make[3]: Leaving directory
>> >> `/home/acassaigne/Downloads/libgit2-glib-0.0.10/libgit2-glib'
>> >> make[2]: *** [all] Error 2
>> >> make[2]: Leaving directory
>> >> `/home/acassaigne/Downloads/libgit2-glib-0.0.10/libgit2-glib'
>> >> make[1]: *** [all-recursive] Error 1
>> >> make[1]: Leaving directory
>> >> `/home/acassaigne/Downloads/libgit2-glib-0.0.10'
>> >> make: *** [all] Error 2
>> >>
>> >>
>> >> Where I'm wrong ?
>> >>
>> >> Thanks,
>> >> Best regards
>> >> _______________________________________________
>> >> gitg-list mailing list
>> >> gitg-list gnome org
>> >> https://mail.gnome.org/mailman/listinfo/gitg-list
>> >
>> >
>>
>>
>>
>> --
>> Cordialement,
>> A. Cassaigne
>> _______________________________________________
>> gitg-list mailing list
>> gitg-list gnome org
>> https://mail.gnome.org/mailman/listinfo/gitg-list
>
>
>
>
> --
> Ignacio Casal Quinteiro



--
Cordialement,
A. Cassaigne



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]