Skip to content
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

Shellscript compiled on macOS 10.15 does not work on 10.14 although the -r option was used #113

Closed
tofi86 opened this issue Jul 14, 2020 · 3 comments

Comments

@tofi86
Copy link

tofi86 commented Jul 14, 2020

Hi,

first, let me thank you for this wonderful project!

I'm using it to compile a Shellscript as a binary launcher script for a Mac app. I tested on macOS 10.14 and the compiled script worked well on macOS 10.15 when I used the shc -r commandline option.
Next I tried it the other way round: I built on macOS 10.15 but then I wasn't able to use it on macOS 10.14 – although the -r option was used.

macOS is displaying a system dialog (sorry, german) that tells that the programm requires macOS 10.15 to run.

Bildschirmfoto 2020-07-13 um 23 12 13

Is there anything I can do about it? Anythin you could fix on your side?

Thanks!

Best regards,
Tobias

@neurobin
Copy link
Owner

neurobin commented Jul 14, 2020

you have to compile on lower versions always if you care about compatibility. compiled binaries depend on some system dynamic libs which are different in different versions. Later versions can backword support the older versions, but older versions can never forward support future unknown versions. Thus, when you compile with the latest version of something, it will be an unknown entity to the older version (this theory does not apply everywhere though).

@tofi86
Copy link
Author

tofi86 commented Jul 14, 2020

Thanks for your quick answer!

I was kinda expecting this, but maybe there would have been a way... 🤷‍♂️

I guess I have to find a new solution to my issues because GitHub Actions CI is only offering macOS 10.15 as a build platform...

@nljohnson
Copy link

@tofi86 Not sure why the kind folks here were unable to help you. There is actually an easy solution for this. Prepend your shc command with CC="clang -mmacosx-version-min=10.10" - to inform the compiler to make the executable compatible with macos 10.10... or whatever your min macos target might be. Your command ultimately would be CC="clang -mmacosx-version-min=10.10" shc -r -f universalJavaApplicationStub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants