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
Closed

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

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

Comments

@josharian
Copy link
Contributor

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
Copy link
Member

minux commented May 28, 2015 via email

@josharian
Copy link
Contributor Author

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
Copy link
Member

minux commented May 28, 2015 via email

@josharian
Copy link
Contributor Author

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
Copy link

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

@golang golang locked and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants