libgit2 / libgit2/rugged

Failure to install in Debian trixie: #error libgit2 version is not compatible

Open
#990 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2.3k
Forks
293
PR merge metrics
No merged PRs in 30d

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 */

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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.

Assessment

Tech stack
c, ruby
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.