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

Compiled shc not working on M2 Pro CPU #158

Open
edtrud opened this issue Oct 3, 2023 · 2 comments
Open

Compiled shc not working on M2 Pro CPU #158

edtrud opened this issue Oct 3, 2023 · 2 comments

Comments

@edtrud
Copy link

edtrud commented Oct 3, 2023

I compiled the bash executable on an intel Mac and had no issues running on other intel mac, M1, M2 processor macs. When I run the executable on an M2 Pro I receive the error:

unable to execute ./myprogram: Bad CPU type in executable

@Spritzerland
Copy link

shc converts the executable to an x86-64 architecture

@mdeweerd
Copy link

If it's related to a 32bit/64bit architecture, know that you can set compiler flags in the environment. (CFLAGS/LDDFLAGS/...). So then you could set -m32 (I believe that's the option) to compile.

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