Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/link: too many error messages when missing func main #10978

Closed
josharian opened this issue May 28, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@josharian
Copy link
Contributor

commented May 28, 2015

With tip:

$ echo "package main" > m.go
$ go build m.go
# command-line-arguments
runtime.main: call to external function main.main
runtime.main: main.main: not defined
runtime.main: undefined: main.main

With 1.4, there were at least only two; the "call to external function" didn't show up. One would be enough, maybe even one that addresses this fairly special situation head on.

Low priority.

@josharian josharian added this to the Unplanned milestone May 28, 2015

@minux

This comment has been minimized.

Copy link
Member

commented May 28, 2015

@josharian

This comment has been minimized.

Copy link
Contributor Author

commented May 28, 2015

I don't know. Maybe, if -complete has been passed. (Although who writes a main function in assembly?) Or perhaps there are crazy, non-obvious uses in the dynamic linking world?

@minux

This comment has been minimized.

Copy link
Member

commented May 28, 2015

@josharian

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2018

See also #24809. The goal there, which dovetails with this issue, is to make it easier to diagnose the problem when you forget to have a func main.

@josharian josharian modified the milestones: Unplanned, Go1.11 Apr 11, 2018

@gopherbot

This comment has been minimized.

Copy link

commented May 21, 2018

Change https://golang.org/cl/113955 mentions this issue: cmd/link: fix duplicated "undefined reloc" errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.