is not executable

98 views
Skip to first unread message

Allan Edwards

unread,
Aug 4, 2019, 11:37:10 AM8/4/19
to golang-nuts
I have written a small console application that has package main at the top and the program looks just like another console that runs successfully.  On both mac and windows I am getting a message stating the executable created is not executable.  Has anyone else seen this error?  I am on go 1.12.7.

Thanks!!!
Allan

Alexander Kapshuk

unread,
Aug 4, 2019, 11:44:12 AM8/4/19
to Allan Edwards, golang-nuts
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e1073a26-1288-40e2-b14e-bca0b926760d%40googlegroups.com.

Can you please run the command line below on your Mac and post the output:
file your_executable

Allan Edwards

unread,
Aug 4, 2019, 11:49:40 AM8/4/19
to golang-nuts
On windows it says that my executable is not compatible with windows 64-bit.  On mac, when I build the console from go tooling (outside of goland) the console will execute but crash.  So some progress.  This is my second issue with goland so far.  The go tooling seems solid but the goland might be doing something weird on the build.  


On Sunday, August 4, 2019 at 10:44:12 AM UTC-5, Alexander Kapshuk wrote:
On Sun, Aug 4, 2019 at 6:37 PM Allan Edwards <wallan...@gmail.com> wrote:
>
> I have written a small console application that has package main at the top and the program looks just like another console that runs successfully.  On both mac and windows I am getting a message stating the executable created is not executable.  Has anyone else seen this error?  I am on go 1.12.7.
>
> Thanks!!!
> Allan
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.

Allan Edwards

unread,
Aug 4, 2019, 11:50:45 AM8/4/19
to golang-nuts
I am sorry, ignore me, I figured it out.  Problem in goland configuration.   Thanks for the response.


On Sunday, August 4, 2019 at 10:44:12 AM UTC-5, Alexander Kapshuk wrote:
On Sun, Aug 4, 2019 at 6:37 PM Allan Edwards <wallan...@gmail.com> wrote:
>
> I have written a small console application that has package main at the top and the program looks just like another console that runs successfully.  On both mac and windows I am getting a message stating the executable created is not executable.  Has anyone else seen this error?  I am on go 1.12.7.
>
> Thanks!!!
> Allan
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.

Qais Patankar

unread,
Aug 4, 2019, 2:54:04 PM8/4/19
to Allan Edwards, golang-nuts
Please share the solution.

-- Qais

To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/ae81d542-1c3a-4322-b9b0-e07918b0a68b%40googlegroups.com.

Qais Patankar

unread,
Aug 4, 2019, 2:54:20 PM8/4/19
to golang-nuts
Please share the solution.

Allan Edwards

unread,
Aug 4, 2019, 2:57:03 PM8/4/19
to golang-nuts
Alright, so in goland, of which I love the ide and tooling, you have to setup a configuration to point to a go file that has package main in it.  When you point he goland configuration to a library (module/package) that is not executable, the tool will complain that your exe is in in the wrong format.  So I am being a newb on this issue but you live and learn.

Now, what would be more ideal is if the goland ide (which jetbrains needs to change) told you that your config was not pointed to an exe.
Reply all
Reply to author
Forward
0 new messages