I cross-compiled an executable (coded with Go) from a modern Mac M1 to an old MacBook and it works, but not if I wrap it in an app folder

Viewed 47

I cross-compiled an executable (coded with Go) as follows:

    GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build 

and it works (I can run the executable as such), but if I wrap the binary executable in an app folder, the I cannot run the app:

    ./App //works
    mkdir -p ${APP}.app/Contents/MacOS
    mv App App.app/Contents/MacOS/${APP}
    open App.app // Yields an error message

The error message I get when trying to run the app (containing the very same executable) seems to be (correctly or erroneously) related to the version of the MacOS on the old MacBook:

enter image description here

The old MacBook is:

enter image description here

My questions are:

  • Why is that ? (how does the OS check the version needed to run an app (where is the reference to an OS version in the App folder, it it a time-stamp of sorts))
  • Is there a way around that ?
0 Answers
Related