Here's a program that empty imports every std package:
https://play.golang.org/p/AgKFdQv1pDV
It runs fine locally on linux/amd64 (13MB binary, 344KB heap alloc), but fails to even compile on the playground.
I get:
.dynsym: missing Go type information for global symbol: size 60
go.link.addmoduledata: relocation target runtime.addmoduledata not defined
_cgo_notify_runtime_init_done: relocation target x_cgo_notify_runtime_init_done not defined
_cgo_thread_start: relocation target x_cgo_thread_start not defined
runtime.cgo_yield: relocation target _cgo_yield not defined
.dynsym: relocation target _cgo_topofstack not defined
go.link.addmoduledatainit: phase error: addr=0x74db81 but sym=0x0 type=29
/cc @andybons @ianlancetaylor
The problem is the runtime/cgo package. This program fails to compile in the playground:
package main
import _ "runtime/cgo"
func main() {
}
Removing runtime/cgo from the first example still has a build failure on the playground:
go.link.addmoduledata: relocation target runtime.addmoduledata not defined
go.link.addmoduledatainit: phase error: addr=0x74db41 but sym=0x0 type=29
That's another bug from the plugin package, reproducible with:
package main
import _ "plugin"
func main() {
}
Nice sleuthing. With those two notched out it works: https://play.golang.org/p/BbmnOc0m2Vc
Thanks. Let's still keep this open until we either fix or make the error message better.
Most helpful comment
The problem is the
runtime/cgopackage. This program fails to compile in the playground:https://play.golang.org/p/upwjplNDZos