Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to build for ARM #606

Closed
ankitbko opened this issue Jan 9, 2022 · 13 comments · Fixed by #1633
Closed

Make it easier to build for ARM #606

ankitbko opened this issue Jan 9, 2022 · 13 comments · Fixed by #1633
Assignees
Labels
enhancement New feature or request good-first-issue A good issue or enhancement for a first time contributor
Milestone

Comments

@ankitbko
Copy link

ankitbko commented Jan 9, 2022

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.

@ankitbko ankitbko added the enhancement New feature or request label Jan 9, 2022
@mjcheetham mjcheetham added the good-first-issue A good issue or enhancement for a first time contributor label Mar 16, 2022
@surya-prakash-susarla
Copy link

@mjcheetham I would like to work on this issue. Please let me know if this is alright and any pointers to get started.

@ldennington
Copy link
Contributor

ldennington commented Apr 12, 2022

@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.

@surya-prakash-susarla
Copy link

thanks @ldennington , I'll try to find some time and close this.

@surya-prakash-susarla
Copy link

@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.

@ldennington
Copy link
Contributor

@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?

@surya-prakash-susarla
Copy link

@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.

@ldennington
Copy link
Contributor

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!

@AronRubin
Copy link

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.

@NicoDietrich
Copy link

NicoDietrich commented Nov 23, 2023

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?

@haukex
Copy link

haukex commented Nov 24, 2023

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.)

@trueToastedCode
Copy link

trueToastedCode commented Jan 28, 2024

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?

Worked for me on Ubuntu 22.04! Published my build here: https://github.com/trueToastedCode/git-credential-manager/releases

@FraH90
Copy link

FraH90 commented Aug 11, 2024

Are there any news on the build for raspberry pi OS?
It's very difficult to configure git credential manager for this system.
I've been successful to build it, but all the binaries are in certain subfolders, in out/shared/nameofcomponent/bin/Release/net8.0

How to generate a folder layout that permit installation after build?

@mjcheetham mjcheetham assigned mjcheetham and unassigned ldennington Nov 5, 2024
@mjcheetham
Copy link
Collaborator

As of #1633 support for building on Linux for ARM has been added to the default branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue A good issue or enhancement for a first time contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants