git2go icon indicating copy to clipboard operation
git2go copied to clipboard

Cross-compiling projects that are using git2go

Open calvn opened this issue 9 years ago • 4 comments

I was wondering what would be the pipeline for cross-compiling a project that is using git2go? My knowledge with compilers is minimal, and to my understanding cross-compiling external libraries is non-trivial.

calvn avatar Jun 23 '16 19:06 calvn

I've been looking into xgo, which allows for cross-compilation of Go with CGO components. The missing piece to get xgo working with git2go is support for CMake (karalabe/xgo#49). I'm hoping soon to have a chance to take a stab at a PR.

ethernetdan avatar Jul 05 '16 18:07 ethernetdan

It's awesome to hear that others interested in this as well! I've also thought about using xgo, but then saw the CMake limitation as mentioned in here, and decided to try tackling it from a different tangent.

So far I got static build of git2go and its dependencies on linux-amd64 with multiarch/crossbuild. I used their image as the base, and scripted the build for the libraries. However, I am not sure of how I can do the same for other platforms. I opened an issue with them regarding this to ask for suggestions.

calvn avatar Jul 05 '16 18:07 calvn

Hi Calvin, have you been able to create cross platform static builds of git2go? I'm particularly interested in a build for Windows 10.

CoolHandDev avatar Jan 18 '17 23:01 CoolHandDev

Hey @CoolHandDev, unfortunately I was not able to get it working! I was able to get static builds from MacOS to amd64 targets, but even that was a hassle so I didn't experiment any further. It might be too late at this point, but if you are performing read-only manipulations, it might be worth looking at go-git which doesn't depend on any C libraries AFAIK.

calvn avatar Jan 19 '17 05:01 calvn