git-credential-manager
git-credential-manager copied to clipboard
Make it easier to build for ARM
As of now code changes are required to build for ARM64 as detailed in #237 . The build.sh
has also changed since the PR was created and now has pinned runtime variable. https://github.com/GitCredentialManager/git-credential-manager/blob/859900272fae3d3b89e39cf85ffdcf28003f5afc/src/linux/Packaging.Linux/build.sh#L53
Ask is to parameterize as much as possible so even though it is not officially supported, users can build a version for ARM without having to make all these code changes.
@mjcheetham I would like to work on this issue. Please let me know if this is alright and any pointers to get started.
@Surya-06 thank you for volunteering to work on this issue 🌟! You are more than welcome to start whenever you have spare time to tackle it. As for pointers, I would take a look at the build.sh
script and the dotnet documentation on Linux runtimes before diving in.
thanks @ldennington , I'll try to find some time and close this.
@ldennington I took a fresh pull today and somehow when I just run dotnet -c build LinuxRelease
or dotnet -c build LinuxDebug
it builds just fine (earlier I got multiple errors when restoring the solution files and build would fail). I also faced issues with dotnet 5 vs 6 etc. Can you please confirm if what I'm seeing is right? I can't remember setting any persistent variable which could've affected subsequent builds etc. and noticed that there was a change which upgraded the dotnet version. PS: I'm building on a Rpi 4B.
@Surya-06 - I'm a bit confused about what the ask is. Are you still having problems building? If so, could you paste in the error text you see?
@ldennington Sorry for the delay, I got caught up in other things. The problem is weird actually. 2 weeks back I cloned the repo on my rpi and tried to build it locally. I remember running into a ton of errors and after following multiple threads I removed some of the configurations from the solution file and also installed a couple of utils before I could actually build the binary. When I started to work on this issue I deleted my old clone and made a fresh clone to isolate the changes. Weirdly enough, when I build it now it builds without any complaints and I can't understand how it is working. I see that the dotnet version was upgraded between the 2 clones the last time I checked but wasn't sure if this fixed the issue. I will try creating a different user this time and try some stuff there to confirm but I wanted to check if there is a possibility that this just started working after the upgrade.
Sorry - accidentally tapped the Close button on this issue.
I think as long as it's building fine now we shouldn't worry about it too much 😊. If you start to have issues again, though, let us know!
As far as I can tell the only impediment to an arm build is "RUNTIME=linux-x64" in src/linux/Packaging.Linux/layout.sh When I change that to RUNTIME=linux-arm64, it builds on a Jetson. There was a trick to getting dotnet setup too but that is the only one for GCM.
What is the goal here? I managed to build and install it on an ubuntu-22.04 arm64 server by changing the RUNTIME variable, as @AronRubin suggested, and then
git-credential-manager/src/linux/Packaging.Linux$ ./layout.sh
git-credential-manager/src/linux/Packaging.Linux$ ./pack.sh --version=2.4.1 --payload=/home/ubuntu/Projects/git-credential-manager/out/linux/Packaging.Linux/Debug/payload/ --symbols=/home/ubuntu/Projects/git-credential-manager/out/linux/Packaging.Linux/Debug/payload.sym
git-credential-manager/out/linux/Packaging.Linux/Debug/deb$ sudo dpkg -i gcm-linux_arm64.2.4.1.deb
I also did not need any trick for the dotnet setup. I simply installed dotnet-sdk-7.0
and dpkg-dev
.
Or are you looking fore easy cross compilation? What do you need to make an arm release?
What is the goal here?
Speaking for myself, a .deb
package for Raspberry Pi would be great. (#1117 was closed in favor of this issue.)
What is the goal here? I managed to build and install it on an ubuntu-22.04 arm64 server by changing the RUNTIME variable, as @AronRubin suggested, and then
git-credential-manager/src/linux/Packaging.Linux$ ./layout.sh git-credential-manager/src/linux/Packaging.Linux$ ./pack.sh --version=2.4.1 --payload=/home/ubuntu/Projects/git-credential-manager/out/linux/Packaging.Linux/Debug/payload/ --symbols=/home/ubuntu/Projects/git-credential-manager/out/linux/Packaging.Linux/Debug/payload.sym git-credential-manager/out/linux/Packaging.Linux/Debug/deb$ sudo dpkg -i gcm-linux_arm64.2.4.1.deb
I also did not need any trick for the dotnet setup. I simply installed
dotnet-sdk-7.0
anddpkg-dev
. Or are you looking fore easy cross compilation? What do you need to make an arm release?
Worked for me on Ubuntu 22.04! Published my build here: https://github.com/trueToastedCode/git-credential-manager/releases