-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Interpreted Go exec format error #694
Comments
Hey @aaronedell - thanks for opening this. I'll look into what's going on with it. |
Thanks. My guess is it's probably something INSIDE the computer that's causing the problem. Hope that helps. |
@aaronedell thanks, we'll start there. |
A friend of mine was asking how its going? |
The only idea I have is to explicitly notice that it's a |
@leaanthony @ianfoo Have you seen anything like this before? |
Multiple Go versions and wrong one on path for Arch? -x usually the culprit. |
I forgot to mention, I'm on go version go1.12.3 darwin/amd64 |
@aaronedell it might be worth trying a more up-to-date version of Go, just in case, but I doubt that's it. |
Yeah I tried that :( sadly no such luck
… On May 1, 2021, at 2:35 AM, Mat Ryer ***@***.***> wrote:
@aaronedell it might be worth trying a more up-to-date version of Go, just in case, but I doubt that's it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi, BTW: is ok having Thanks |
@leaanthony Do you have any ideas about this? It's stumped me. As far as I know, there should be no reason why this isn't working. Does the exec stuff in Go work differently to running it in a terminal?! |
If you don't mind spawning an extra process, starting it from a shell might be a solution: Edit: Ah, just noticed you got some good feedback on Twitter already. My bad, I might have jumped too eagerly on this nice little puzzle. Anyway, I learned some stuff, so I'm happy. |
Hoi there. Sorry to barge in and everything but was there any update on a workaround here? |
Hi John, as a workaround, I started putting my go scripts in a As an example,
Which would run Edit: I'd like to point out that the workaround I mentioned is flawed too. According to the docs, the name of the plugin should be in the form |
What's the real fix here? The |
Hi Lea, the reason it worked, is because of the shebang. Upon executing the file, the kernel inspects the shebang and runs The |
For those still looking for a solution: If you can live with some trade-offs then gorun might be what you're looking for. With
|
This seems the only solution works so far, on macos. On Linux, there is an more reliable alternative: https://blog-cloudflare-com.webpkgcache.com/doc/-/s/blog.cloudflare.com/using-go-as-a-scripting-language-in-linux/ |
I have a Go file that starts with:
//path/to/go run $0 $@; exit
In the plugin browser, it looks good, all the metadata is interpreted correctly and the variable shows up editable as expected, but the plugin won't run. I get the error fork/exec ./001-myplugin.1h.go: exec format error.
When I run the plugin in the terminal with ./ it runs fine. I've run chmod +X as well, still getting the error.
The text was updated successfully, but these errors were encountered: