Re: Help with libgit2 needed to strip code copy from r-cran-git2r
On Thu, Jan 11, 2018 at 12:58:16AM +0100, Jose Luis Rivero wrote:
> dah .. I sent the reverse patch sorry:
>
> diff --git a/debian/patches/use_debian_packaged_libgit2.patch
> b/debian/patches/use_debian_packaged_libgit2.patch
> index c716773..ab603cd 100644
> --- a/debian/patches/use_debian_packaged_libgit2.patch
> +++ b/debian/patches/use_debian_packaged_libgit2.patch
> @@ -87,7 +87,7 @@ Last-Update: Wed, 10 Jan 2018 10:33:31 +0100
> if test "x${have_ssh2}" = xyes; then
> - LIBSSH2_CFLAGS="-Ilibgit2/deps/libssh2/include"
> - LIBSSH2_LIBS="-Llibgit2/deps/libssh2/lib -lssh2"
> -+ LIBSSH2_CFLAGS="-I/usr/include/git2"
> ++ LIBSSH2_CFLAGS="-idirafter /usr/include/git2"
> + LIBSSH2_LIBS="-lgit2 -lssh2"
> fi
> fi
> @@ -97,7 +97,7 @@ Last-Update: Wed, 10 Jan 2018 10:33:31 +0100
>
> # Add include paths for git2r
> -CPPFLAGS="-I. -Ilibgit2/src -Ilibgit2/include -Ilibgit2/deps/http-parser
> ${CPPFLAGS}"
> -+CPPFLAGS="-I. -I/usr/include/git2 ${CPPFLAGS}"
> ++CPPFLAGS="-I. -idirafter /usr/include/git2 ${CPPFLAGS}"
...
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -idirafter /usr/include/git2 -DGIT_ARCH_64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DGIT_OPENSSL -DLIBGIT2_NO_FEATURES_H -DGIT_SHA1_OPENSSL -DGIT_SSH -DGIT_CURL -DGIT_USE_STAT_MTIM -DGIT_USE_NSEC -DHAVE_FUTIMENS -DHAVE_QSORT_R -fpic -g -O2 -fdebug-prefix-map=/build/r-base-3.4.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c git2r_branch.c -o git2r_branch.o
git2r_branch.c: In function 'git2r_branch_upstream_canonical_name':
git2r_branch.c:407:19: error: 'GIT_BUF_INIT' undeclared (first use in this function); did you mean 'GIT_REF_OID'?
git_buf buf = GIT_BUF_INIT;
^~~~~~~~~~~~
GIT_REF_OID
git2r_branch.c:407:19: note: each undeclared identifier is reported only once for each function it appears in
git2r_branch.c:427:11: warning: implicit declaration of function 'git_buf_join3'; did you mean 'git_buf_set'? [-Wimplicit-function-declaration]
err = git_buf_join3(
^~~~~~~~~~~~~
git_buf_set
/usr/lib/R/etc/Makeconf:159: recipe for target 'git2r_branch.o' failed
This is in
/usr/include/git2/buffer.h:#define GIT_BUF_INIT_CONST(STR,LEN) { (char *)(STR), 0, (size_t)(LEN) }
but it seems a different buffer.h is used.
Kind regards
Andreas.
--
http://fam-tille.de
Reply to: