Failure to install in Debian trixie: #error libgit2 version is not compatible
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- build-system
Research direction
Reproduce the installation on Debian trixie-slim and inspect the generated conftest.c check against /usr/include/git2/version.h. Determine why the libgit2 version check fails, then verify that rugged installs successfully with the reported environment.
Written by the indexing model from the issue text.
Description
Updating the Docker image we use from bullseye-slim to newly released trixie-slim, rugged is failing to install.
The installation log
checking for gmake... -------------------- yes
--------------------
pkg_config: checking for pkg-config for libgit2... -------------------- [" ", "", "-lgit2"]
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 pkg-config --exists libgit2
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 pkg-config --libs libgit2 |
=> "-lgit2 \n"
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 "gcc -o conftest -I/usr/local/include/ruby-3.4.0/x86_64-linux -I/usr/local/include/ruby-3.4.0/ruby/backward -I/usr/local/include/ruby-3.4.0 -I. -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef -fPIC -g -O3 -Wall -Wno-comment conftest.c -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lruby -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 "gcc -o conftest -I/usr/local/include/ruby-3.4.0/x86_64-linux -I/usr/local/include/ruby-3.4.0/ruby/backward -I/usr/local/include/ruby-3.4.0 -I. -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef -fPIC -g -O3 -Wall -Wno-comment conftest.c -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -lgit2 -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lruby -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 pkg-config --cflags-only-I libgit2 |
=> "\n"
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 pkg-config --cflags-only-other libgit2 |
=> "\n"
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 pkg-config --libs-only-l libgit2 |
=> "-lgit2 \n"
package configuration for libgit2
incflags:
cflags:
ldflags:
libs: -lgit2
--------------------
LD_LIBRARY_PATH=.:/usr/local/lib ASAN_OPTIONS=detect_leaks=0 "gcc -I/usr/local/include/ruby-3.4.0/x86_64-linux -I/usr/local/include/ruby-3.4.0/ruby/backward -I/usr/local/include/ruby-3.4.0 -I. -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef -fPIC -g -O3 -Wall -Wno-comment -c conftest.c"
In file included from conftest.c:3:
/usr/include/git2/version.h:16:1: error: unknown type name ‘GIT_BEGIN_DECL’
16 | GIT_BEGIN_DECL
| ^~~~~~~~~~~~~~
conftest.c:5:5: warning: "LIBGIT2_VER_MAJOR" is not defined, evaluates to 0 [-Wundef]
5 | #if LIBGIT2_VER_MAJOR != || LIBGIT2_VER_MINOR !=
| ^~~~~~~~~~~~~~~~~
conftest.c:5:27: error: operator '!=' has no right operand
5 | #if LIBGIT2_VER_MAJOR != || LIBGIT2_VER_MINOR !=
| ^~
conftest.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input
4 |
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <git2/version.h>
4:
5: #if LIBGIT2_VER_MAJOR != || LIBGIT2_VER_MINOR !=
6: #error libgit2 version is not compatible
7: #endif
/* end */
- Dominant language
- C
- Stars
- 2.3k
- Forks
- 293
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libgit2/rugged
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
LFS support? Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·