Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
This repository was 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

Description

@erpalma

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```

Activity

  1. erpalma commented on Aug 29, 2017

    @erpalma
    Author

    Just tested with 1.8.3, no problems!

  2. 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[/+] on Aug 29, 2017
  3. 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: _[/+] on Aug 29, 2017
  4. escholtz commented on Sep 22, 2017

    @escholtz

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions