Greetings, sys-apps/bat-0.25.0 fails to compile against dev-libs/libgit2-1.9.0. Downgrading dev-libs/libgit2 to version 1.8.4 will allow upgrade to sys-apps/bat-0.25.0. Conversely, downgrading sys-apps/bat to version 0.24.0-r2 will build against dev-libs/libgit2-1.9.0. Error (Snippet) from build: ----------- Running `/var/tmp/portage/sys-apps/bat-0.25.0/work/bat-0.25.0/target/release/build/libgit2-sys-1187f21fa6bd7a0f/build-script-build` warning: libgit2-sys@0.17.0+1.8.1: failed to probe system libgit2: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "x86_64-pc-linux-gnu-pkg-config" "--libs" "--cflags" "libgit2" "libgit2 >= 1.8.1" "libgit2 < 1.9.0"` did not exit successfully: exit status: 1 error: failed to run custom build command for `libgit2-sys v0.17.0+1.8.1` Caused by: process didn't exit successfully: `/var/tmp/portage/sys-apps/bat-0.25.0/work/bat-0.25.0/target/release/build/libgit2-sys-1187f21fa6bd7a0f/build-script-build` (exit status: 101) --- stdout cargo:rerun-if-env-changed=LIBGIT2_NO_VENDOR cargo:rerun-if-env-changed=LIBGIT2_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=LIBGIT2_STATIC cargo:rerun-if-env-changed=LIBGIT2_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR cargo:warning=failed to probe system libgit2: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "x86_64-pc-linux-gnu-pkg-config" "--libs" "--cflags" "libgit2" "libgit2 >= 1.8.1" "libgit2 < 1.9.0"` did not exit successfully: exit status: 1 error: could not find system library 'libgit2' required by the 'libgit2-sys' crate --- stderr Package dependency requirement 'libgit2 < 1.9.0' could not be satisfied. Package 'libgit2' has version '1.9.0', required version is '< 1.9.0' --- stderr ---------- I tried adjusting versions in the ebuild for dev-libs/libgit2 but it fails when downloading the .crate. (This may have been me doing something incorrectly) Reproducible: Always Steps to Reproduce: 1. Emerge update 2. Update system 3.
I also tried to add this snippet from the 0.24.0-r2 ebuild to the ebuild for 0.25.0 as it seems to deal with this: ----------- src_prepare() { default # libgit2-sys unnecessarily(?) requests <libgit2-1.8.0, bump to 2 for now sed -e '/range_version/s/1\.8\.0/2/' \ -i "${ECARGO_VENDOR}"/libgit2-sys-0.16.1+1.7.1/build.rs || die } ----------- This failed to work and I'm sure I've missed something. This issue seems to have been prevelant prior to this however.
Please attach a build log and provide emerge --info. Then change the bug status to UNCONFIRMED.
Created attachment 918618 [details] Requested build.log
Created attachment 918619 [details] Requested emerge --info
Added requested info. I should also add that I have three different machines with this issue so this is not isolated. Thanks
Applied the patch to the ebuild locally and tested with success on two machines. ---------- src_prepare() { default # libgit2-sys unnecessarily(?) requests <libgit2-1.9.0, bump to 2 for now sed -e '/range_version/s/1\.9\.0/2/' \ -i "${ECARGO_VENDOR}"/libgit2-sys-0.17.0+1.8.1/build.rs || die } ---------- During my testing I missed the second part of the version bumps: [ -i "${ECARGO_VENDOR}"/libgit2-sys-0.17.0+1.8.1/build.rs ] So at least I was close ... This will fix it for me. I will close this bug when it goes live or soon thereafter (or someone else can if preferred). Thanks.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca6c0b500eaff6fef1242ef7c800456cc74c42a4 commit ca6c0b500eaff6fef1242ef7c800456cc74c42a4 Author: Violet Purcell <vimproved@inventati.org> AuthorDate: 2025-02-11 18:03:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-02-14 05:15:17 +0000 sys-apps/bat: fix build with libgit2 1.9.0 Missed this in the bump since I have sys-apps/eza pinning it currently. Closes: https://bugs.gentoo.org/949505 Closes: https://bugs.gentoo.org/949536 Signed-off-by: Violet Purcell <vimproved@inventati.org> Closes: https://github.com/gentoo/gentoo/pull/40536 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/bat/bat-0.25.0.ebuild | 8 ++++++++ 1 file changed, 8 insertions(+)
*** Bug 949794 has been marked as a duplicate of this bug. ***