Closed kb-0 closed 4 years ago
@kb-0 I think it's because stringer
doesn't support Go modules yet (marked Beta). It's used in many source files (search for //go:generate stringer
).
Workaround this with
GO111MODULE=on go install .
either in $GOPATH/src/github.com/hashicorp/terraform
or outside it. Then
$GOPATH/bin/terraform version
should output Terraform v0.12.0-dev
.
At the time this was opened we were in the middle of merging the 0.12 changes which included the switch to Go Modules, and so the build scripts + makefile hadn't yet been updated completely to deal with Go Modules.
Since then we've made various updates that have result in the workflow steps working for us and for running in Travis-CI. Unfortunately as @Dominik-K mentioned there's some complexity here because some tools support Go Modules while others don't, and so we've selectively enabled/disabled modules in various places to get things working. It is likely that further adjustments will be required over time as different parts of the Go ecosystem become modules-aware.
I found out that the wasm files that redeclare its functions, which get conflicts with other arc declaration(my arch was x86). I commented out the code in /usr/local/go/src/runtime/sys_wasm.go and /usr/local/go/src/runtime/internal/atomic/atomic_wasm.go, after which my stringer works normally.
My go version was 1.11
Hello again!
We didn't hear back from you, so I'm going to close this in the hope that a previous response gave you the information you needed. If not, please do feel free to re-open this and leave another comment with the information my human friends requested above. 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.
Terraform Version
Expected Behavior
Successful compilation of latest Terraform source using Golang 1.11.*.
Actual Behavior
Steps to Reproduce
$PATH
and$GOPATH
accordinglyAdditional Context
I have tested this with
golang 1.11.1
and1.11.2
as well asGO111MODULE=on
,GO111MODULE=off
andGO111MODULE=auto
(not explicitly set).After 3 hours of trial and error I am now at a loss. Does someone have an idea what is going on here?