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
plugin: runtime.main_main·f: undefined: "main.main"(buildmode=plugin) #20312
Comments
@bradfitz |
No clue. |
@bradfitz go version go1.8 linux/amd64 cd main/ |
You have 2 main functions defined in your main package. I was getting a similar error when I had none defined in a |
In my case I had not defined a function called main i.e. |
command-line-argumentsruntime.main_main·f: relocation target main.main not defined |
golang/go#20312 License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This is related to golang/go#20312, which causes plugin main packages to fail tests. We don't have very well-tested code in general, so I'm not that worried about skipping these packages.
@jimmiebtlr |
my hot-update based on plugin for go has succeeded! ^ ^ |
It sounds like this was resolved when you added (If I misunderstood this issue, please comment and I'll reopen it.) |
You need to add |
Hello I've a same this problem. |
@KubisGroup Please ask questions on a forum; see https://golang.org/wiki/Questions. You will get a better and faster response. When asking your question please explain exactly what you are doing and exactly what happens. Thanks. |
I came across the same issue when I executed |
I hit this error when I accidentally defined |
In order to solve following exception in `go test` runtime.main_main·f: relocation target main.main not defined runtime.main_main·f: undefined: "main.main" Can refer to golang/go#20312
In order to solve following exception in `go test` runtime.main_main·f: relocation target main.main not defined runtime.main_main·f: undefined: "main.main" Can refer to golang/go#20312
I want to build a plugin for my program, and the main content is ...
The package "mylib" is a package of my defined, when I import it and then build it, the error will occur ...
why? Thanks a lot!
The text was updated successfully, but these errors were encountered: