Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927503 - sci-electronics/kicad-8.0.1: Compilation Failure with libgit2-1.8.0
Summary: sci-electronics/kicad-8.0.1: Compilation Failure with libgit2-1.8.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords: PullRequest
: 927941 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-22 11:14 UTC by vowstar
Modified: 2024-03-27 11:41 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (kicad-8.0.1-build-20240322174300.log.xz,62.60 KB, application/x-xz)
2024-03-22 11:15 UTC, vowstar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vowstar 2024-03-22 11:14:34 UTC
Compilation Failure with libgit2-1.8.0 in KiCad 8.0.1, build-error.
When compiling KiCad version 8.0.1 with libgit2 version 1.8.0, a compilation error occurs. The error is related to a change in the function signature of git_commit_create in the libgit2 library. Specifically, the type of the parents parameter was changed from const git_commit *parents[] to git_commit * const parents[] in libgit2, as seen in this commit: libgit2 commit cf19ddc.
The error message received during compilation is as follows:

/var/tmp/portage/sci-electronics/kicad-8.0.1/work/kicad-8.0.1/kicad/project_tree_pane.cpp: In member function ‘void PROJECT_TREE_PANE::onGitCommit(wxCommandEvent&)’:
/var/tmp/portage/sci-electronics/kicad-8.0.1/work/kicad-8.0.1/kicad/project_tree_pane.cpp:2242:31: error: invalid conversion from ‘const git_commit**’ to ‘git_commit* const*’ [-fpermissive]
 2242 |                            1, parents ) != 0 )
      |                               ^~~~~~~
      |                               |
      |                               const git_commit**
In file included from /usr/include/git2/repository.h:14,
                 from /usr/include/git2/annotated_commit.h:11,
                 from /usr/include/git2.h:11,
                 from /var/tmp/portage/sci-electronics/kicad-8.0.1/work/kicad-8.0.1/kicad/project_tree_pane.cpp:27:
/usr/include/git2/commit.h:369:28: note:   initializing argument 10 of ‘int git_commit_create(git_oid*, git_repository*, const char*, const git_signature*, const git_signature*, const char*, const char*, const git_tree*, size_t, git_commit* const*)’
  369 |         git_commit * const parents[]);
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~



Reproducible: Always

Steps to Reproduce:
1. Upgrade libgit2 to version 1.8.0.
2. Attempt to compile KiCad version 8.0.1.
3. The mentioned compilation error occurs, halting the build process.

Actual Results:  
Compilation Failure with libgit2-1.8.0 in KiCad 8.0.1 (build-error)

Expected Results:  
Build success

https://gitlab.com/kicad/code/kicad/-/issues/17536
Comment 1 vowstar 2024-03-22 11:15:54 UTC
Created attachment 888152 [details]
build.log
Comment 3 vowstar 2024-03-27 08:43:42 UTC
*** Bug 927941 has been marked as a duplicate of this bug. ***
Comment 4 Larry the Git Cow gentoo-dev 2024-03-27 11:41:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ded5389f065b99454f2478b9559bf3a6dc43247f

commit ded5389f065b99454f2478b9559bf3a6dc43247f
Author:     Huang Rui <vowstar@gmail.com>
AuthorDate: 2024-03-22 11:22:21 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2024-03-27 11:41:10 +0000

    sci-electronics/kicad: fix build error with libgit2-1.8.0
    
    See also: https://gitlab.com/kicad/code/kicad/-/issues/17536
    
    Closes: https://bugs.gentoo.org/927503
    Closes: https://github.com/gentoo/gentoo/pull/35865
    Signed-off-by: Huang Rui <vowstar@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 .../kicad/files/kicad-8.0.1-libgit2.patch          | 36 ++++++++++++++++++++++
 sci-electronics/kicad/kicad-8.0.0.ebuild           |  4 +++
 sci-electronics/kicad/kicad-8.0.1.ebuild           |  4 +++
 3 files changed, 44 insertions(+)