Terraform: Building Terraform is no longer possible on Windows

Created on 14 Dec 2017  ยท  7Comments  ยท  Source: hashicorp/terraform

It is no longer possible to build Terraform on Windows, as the file paths have exceeded 255 characters when put in the default GOPATH with a relatively short username.

To wit:

C:\Users\James>go get github.com/hashicorp/terraform
go build github.com/hashicorp/terraform/vendor/github.com/terraform-providers/terraform-provider-aws/aws: C:\Go\pkg\tool\windows_amd64\compile.exe: fork/exec C:\Go\pkg\tool\windows_amd64\compile.exe: The filename or extension is too long.

There likely isn't much that can be done about this at this stage, but it might be worth noting in the README.

bug build upstream

Most helpful comment

Yup, we've never been able to build on windows, and that's the relevant Go issue.

I was hoping someone could get around to adapting Ian's suggestion of how GCC handles it to the Go toolchain soon. I really want to be able to unit test directly on windows as well.

All 7 comments

It may actually be this, rather than a path limitation: - https://github.com/golang/go/issues/18468

Yup, we've never been able to build on windows, and that's the relevant Go issue.

I was hoping someone could get around to adapting Ian's suggestion of how GCC handles it to the Go toolchain soon. I really want to be able to unit test directly on windows as well.

Looks like golang/go#18468 was merged upstream. During the next release of go, this issue can be closed.

Thanks for pointing that out @arizvisa, I was literally about to start work on a fix for this. Might be worth putting Appveyor CI on Terraform for a while with the Go RC at such time as it's available in a near-complete form.

I think we need to start with just a few canary packages that can pass on Appveyor. There's a lot of tests that weren't written to be cross platform and need to be updated.

FYI, the 0.12 work going on right now touches almost everything, so core is mostly frozen at the moment. Once we get the major refactoring work out of the way we can attack these tests, but in the meantime any test fixture changes are probably going to conflict with work in progress.

I'm going to close this issue. You can build terraform on windows these days (though you can't run the tests).

If there is still a question, I recommend the the community forum, where there are far more people available to help. If there is a bug or you would like to make a feature request, please open a new issue and fill out the template.
Thanks!

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rjinski picture rjinski  ยท  3Comments

ronnix picture ronnix  ยท  3Comments

franklinwise picture franklinwise  ยท  3Comments

rkulagowski picture rkulagowski  ยท  3Comments

larstobi picture larstobi  ยท  3Comments