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 a pre-comiled arm64 build #14474

Closed
Knight1 opened this issue May 14, 2017 · 25 comments
Closed

Make a pre-comiled arm64 build #14474

Knight1 opened this issue May 14, 2017 · 25 comments
Labels
Milestone

Comments

@Knight1
Copy link

Knight1 commented May 14, 2017

Problem

There is only a pre-compiled arm version for Terraform available the arm64/aarch64 versions is missing. I was able to build it with go 1.8.1 without any errors on a Thunder X.

Fix

Please make a pre-compiled arm64 version from Terraform available unter the download section.

Thanks!

Terraform Version

0.9.5

@Knight1
Copy link
Author

Knight1 commented May 15, 2017

Consul fixed it with this commit: hashicorp/consul@437222f

Vault with this: hashicorp/vault@7bce602

@apparentlymart
Copy link
Contributor

Hi @Knight1! Thanks for this request.

Right now we are doing some other release-engineering-type work internally, which will change how Terraform and its providers are built and packaged. Since there's already work underway there that we don't want to disrupt, we'll come back to this once the current tranche of work is done and see what it would take to do this under the new approach.

@vielmetti
Copy link

Thanks @apparentlymart - any sense for how the build reorg work is going, and what timeframe that is planned to appear in?

We are about to engage in some more work on improving the Terraform provider at Packet (which will touch the ARMv8 servers there, hence the continuing interest).

@necrose99
Copy link

I have @scaleway i can make a compile run.

@apparentlymart apparentlymart added build Auto-pinning and removed core labels Aug 13, 2018
@vielmetti
Copy link

Thanks @necrose99 - and thanks for following through on this.

@apparentlymart there are CI resources available at Packet for doing this, but I don't know your existing build environment well enough to suggest which of them might work best.

@necrose99
Copy link

necrose99 commented Aug 25, 2018

i'm just using Gentoo in a chroot on debian host
https://gpo.zugaina.org/Search?search=terraform
https://gitlab.com/chaoslab/chaoslab-overlay.git
https://github.com/samuelbernardo/ssnb-overlay
layman to add overlay , however eselect repository
app-admin/terraform-provider-libvirt
app-admin/terraform-provider-opennebula

emerge -av app-admin/terraform
after cleaning out tinderbox ,
long as i Dont need docker runing,,, it will build...

ebuild terraform-0.11.8.ebuild rpm will also spit out a redhat rpm ,
forcing it via alien a deb..
fakeroot alien --target=arm64 terraform-0.11.8-r0.aarch64.rpm

as being a src based distro /var/tmp and /usr/portage/package ""/distfiles start to fill up...

@necrose99
Copy link

dump of rpm spec , auto generated from ebuild rpm.... from gentoo ebuild...

scw-0321f9 /var/tmp/portage/app-admin/terraform-0.11.8/temp # ls
build.log  eclass-debug.log  environment  go-build201936607  logging  rpmbuild  terraform-0.11.8.spec
scw-0321f9 /var/tmp/portage/app-admin/terraform-0.11.8/temp # cat terraform-0.11.8.spec
Summary: A tool for building, changing, and combining infrastructure safely/efficiently
Name: terraform
Version: 0.11.8
Release: r0
License: GPL
Group: portage/app-admin
Source: terraform-0.11.8.tar.gz
%description
A tool for building, changing, and combining infrastructure safely/efficiently

https://www.terraform.io

%prep
%setup -c

%build

%install

%clean

%files
/
scw-0321f9 /var/tmp/portage/app-admin/terraform-0.11.8/temp #

@vielmetti
Copy link

@grubernaut what is the necessary to get this build of Terraform for arm64 into your main build system? We are hoping to target something for Hashiconf in October, and it looks like things work and are tested if the artifacts can be built.

@grubernaut
Copy link
Contributor

@vielmetti I'm not sure, as I haven't been an HC employee for almost a year now 😄. But @apparentlymart would likely be the best point of contact for this question.

@apparentlymart
Copy link
Contributor

Hi all,

I think the answer to this is similar to my answer in #18708. The summary is: a bunch of other stuff needs to be updated in order for a new architecture to be useful/supported.

Given this, I expect the most likely thing here would be that we hold on this for the moment and then make a set of supported-platform changes all at once so we can amortize that effort, probably also in conjunction with a forthcoming revamp of the build process for other reasons that is being driven by HashiCorp's internal engineering services team (and thus not something driven by the Terraform team's own planning/schedule.)

It is not likely that any new architectures will be officially supported before HashiConf in October, since all of the teams that would need to coordinate on this are occupied with other work.

@necrose99
Copy link

necrose99 commented Aug 30, 2018

https://github.com/ascherer/debbuild also can use the spec ebuild rpm autogenerated.

app-admin/terraform-provider-libvirt
app-admin/terraform-provider-opennebula
wont yet build.

@arno01
Copy link
Contributor

arno01 commented Oct 5, 2018

