extconf.rb doesn't find libgit2 from GNU Guix
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.3k
- Forks
- 293
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
Based on my understanding of: https://github.com/libgit2/rugged/blob/6379f23cedd5f527cf6a5c229627e366b590a22d/ext/rugged/extconf.rb#L69, it should find the libgit2 prefix (LIBGIT2_DIR) using either a --with-git2-dir=$my-prefix passed to gem install, or automatically via pkg-config.
Neither works on my system, so I had to resort to manually patching LIBGIT2_DIR. pkg-config is available in the build environment and:
$ pkg-config --cflags libgit2
-I/gnu/store/agd3gdj1nhpq4w1hyfnhya66m9qlqfdk-libgit2-1.5.1/include -I/gnu/store/aj9iv9xfxb8bj8rg0r7v65xjh1skyb5k-openssl-1.1.1t/include -I/gnu/store/mqz2h2v1i7lx555yaz89sqd06kpgdr62-pcre2-10.37/include -I/gnu/store/v8d7j5i02nfz951x1szbl9xrd873vc3l-zlib-1.2.12/include
$ find /gnu/store/agd3gdj1nhpq4w1hyfnhya66m9qlqfdk-libgit2-1.5.1 -name version.h
/gnu/store/agd3gdj1nhpq4w1hyfnhya66m9qlqfdk-libgit2-1.5.1/include/git2/version.h
Thanks!
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.
Research direction
Start with ext/rugged/extconf.rb around line 69 and reproduce the reported gem install and pkg-config behavior in the GNU Guix environment. Compare the detected paths with the libgit2 prefix and the shown pkg-config output; done means the issue's prefix-discovery path works without manually patching LIBGIT2_DIR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, ruby
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100