Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Go 1.9: exporter: variable/function exported but not defined: _ #378

Closed
erpalma opened this issue Aug 28, 2017 · 2 comments
Closed

Go 1.9: exporter: variable/function exported but not defined: _ #378

erpalma opened this issue Aug 28, 2017 · 2 comments

Comments

@erpalma
Copy link

erpalma commented Aug 28, 2017

Hello, I've got this error when trying the hello world test. Go 1.9 on Gentoo, tomorrow I'll try with 1.8.

<autogenerated>:1:0: cannot use _ as value
<autogenerated>:1:0: internal compiler error: exporter: variable/function exported but not defined: _

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
        /usr/lib/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xb701bc, 0x38, 0xc423833490, 0x1, 0x1)
        /usr/lib/go/src/cmd/compile/internal/gc/subr.go:181 +0x230
cmd/compile/internal/gc.(*exporter).obj(0xc423833628, 0xc420065860)
        /usr/lib/go/src/cmd/compile/internal/gc/bexport.go:491 +0x70d
cmd/compile/internal/gc.export(0xc42516dd40, 0x0, 0x0)
        /usr/lib/go/src/cmd/compile/internal/gc/bexport.go:347 +0x723
cmd/compile/internal/gc.dumpexport()
        /usr/lib/go/src/cmd/compile/internal/gc/export.go:253 +0x8a
cmd/compile/internal/gc.dumpobj1(0x7ffe2d6a05fa, 0x1e, 0x3)
        /usr/lib/go/src/cmd/compile/internal/gc/obj.go:95 +0xa5d
cmd/compile/internal/gc.dumpobj()
        /usr/lib/go/src/cmd/compile/internal/gc/obj.go:51 +0x61
cmd/compile/internal/gc.Main(0xb73f90)
        /usr/lib/go/src/cmd/compile/internal/gc/main.go:631 +0x2652
main.main()
        /usr/lib/go/src/cmd/compile/main.go:49 +0x95

make: *** [Makefile:216: build/pkg/linux_amd64/grumpy.a] Error 1```
@erpalma
Copy link
Author

erpalma commented Aug 29, 2017

Just tested with 1.8.3, no problems!

@erpalma erpalma changed the title Internal compiler error: exporter: variable/function exported but not defined: _ Internal compiler error: exporter: variable/function exported but not defined: _ with Go 1.9 Aug 29, 2017
@erpalma erpalma changed the title Internal compiler error: exporter: variable/function exported but not defined: _ with Go 1.9 Go 1.9: exporter: variable/function exported but not defined: _ Aug 29, 2017
@escholtz
Copy link

This issue appears to be caused by the const _ = declarations. Replacing the underscores with a dummy name allows the compiler to succeed. However, probably need verification from library authors that the previous behavior is still preserved. #381

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@trotterdylan @escholtz @erpalma and others