ropensci / git2r

R bindings to the libgit2 library
https://docs.ropensci.org/git2r
GNU General Public License v2.0
215 stars 59 forks source link

Failure to compile 0.35 on Ubuntu 20.04 #471

Open p-phillips opened 3 weeks ago

p-phillips commented 3 weeks ago

I'm trying to upgrade my R packages on an Ubuntu 20.04 install to git2r 0.35

I've got libgit2-dev installed:

# apt list --installed| egrep libgit
libgit-wrapper-perl/focal,focal,now 0.048-1 all [installed,automatic]
libgit2-28/focal-updates,focal-security,now 0.28.4+dfsg.1-2ubuntu0.1 amd64 [installed,automatic]
libgit2-dev/focal-updates,focal-security,now 0.28.4+dfsg.1-2ubuntu0.1 amd64 [installed,automatic]
libgit2-glib-1.0-0/focal,now 0.28.0.1-2 amd64 [installed,automatic]
libgit2-glib-1.0-dev/focal,now 0.28.0.1-2 amd64 [installed]
libgitlab-api-v4-perl/focal,focal,now 0.25-1 all [installed,automatic]

but I'm getting the

configure: error: package dependency requirement 'libgit2 >= 1.0' could not be satisfied.
See 'config.log' for more details
ERROR: configuration failed for package ‘git2r’

error message. I've installed the GIT MAINTAINERS ppa but still the same error message.

My suspicion is that my problem is that I don't have a sufficiently up to date version of the development libraries? - I can't find anything obvious regarding a libgit2-dev PPA that would upgrade the library from 0.28.4.

Advice appreciated. Thanks. Pete

stewid commented 3 weeks ago

Yes, I bumped the version of libgit2 to >= 1.0. It was challenging to check for multiple libgit2 API differences in the configuration and I decided to move forward. I am sorry that this is causing you difficulties in installing version 0.35. There are no other changes in that version so you can continue to use the previous version of git2r.

p-phillips commented 3 weeks ago

Any advice on what the options would be in future ? This is likely to burn anyone still on a long term supported version of Ubuntu.

trosendal commented 3 weeks ago

The error message indicates that you need to install a version of libgit2 that is greater than or equal to version 1.0. On Ubuntu you can apparently get that from the 'universe' repository or from here: https://ubuntu.pkgs.org/24.04/ubuntu-universe-amd64/libgit2-glib-1.0-0_1.2.0-1build4_amd64.deb.html . I would suggest that 'options for the future' include installation of the required dependency to avoid getting 'burned'.

p-phillips commented 3 weeks ago

_

The error message indicates that you need to install a version of libgit2 that is greater than or equal to version 1.0

_

Yeah, I understand that. The problem is that if you are running a long term support release, you can't get that dependency unless someone makes a PPA available, and I've not been able to find one for Ubuntu 20.04. All the repos only have 0.28.4 versions for Ubuntu 20.04.