build rugged with system libraries
OS: Arch Linux
Ruby: 2.3.4
I try build rugged with system libs. And get error:
libgit2 version is not compatible, expected ~> 0.24.0
Default libgit2 version is 0.25
If I try build rugged without any flags I get another error: https://gist.github.com/one0fnine/8c748a63e2bcf4b707a35dd4445a2a51
solution: sudo pacman -Sy openssl-1.0 PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig:/usr/lib/pkgconfig bundle install
OS: Fedora Linux 28 Ruby: 2.5.1p57
libgit2 version is not compatible, expected ~> 0.27.0
Basically the same error on Fedora 28, versions of libgit2 and libgit2-devel installed by dnf were 0.26.6-1.fc38 when 0.27.0 was needed.
This fixed it in case anyone else runs into this error:
bundle init
echo 'gem "rugged"' >> Gemfile
bundle config build.rugged --use-system-libraries
wget https://github.com/libgit2/libgit2/archive/v0.27.0.tar.gz
tar xzf v0.27.0.tar.gz
cd libgit2-0.27.0
cmake .
make
sudo make install
cd ..
bundle install --path vendor/bundle/
I'm currently maintaining ruby-rugged for Arch Linux and just opted to force remove the broken and unneeded checks from ext/rugged/extconf.rb.
After 5 years this is still a problem.