Attempting to bump the Arch Linux package to the latest 2.2.0 release ran into build errors. The culprit seems to be a new requirement on a non-standard libgit2. By default and whenever possible Arch Linux packages are built against system libs, so hitherto the Gram package has been linked to the system shared libgit2.so module.
warning: libgit2-sys@0.18.4+1.9.3: failed to probe system libgit2-experimental:
error: failed to run custom build command for `libgit2-sys v0.18.4+1.9.3`
Caused by:
process didn't exit successfully: `/build/gram/src/gram/target/release/build/libgit2-sys-750a3abf7867df23/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-check-cfg=cfg(libgit2_vendored,libgit2_experimental_sha256,)
cargo:rerun-if-env-changed=LIBGIT2_NO_VENDOR
cargo:rerun-if-env-changed=LIBGIT2_EXPERIMENTAL_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_EXPERIMENTAL_STATIC
cargo:rerun-if-env-changed=LIBGIT2_EXPERIMENTAL_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-experimental:
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libgit2-experimental 'libgit2-experimental >= 1.9.3' 'libgit2-experimental < 1.10.0'
pkg-config output:
Package libgit2-experimental was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgit2-experimental.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libgit2-experimental' not found
Package 'libgit2-experimental' not found
Package 'libgit2-experimental' not found
The system library `libgit2-experimental` required by crate `libgit2-sys` was not found.
The file `libgit2-experimental.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `libgit2-experimental.pc`.
--- stderr
thread 'main' (12842) panicked at /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libgit2-sys-0.18.4+1.9.3/build.rs:100:13:
The environment variable `LIBGIT2_NO_VENDOR` has been set but no compatible system libgit2 could be found.
The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VENDOR=0`.
I haven't looked into what libgit2-experimental –is this an unreleased upstream development line, a 3rd party fork, or a fork run by this project?– but regardless of the answer to that question my question is what is the plan for this project? Is this going to be a long term thing? Is this a short term fix until something lands in the upstream releases? Is vendoring this going to be the only packaging option we have?