Re: [go-nuts] Cross-compiling error for runtime package in go1.9.4 (works in go1.9.2)
Yes, without setting GOROOT was how I initially ran into this problem. I double checked with printenv GOROOT to make sure it wasn't set. I've wiped and reinstalled both my go installation (Archlinux package go 1.9.4) and GOPATH to the same result. I tried to isolate the problem further by using go build instead of gb. The issue is only present with gb so I will post a GitHub issue about that. Thanks for taking the time to respond. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Cross-compiling error for runtime package in go1.9.4 (works in go1.9.2)
On Mon, Feb 12, 2018 at 7:44 PM, Matt R. wrote: > > I have a simple way to reproduce this with GOROOT defined for each golang > version. > > Install gb. https://getgb.io/ > Create a project with the structure: > > src > > app > > main.go (fill with contents of runtime example from documentation > https://golang.org/pkg/runtime/#example_Frames) > > Download a fresh copy of go 1.9.2 and 1.9.4 > Compare these builds: > > GOROOT=/path/to/go1.9.2 CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 gb build > > Works! > > GOROOT=/path/to/go1.9.4 CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 gb build > > Fails! The error is new with Go 1.9.4, so that aspect is not surprising. It's part of the security fixes that triggered the 1.9.4 release. Can you recreate the problem *without* setting GOROOT in the environment? The most likely cause is a mismatch between GOROOT in the environment and the GOROOT used by the go program on your PATH. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Cross-compiling error for runtime package in go1.9.4 (works in go1.9.2)
I have a simple way to reproduce this with GOROOT defined for each golang version. 1. Install gb. https://getgb.io/ 2. Create a project with the structure: - src - app - main.go (fill with contents of runtime example from documentation https://golang.org/pkg/runtime/#example_Frames) 1. Download a fresh copy of go 1.9.2 and 1.9.4 2. Compare these builds: 1. *GOROOT=/path/to/go1.9.2 CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 gb build* - Works! 2. *GOROOT=/path/to/go1.9.4 CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 gb build* - Fails! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Cross-compiling error for runtime package in go1.9.4 (works in go1.9.2)
On Sun, Feb 11, 2018 at 1:00 PM, wrote: > > I'm building a package that depends on Go's runtime package. Using the > following compilation flags: > > CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 > > I get a successful compilation using go1.9.2. After updating to go1.9.4, I > get the following error and compilation stops: > > # runtime > cgo.go:9:3: //go:cgo_export_static main only allowed in cgo-generated code > > I'm running on Linux/amd64. Anybody else hitting this error? I can't recreate this problem. Do you have GOROOT set in the environment? Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.