hermetic_cc_toolchain icon indicating copy to clipboard operation
hermetic_cc_toolchain copied to clipboard

Draft: Attempt at Mac OS compilation

Open chrisirhc opened this issue 1 year ago • 5 comments

Attempt to get a working macos branch. This is a continuation of the work in https://github.com/motiejus/hermetic_cc_toolchain/tree/macos .

NOTE: I have no idea what I'm doing. I'm piecing together the previous threads about sysroot from the readme. I have no idea what the zig or gcc options mean.

There are a number of hacks in this branch, so this is still WIP.

TODOs:

  • [ ] Commits are messy and aren't yet cleaned up for review
  • [ ] Identify what's hacky/needs to be removed
  • [ ] Verify the options
  • [ ] Test with more use cases

Fixes #10

chrisirhc avatar Jun 16 '24 13:06 chrisirhc

@chrisirhc nice work so far! Happy to help test this when ready.

pcj avatar Jun 30 '24 17:06 pcj

Realized that hexops is an incomplete sysroot, so I went with unpacking a pkg. Now I'm hitting:

external/go_sdk/pkg/tool/darwin_amd64/link: running external/hermetic_cc_toolchain~~toolchains~zig_sdk/tools/aarch64-macos-sdk.14.4/c++ failed: exit status 1
error: symbol _runtime.covctrs not attached to any (sub)section
    note: while parsing /var/folders/rg/8yzx68lj705cjn8q0pzxv59w0000gn/T/go-link-1625103760/go.o

link: error running subcommand external/go_sdk/pkg/tool/darwin_amd64/link: exit status 2

I believe it's the issue reported in https://github.com/ziglang/zig/issues/20243

But I guess this is progress.

chrisirhc avatar Jul 11 '24 13:07 chrisirhc

Hi @chrisirhc - just wondering whether you're still working on this? Or would you be open to someone else picking up from here? (not necessarily me!)

jvolkman avatar Jan 22 '25 05:01 jvolkman

Hi @chrisirhc - just wondering whether you're still working on this? Or would you be open to someone else picking up from here? (not necessarily me!)

I'm not actively working on this. It's currently in a stuck state. I'm not sure what to try. Definitely open to someone else picking it up from here.

chrisirhc avatar Jan 22 '25 08:01 chrisirhc

To note: https://news.ycombinator.com/item?id=43268431 mentions https://github.com/tpoechtrager/osxcross

chrisirhc avatar Mar 17 '25 07:03 chrisirhc