You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Weird enough the resulting file is actually not executable even after chmod +xing.
It seems like the binary is treated as a script:
/Users/ahmetb/go/bin/probe: line 1: syntax error near unexpected token `newline'
/Users/ahmetb/go/bin/probe: line 1: `!<arch>'
ahmetb
changed the title
cmd/go: result of 'go build -o' is missing the executable bit
cmd/go: result of 'go build -o' is missing the executable bit, and the resulting file does not execute (despite adding +x)
Aug 27, 2019
Very likely this is an issue with my set up, but I cannot figure out what is going on.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not sure about the tip, go1.12.9 is the latest available release on Homebrew for macOS.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
GOPATH unset, have a very simple program:
Observe the executable file is
0644/-rw-r--r--
.I don't think my shell somehow magically got some umask that's causing files to be marked as non-executable.
What did you expect to see?
The file created from
go build -o
should have +x bits set.What did you see instead?
The resulting file from
go build -o
executable file is0644/-rw-r--r--
.The text was updated successfully, but these errors were encountered: