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

CI produces MacOS aarch64 binaries only #1388

Open
bentxt opened this issue Aug 27, 2024 · 3 comments
Open

CI produces MacOS aarch64 binaries only #1388

bentxt opened this issue Aug 27, 2024 · 3 comments
Labels
Build issue Issue building c3c

Comments

@bentxt
Copy link

bentxt commented Aug 27, 2024

System

> sw_vers
ProductName:		macOS
ProductVersion:		14.6.1
BuildVersion:		23G93
> machine
x86_64h

Installation Steps and Error

wget https://github.com/c3lang/c3c/releases/download/latest/c3-macos.zip
unzip c3-macos.zip
cd macos/
./c3c
exec: Failed to execute process './c3c': Bad CPU type in executable.
@bentxt
Copy link
Author

bentxt commented Aug 27, 2024

PS.: The c3c binary produced when building from scratch (cmake build) works

@bentxt
Copy link
Author

bentxt commented Aug 27, 2024

I think I found the error, the binary provided is only for ARM

> cd c3/macos
> file c3c
c3c: Mach-O 64-bit executable arm64

> objdump -x --macho ./c3c | grep -A1 cputype
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64   ARM64        ALL  0x00     EXECUTE    28       2664   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK PIE MH_HAS_TLV_DESCRIPTORS

@lerno
Copy link
Collaborator

lerno commented Aug 27, 2024

Yes, the CI unfortunately only builds the aarch64 binaries, and worse – it's because it relies on Homebrew which will only give you no-fat LLVM libraries. That means there is no trivial way to cross compile it. However, Homebrew will update with the latest C3 binaries usually and it's fairly straightforward to compile on one's own. I'd like to offer a wide range of precompiled binaries, but that means setting up quite a bit of infrastructure to compile everything. Unless someone picks up that task soon, it unfortunately will just have to wait.

@lerno lerno added the Build issue Issue building c3c label Aug 27, 2024
@lerno lerno changed the title Latest Binary on Macos not running, Bad CPU type in executable CI produces MacOS aarch64 binaries only Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build issue Issue building c3c
Projects
None yet
Development

No branches or pull requests

2 participants