That would be useful, specifically for those running things like Samsung DeX.
Upd: arm 32-bit is working there just fine, have just tested it in Termux.
Upd2 you can build terraform directly on your Android device: CGO_ENABLED=1 GOOS=android GOARCH=arm64 go install ; this requires the latest osext to support android #19529

@vielmetti
Copy link

Ran into this again - any chance to update the build process to add one more architecture?

@vielmetti
Copy link

Just put in PR #21064 with the two-line patch to the build script that should make this work. (There's probably a documentation PR that will need to go in as well, but as a start...!)

@vielmetti
Copy link

A note that #21064 was closed as it was not sufficient to do what it requested here.

@vielmetti
Copy link

re-upping this issue for the new year

@ktham
Copy link

ktham commented Jul 3, 2020

I'd love to be able to run terraform on my Surface Pro X through WSL2 (which runs Ubuntu on aarch64 ), but there's no arm64 build 😢 . Also note that MacOS is also moving to ARM64 soon. I understand terraform has a more complicated release process than consul or vault, but we may want to prioritize the groundwork needed for this sooner rather than later 🙏

@necrose99
Copy link

necrose99 commented Jul 3, 2020

###Quick And dirty
https://github.com/gentoo-mirror/chaoslab/blob/master/app-admin/terraform/terraform-0.11.11.ebuild
(gentoo package , estially just bash scripts. eapi / more bash scripts/classes. )

results from above in RPM from good bit ago. terraform-0.11.8-r0.aarch64.zip

https://github.com/sakaki-/gentoo-on-rpi-64bit
an RPI3 or RPI4 32-gig or better Sd crad , 64 gigs meh i went 256 gig smasung long term wearing , I emerge ALOT..

layman -L && layman -a chaoslab
else eselect repository enable chaoslab

emerge -av app-shells/fish app-arch/alien
app-arch/alien , rpm dpkg etc will install with them .
ALEIN to make debs. or Slackware etc packages.
(emerge layman eselect-repository if required.)

###chaoslab added fish use dep.

cd /var/lib/layman/chaoslab/app-admin/terraform

or cd /var/db/repos/chaoslab/app-admin/terraform
(eselect repository / main gentoo repo hear too /var/db/repos)

ebuild terraform-0.11.11.ebuild {rpm,package,clean}
{rpm,package,merge.clean} merge will force add to gentoo host.. package reate gentoo binary package..

generation of rpmspec and aarch64 rpm /var/tmp/portage/app-admin/terraform...... vrsion etc RPMS , etc..
the non root demouser has thunar/xfce4 so bit of fishing..

##dh-make-golang
https://github.com/Debian/dh-make-golang created deps etc for Debian automatic packaging on **salsa. **
however bit less strait forward creates git repos , deb rules though however more involved..
however Teraform devs or Debian packagers can likewise add to autobuild.

@necrose99
Copy link

necrose99 commented Jul 3, 2020

dh-make-golang-terraform.log.txt
remote host atm i need to reboot and or add ssh keys. web-console to ssh term bit limited.

https://carlosbecker.com/posts/nfpm/

https://github.com/google/rpmpack

https://github.com/mh-cbon/go-bin-rpm

@rymcol
Copy link

rymcol commented Oct 15, 2020

Given the impending release of Apple Silicon darwin_arm64 and the use case of android_arm64 on things like the fold2, for me personally, this would be a very high priority. I am happy to contribute as well if there are any places that make sense outside of the internal build/release cycle.

@danieldreier
Copy link
Contributor

I wanted to draw everyone's attention to the fact that the latest beta has a linux arm64 build. Please try it out and let us know if you run into any issues with it!

@danieldreier danieldreier added this to the v0.14.0 milestone Oct 22, 2020
@rymcol
Copy link

rymcol commented Oct 26, 2020

Seems to run okay on Ubuntu for arm64 for me.

Just my personal thoughts:
My biggest targets (personally) are really darwin_arm64 (because of the impending Apple silicon, which I'm sure you are working on) and android_arm64 (which I am unsure if you have plans for, however with devices like the fold2 being essentially a 5G portable terminal with an 8 inch screen, this would be massively useful in my Ops life).

Android is kinda-sorta-mostly linux. The linux_arm64 binary doesn't run correctly for me inside of Android (I get connection refused to our cloud storage backend), but if you directly checkout the v0.14 branch and build it with go it does work (aside from having no available plugins in the registry).

@apparentlymart
Copy link
Contributor

Terraform CLI v0.14.0 is now available for linux_arm64 and we plan to continue to support that platform for the foreseeable future. As long as the providers you want to use also have linux_arm64 releases (which is true of several providers already) you should be able to use Terraform on arm64 Linux systems.

darwin_arm64 will probably follow in the not-too-distant future too, but for now I'd recommend using the darwin_amd64 builds under emulation on the new Apple hardware. As with linux_arm64, we must wait for a critical mass of providers to begin supporting the new platform before a Terraform CLI release on that platform would be useful, so we'll keep monitoring what the major providers are supporting and decide when to introduce darwin_arm64 support based on that.

We have no plans to support Android or any other operating systems on arm64 at this time.

@ghost
Copy link

ghost commented Jan 2, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants