# Compiling go binary for MacOS creates invalid executable

**URL:** <https://discuss.circleci.com/t/compiling-go-binary-for-macos-creates-invalid-executable/39542>\
**Category:** Bug Reports\
**Tags:** go, macos, golang\
**Created:** [March 25, 2021, 1:31am UTC](https://discuss.circleci.com/t/compiling-go-binary-for-macos-creates-invalid-executable/39542 "2021-03-25T01:31:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmmorris1975](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mmmorris1975/32/27016_2.png) [@mmmorris1975](https://discuss.circleci.com/u/mmmorris1975)\
**Post date:** [March 25, 2021, 1:31am UTC](https://discuss.circleci.com/t/compiling-go-binary-for-macos-creates-invalid-executable/39542/1 "2021-03-25T01:31:31Z")

</div>

I’m building a go project for multiple platforms in CircleCI, my Linux (Intel and ARM), and Windows jobs all create usable binaries as output, however when compiling for MacOS (darwin), an invalid binary is generated. The job executes without error, but when I download the resulting binary and attempt to run it on a Mac system, it immediately dies with `Killed 9`, no other output or core dump available.

Performing the same steps as the CircleCI job on my local Linux system generates a valid executable for the Mac.

If it helps, here’s the setup:  
Orb: go 1.5.0  
Executor: go/default Version: 1.16  
Link to particular section in config.yml: [aws-runas/config.yml at develop/3.0 · mmmorris1975/aws-runas · GitHub](https://github.com/mmmorris1975/aws-runas/blob/develop/3.0/.circleci/config.yml#L36)  
Link to CircleCI workflow execution: [https://app.circleci.com/pipelines/github/mmmorris1975/aws-runas/322/workflows/d393e94c-d420-420d-9fc4-e3a6217a3b90](https://app.circleci.com/pipelines/github/mmmorris1975/aws-runas/322/workflows/d393e94c-d420-420d-9fc4-e3a6217a3b90)

Not sure if there’s something I’m missing, or I’ve found an issue in CircleCI, or maybe I just need to move the Mac stuff over to a Mac executor.

Thanks!

---

<div class="post-metadata">

**Author:** ![owenjoliver](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/owenjoliver/32/28293_2.png) [@owenjoliver](https://discuss.circleci.com/u/owenjoliver)\
**Post date:** [May 18, 2022, 3:21pm UTC](https://discuss.circleci.com/t/compiling-go-binary-for-macos-creates-invalid-executable/39542/2 "2022-05-18T15:21:41Z")

</div>

Hello

We are following up on older tickets which may have been missed.

Would it be possible to raise a support ticket for this request?

An issue like this will take some time for our team to look into we will always recommend trying the latest version of any executors or orbs that you are using as this can resolve many issues.

Mac executors are also now available on all of our plans so if you do need to use a mac executor this is now possible.

Kind Regards  
Owen Oliver
