zig icon indicating copy to clipboard operation
zig copied to clipboard

zig build failure on MacOS aarch64 at "error: ToDo" in zig/src/link/MachO/DwarfInfo.zig

Open lordnoriyuki opened this issue 3 years ago • 3 comments

Zig Version

0.10.0-dev.4543+c1d44f73a

Steps to Reproduce

zig build fails on my project

Expected Behavior

zig build completes successfully.

Actual Behavior

zig build fails with

error: ToDo

during build-exe.

It fails at https://github.com/ziglang/zig/blob/54c8861bc4b6aa08a2252943c93317d91ef0bfa6/src/link/MachO/DwarfInfo.zig#L427 on the else block of the switch on form within fn findFormSize(self: DwarfInfo, form: u64, di_off: usize, cuh: CompileUnit.Header) !usize

If I add some logging to see what form is, I get 0xc corresponding to https://github.com/ziglang/zig/blob/54c8861bc4b6aa08a2252943c93317d91ef0bfa6/lib/std/dwarf/FORM.zig#L11

This build used to succeed before the changes in https://github.com/ziglang/zig/pull/13260.

lordnoriyuki avatar Oct 23 '22 02:10 lordnoriyuki

Would you mind providing a link to a repro? It would speed things up a lot if you did.

kubkon avatar Oct 23 '22 13:10 kubkon

Also, if you could provide details about your host, that would be helpful too.

EDIT: I see you did mention it's on aarch64 macOS but you embedded it in the title which I missed, apologies for that!

kubkon avatar Oct 23 '22 13:10 kubkon

I have just submitted a PR that should hopefully fix your issue in #13274. If you confirm it actually did indeed solve your issue, I'd be very grateful!

kubkon avatar Oct 23 '22 14:10 kubkon

Confirmed the changes work for my project. Thank you for the really quick fix!

Apologies for the lack of reproducible case. It's a large non-public project. I figured I'd file it and then try and get a minimal reproducible test case, but I hoped that it was fixable without it since the case just wasn't implemented yet.

lordnoriyuki avatar Oct 23 '22 18:10 lordnoriyuki