Bug 280706

Summary: devel/cargo-c: Fails to build with libgit2 1.8.1
Product: Ports & Packages Reporter: Nuno Teixeira <eduardo>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: eduardo
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 280685    

Description Nuno Teixeira freebsd_committer freebsd_triage 2024-08-09 14:27:42 UTC
Hello,

Doing a exp-run on libgit2 update consumers:

warning: libgit2-sys@0.16.2+1.7.2: libgit2/src/libgit2/transports/ssh.c:11:10: fatal error: 'libssh2.h' file not found
warning: libgit2-sys@0.16.2+1.7.2:    11 | #include <libssh2.h>
warning: libgit2-sys@0.16.2+1.7.2:       |          ^~~~~~~~~~~
warning: libgit2-sys@0.16.2+1.7.2: 1 error generated.

log: https://people.freebsd.org/~eduardo/exp-run/libgit2-181/errors/cargo-c-0.10.3.log
exp-run: https://people.freebsd.org/~eduardo/exp-run/libgit2-181/

Any help is welcome.
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-08-10 00:43:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=84ce872284e30424e2691199d40023a852b13563

commit 84ce872284e30424e2691199d40023a852b13563
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-08-09 23:12:27 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-08-10 00:41:35 +0000

    devel/cargo-c: unbreak build with libgit2 1.8.1

    warning: libgit2-sys@0.16.2+1.7.2: failed to probe system libgit2:
    [...]
    warning: libgit2-sys@0.16.2+1.7.2: libgit2/src/libgit2/transports/ssh.c:11:10: fatal error: 'libssh2.h' file not found
    warning: libgit2-sys@0.16.2+1.7.2:    11 | #include <libssh2.h>
    warning: libgit2-sys@0.16.2+1.7.2:       |          ^~~~~~~~~~~
    warning: libgit2-sys@0.16.2+1.7.2: 1 error generated.

    PR:             280706
    Reported by:    eduardo

 devel/cargo-c/files/patch-libgit2-1.8.x (new) | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Comment 2 Jan Beich freebsd_committer freebsd_triage 2024-08-10 00:45:03 UTC
When truly incompatible ports 001fd50e85b9 can be temporarily reverted.
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2024-08-10 09:08:59 UTC
(In reply to Jan Beich from comment #2)

Hello Jan,

So, you unbundled libgit2 and libssh2 from port so it can use system devel/libgit2 and security/libssh2?

To understand better how this works, in the past you just did the contrary, used bundled libgit2/libssh2 because version requirement was not met: "# XXX Need devel/libgit2 >= 1.6.4; libgit2 depends on libssh2, so bundle both"

I will check if this works on the rest of cargo ports affected by same problem.

Thanks!