You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cmake --build .
Scanning dependencies of target git2-memcached
[100%] Building C object CMakeFiles/git2-memcached.dir/memcached.c.o
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:34:18: error: field has incomplete type 'git_odb_backend' (aka 'struct git_odb_backend')
git_odb_backend parent;
^
/usr/local/include/git2/types.h:84:16: note: forward declaration of 'struct git_odb_backend'
typedef struct git_odb_backend git_odb_backend;
^
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:81:10: error: use of undeclared identifier 'GIT_ENOMEM'
return GIT_ENOMEM;
^
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:85:10: error: use of undeclared identifier 'GIT_ENOMEM'
return GIT_ENOMEM;
^
/Users/stinky/Downloads/libgit2-backends/memcached/memcached.c:105:12: error: use of undeclared identifier 'GIT_SUCCESS'
status = GIT_SUCCESS;
...
It appears that the compiler can't find libgit2, but cmake seemed to find it just fine in the cmake memcached step.
This code isn't maintained, so there won't be an update from the libgit2 team, though fwiw it's finding libgit2 just fine, but the structure and the error codes mentioned in the error message have changed.
I see, thanks for the reply. Are there any active libgit2 backends for memcached/mysql/something in the wild? My brief search doesn't turn up anything.
Also, from a libgit2 team standpoint, would you discourage me from creating my own backend? If nobody is using backends my concern is that libgit2 support for backends may be spotty in future releases.
-- The C compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found libgit2: /usr/local/lib/libgit2.so
-- Found LIBMEMCACHED: /usr/lib/x86_64-linux-gnu/libmemcached.so
-- Configuring done
-- Generating done
-- Build files have been written to: /libgit2/libgit2-backends/memcached/build
Scanning dependencies of target git2-memcached
[100%] Building C object CMakeFiles/git2-memcached.dir/memcached.c.o
/libgit2/libgit2-backends/memcached/memcached.c:34:18: error: field ‘parent’ has incomplete type
git_odb_backend parent;
^
/libgit2/libgit2-backends/memcached/memcached.c: In function ‘memcached_backend__read_header’:
/libgit2/libgit2-backends/memcached/memcached.c:81:10: error: ‘GIT_ENOMEM’ undeclared (first use in this function)
return GIT_ENOMEM;
^
/libgit2/libgit2-backends/memcached/memcached.c:81:10: note: each undeclared identifier is reported only once for each function it appears in
/libgit2/libgit2-backends/memcached/memcached.c:105:12: error: ‘GIT_SUCCESS’ undeclared (first use in this function)
status = GIT_SUCCESS;
^
/libgit2/libgit2-backends/memcached/memcached.c: In function ‘memcached_backend__read’:
/libgit2/libgit2-backends/memcached/memcached.c:130:10: error: ‘GIT_ENOMEM’ undeclared (first use in this function)
return GIT_ENOMEM;
^
/libgit2/libgit2-backends/memcached/memcached.c:155:12: error: ‘GIT_SUCCESS’ undeclared (first use in this function)
status = GIT_SUCCESS;
^
/libgit2/libgit2-backends/memcached/memcached.c: In function ‘memcached_backend__exists’:
/libgit2/libgit2-backends/memcached/memcached.c:179:10: error: ‘GIT_ENOMEM’ undeclared (first use in this function)
return GIT_ENOMEM;
^
/libgit2/libgit2-backends/memcached/memcached.c: In function ‘memcached_backend__write’:
/libgit2/libgit2-backends/memcached/memcached.c:213:10: error: ‘GIT_ENOMEM’ undeclared (first use in this function)
return GIT_ENOMEM;
^
/libgit2/libgit2-backends/memcached/memcached.c:242:11: error: ‘GIT_SUCCESS’ undeclared (first use in this function)
status = GIT_SUCCESS;
^
/libgit2/libgit2-backends/memcached/memcached.c: In function ‘git_odb_backend_memcached’:
/libgit2/libgit2-backends/memcached/memcached.c:271:10: error: ‘GIT_ENOMEM’ undeclared (first use in this function)
return GIT_ENOMEM;
^
/libgit2/libgit2-backends/memcached/memcached.c:296:9: error: ‘GIT_SUCCESS’ undeclared (first use in this function)
return GIT_SUCCESS;
^
make[2]: *** [CMakeFiles/git2-memcached.dir/memcached.c.o] Error 1
CMakeFiles/git2-memcached.dir/build.make:54: recipe for target 'CMakeFiles/git2-memcached.dir/memcached.c.o' failed
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/git2-memcached.dir/all' failed
make[1]: *** [CMakeFiles/git2-memcached.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
These example custom backends don't get a lot of love. I'll put this on my todo list (though updating them would be rather easy for somebody interested in submitting a first-time pull request).
But these are just the examples: the custom backends are heavily used. They're relied upon in production by Visual Studio Team Services, which stores its Git repositories in a Azure Blob Storage, and by Team Foundation Server, which stores its Git repositories in SQL Server blob storage.
Custom backends are going to remain supported, period. 😀
Activity
carlosmn commentedon Jun 16, 2015
This code isn't maintained, so there won't be an update from the libgit2 team, though fwiw it's finding libgit2 just fine, but the structure and the error codes mentioned in the error message have changed.
stinky22 commentedon Jun 17, 2015
I see, thanks for the reply. Are there any active libgit2 backends for memcached/mysql/something in the wild? My brief search doesn't turn up anything.
Also, from a libgit2 team standpoint, would you discourage me from creating my own backend? If nobody is using backends my concern is that libgit2 support for backends may be spotty in future releases.
white-gecko commentedon Jul 11, 2017
I get more or less the same error, when I try to build the memcached backend:
the last cmake fails with:
Since pygit2 just received support for custom backends with 0.25.1 I can't imagine, that the custom back-ends are completely unused. Somebody must know something about it ;-)
ethomson commentedon Jul 11, 2017
These example custom backends don't get a lot of love. I'll put this on my todo list (though updating them would be rather easy for somebody interested in submitting a first-time pull request).
But these are just the examples: the custom backends are heavily used. They're relied upon in production by Visual Studio Team Services, which stores its Git repositories in a Azure Blob Storage, and by Team Foundation Server, which stores its Git repositories in SQL Server blob storage.
Custom backends are going to remain supported, period. 😀