Syndica / sig

a Solana validator client implementation written in Zig
https://syndica.io/sig
Apache License 2.0
214 stars 34 forks source link

Compilation via zig build failing #112

Closed psymark closed 7 months ago

psymark commented 7 months ago

Description

I cloned the repo and ran zig build. I get the following error: image

If I comment out the fuzz target from the build.zig file the compilation succeeds.

Commit hash: c8fa17b762cab70f6e2c9a14577c140cd264b5fc

Not sure if related, but the fuzz.zig file is referencing NonBlockingChannel from sync/channel.zig, but on the most recent main there is no such symbol.

How to Reproduce the Bug

Fetch most recent main and issue zig build command

Additional Context

My OS: Ubuntu 22.04 Compiler: Zig 0.11.0 Compiler downloaded via zigup Commit hash: c8fa17b762cab70f6e2c9a14577c140cd264b5fc

dnut commented 7 months ago

Weird. zig build works fine for me in ubuntu 22.04 with zig 0.11.0.

Are you literally running exactly zig build or have you provided some other cli args?

Could you please share the full output text?

psymark commented 7 months ago

Weird, I am just running zig build, with no additional flags. I just ran zig build with -Doptimize=ReleaseFast and the build was successful... It might be that I have a broken compiler. Can you check that you are for sure not building in release mode? Here is the output for default zig build (no flags):

/home/sinisa/zig/0.11.0/files/zig build-exe /home/sinisa/work/sig/src/benchmarks.zig --cache-dir /home/sinisa/work/sig/zig-cache --global-cache-dir /home/sinisa/.cache/zig --name benchmark --mod zig-network::/home/sinisa/.cache/zig/p/1220fe0d4ca564aa15f3fd7f9f84ba04e031bb70c3a1432257e0d35c74b183550c24/network.zig --mod base58-zig::/home/sinisa/.cache/zig/p/1220227d746ee3f156059a22b0044c6d8ad062a7cfb15b060cc2e7cbae4d0631f34e/src/lib.zig --mod zigdig::/home/sinisa/.cache/zig/p/1220dfdb3089dfe9a4e4bc1226fcff08d91d0c0853f287d98d8b81270da251790331/src/lib.zig --mod httpz::/home/sinisa/.cache/zig/p/122004f74adf46001fe9129d8cec54bd4a98895ce89f0897790e13b60fa99e527b99/src/httpz.zig --mod getty::/home/sinisa/.cache/zig/p/12209398657d260abcd6dae946d8da4cd3057b8c7990608476a9f8011aae570d2ebb/src/getty.zig --mod zig-cli::/home/sinisa/.cache/zig/p/122044525df0d1896556da08c5ed50b456a672a52ab86a65834bb1e27d3ae7a847f2/src/main.zig --deps base58-zig,zig-network,zig-cli,getty,httpz,zigdig --main-pkg-path /home/sinisa/work/sig/src --listen=- /home/sinisa/zig/0.11.0/files/zig build-exe /home/sinisa/work/sig/src/gossip/fuzz.zig --cache-dir /home/sinisa/work/sig/zig-cache --global-cache-dir /home/sinisa/.cache/zig --name fuzz --mod zig-network::/home/sinisa/.cache/zig/p/1220fe0d4ca564aa15f3fd7f9f84ba04e031bb70c3a1432257e0d35c74b183550c24/network.zig --mod base58-zig::/home/sinisa/.cache/zig/p/1220227d746ee3f156059a22b0044c6d8ad062a7cfb15b060cc2e7cbae4d0631f34e/src/lib.zig --mod zigdig::/home/sinisa/.cache/zig/p/1220dfdb3089dfe9a4e4bc1226fcff08d91d0c0853f287d98d8b81270da251790331/src/lib.zig --mod httpz::/home/sinisa/.cache/zig/p/122004f74adf46001fe9129d8cec54bd4a98895ce89f0897790e13b60fa99e527b99/src/httpz.zig --mod getty::/home/sinisa/.cache/zig/p/12209398657d260abcd6dae946d8da4cd3057b8c7990608476a9f8011aae570d2ebb/src/getty.zig --mod zig-cli::/home/sinisa/.cache/zig/p/122044525df0d1896556da08c5ed50b456a672a52ab86a65834bb1e27d3ae7a847f2/src/main.zig --deps base58-zig,zig-network,zig-cli,getty,httpz,zigdig --main-pkg-path /home/sinisa/work/sig/src --listen=- /home/sinisa/zig/0.11.0/files/zig build-exe /home/sinisa/work/sig/src/main.zig --cache-dir /home/sinisa/work/sig/zig-cache --global-cache-dir /home/sinisa/.cache/zig --name sig --mod zig-network::/home/sinisa/.cache/zig/p/1220fe0d4ca564aa15f3fd7f9f84ba04e031bb70c3a1432257e0d35c74b183550c24/network.zig --mod base58-zig::/home/sinisa/.cache/zig/p/1220227d746ee3f156059a22b0044c6d8ad062a7cfb15b060cc2e7cbae4d0631f34e/src/lib.zig --mod zigdig::/home/sinisa/.cache/zig/p/1220dfdb3089dfe9a4e4bc1226fcff08d91d0c0853f287d98d8b81270da251790331/src/lib.zig --mod httpz::/home/sinisa/.cache/zig/p/122004f74adf46001fe9129d8cec54bd4a98895ce89f0897790e13b60fa99e527b99/src/httpz.zig --mod getty::/home/sinisa/.cache/zig/p/12209398657d260abcd6dae946d8da4cd3057b8c7990608476a9f8011aae570d2ebb/src/getty.zig --mod zig-cli::/home/sinisa/.cache/zig/p/122044525df0d1896556da08c5ed50b456a672a52ab86a65834bb1e27d3ae7a847f2/src/main.zig --deps base58-zig,zig-network,zig-cli,getty,httpz,zigdig --listen=- /home/sinisa/zig/0.11.0/files/zig build-lib /home/sinisa/work/sig/src/lib.zig --cache-dir /home/sinisa/work/sig/zig-cache --global-cache-dir /home/sinisa/.cache/zig --name sig -static --mod zig-network::/home/sinisa/.cache/zig/p/1220fe0d4ca564aa15f3fd7f9f84ba04e031bb70c3a1432257e0d35c74b183550c24/network.zig --mod base58-zig::/home/sinisa/.cache/zig/p/1220227d746ee3f156059a22b0044c6d8ad062a7cfb15b060cc2e7cbae4d0631f34e/src/lib.zig --mod zigdig::/home/sinisa/.cache/zig/p/1220dfdb3089dfe9a4e4bc1226fcff08d91d0c0853f287d98d8b81270da251790331/src/lib.zig --mod httpz::/home/sinisa/.cache/zig/p/122004f74adf46001fe9129d8cec54bd4a98895ce89f0897790e13b60fa99e527b99/src/httpz.zig --mod getty::/home/sinisa/.cache/zig/p/12209398657d260abcd6dae946d8da4cd3057b8c7990608476a9f8011aae570d2ebb/src/getty.zig --mod zig-cli::/home/sinisa/.cache/zig/p/122044525df0d1896556da08c5ed50b456a672a52ab86a65834bb1e27d3ae7a847f2/src/main.zig --deps base58-zig,zig-network,zig-cli,getty,httpz,zigdig --listen=- zig build-exe fuzz Debug native: error: the following command terminated unexpectedly: /home/sinisa/zig/0.11.0/files/zig build-exe /home/sinisa/work/sig/src/gossip/fuzz.zig --cache-dir /home/sinisa/work/sig/zig-cache --global-cache-dir /home/sinisa/.cache/zig --name fuzz --mod zig-network::/home/sinisa/.cache/zig/p/1220fe0d4ca564aa15f3fd7f9f84ba04e031bb70c3a1432257e0d35c74b183550c24/network.zig --mod base58-zig::/home/sinisa/.cache/zig/p/1220227d746ee3f156059a22b0044c6d8ad062a7cfb15b060cc2e7cbae4d0631f34e/src/lib.zig --mod zigdig::/home/sinisa/.cache/zig/p/1220dfdb3089dfe9a4e4bc1226fcff08d91d0c0853f287d98d8b81270da251790331/src/lib.zig --mod httpz::/home/sinisa/.cache/zig/p/122004f74adf46001fe9129d8cec54bd4a98895ce89f0897790e13b60fa99e527b99/src/httpz.zig --mod getty::/home/sinisa/.cache/zig/p/12209398657d260abcd6dae946d8da4cd3057b8c7990608476a9f8011aae570d2ebb/src/getty.zig --mod zig-cli::/home/sinisa/.cache/zig/p/122044525df0d1896556da08c5ed50b456a672a52ab86a65834bb1e27d3ae7a847f2/src/main.zig --deps base58-zig,zig-network,zig-cli,getty,httpz,zigdig --main-pkg-path /home/sinisa/work/sig/src --listen=- Build Summary: 6/9 steps succeeded; 1 failed (disable with --summary none) install transitive failure └─ install fuzz transitive failure └─ zig build-exe fuzz Debug native failure error: the following build command failed with exit code 1: /home/sinisa/work/sig/zig-cache/o/62f214099de32787198c7fc83f86f69e/build /home/sinisa/zig/0.11.0/files/zig /home/sinisa/work/sig /home/sinisa/work/sig/zig-cache /home/sinisa/.cache/zig --verbose

dnut commented 7 months ago

Thanks for the full output. Unfortunately zig isn't giving us a lot of help with that error message.

I can confirm with zig build I was building in debug mode.

To rule out any issues with your toolchain or sig repo state, can you try running this:

mkdir sig-test
cd sig-test
wget https://ziglang.org/download/0.11.0/zig-linux-x86_64-0.11.0.tar.xz
tar xf zig-linux-x86_64-0.11.0.tar.xz
git clone https://github.com/Syndica/sig.git
cd sig
../zig-linux-x86_64-0.11.0/zig build --summary all

I just spun up a new ec2 instance with ubuntu 22.04, and this worked for me.

psymark commented 7 months ago

Thanks for the full output. Unfortunately zig isn't giving us a lot of help with that error message.

I can confirm with zig build I was building in debug mode.

To rule out any issues with your toolchain or sig repo state, can you try running this:

mkdir sig-test
cd sig-test
wget https://ziglang.org/download/0.11.0/zig-linux-x86_64-0.11.0.tar.xz
tar xf zig-linux-x86_64-0.11.0.tar.xz
git clone https://github.com/Syndica/sig.git
cd sig
../zig-linux-x86_64-0.11.0/zig build --summary all

I just spun up a new ec2 instance with ubuntu 22.04, and this worked for me.

I tried out these steps and I get the same error. So I think its something related to how my setup is configured, the zig compiler is really not being helpful with its output. I am also running zig build test after I comment out the fuzz target, and I get an error there too: image

Not sure if that should be a separate issue or its somehow related to my broken setup.

dnut commented 7 months ago

If those commands don't work, it seems that something is wrong with the operating system. Zig has relatively minimal dependencies on the system, but it does expect some stuff to be there.

If the main goal is just get a successful build in any environment, then I would try docker. If that doesn't work, I would try a vm. The idea is to isolate it from your system which seems to have an issue, since I know that running it on a fresh install of ubuntu works fine. If you want I can come up with some commands tomorrow to get started in that direction.

In terms of getting it working directly in your system, that could be a bit more complicated. It would be nice to see you get a successful build somewhere before narrowing down the issue you're seeing.

What kind of machine are you running this on? Is it bare metal x86_64?

I am also running zig build test after I comment out the fuzz target, and I get an error there too:

The zig build test output can be confusing. It says "error" if your tests print anything. That's just the output from a successful test run. If the exit code is 0, then it worked. I have a PR open that reduces the error logs on a successful test run, but it hasn't been merged yet.

psymark commented 7 months ago

What kind of machine are you running this on? Is it bare metal x86_64?

Yes I am running it on a bare metal x86_64 machine, Ryzen 3600 to be exact. Thank you for the help @dnut, its unfortunate that we couldn't find a solution for my machine. I think we can close this ticket as I can still develop around this issue, and I will investigate on my own why its happening, I think I will compile the zig compiler from source and see if that helps. We should probably close this issue, as it seems to not be a common case, and if I find the reason why its happening and its related to the codebase I can open a new issue, what do you think?

psymark commented 7 months ago

@dnut I got an update on this. I built the zig compiler from the source (the 0.11.x branch), and it's built in debug mode so we get more information. It seems like there is a bug in the compiler as it's hitting an assertio. Itt might be worth reporting this to the Zig team. I'm not sure why my setup is the only one triggering this bug, though, it might be because in release mode the assertions are optimized out and the behavior then is undefined :/, oh, and this error gets triggered when it reaches GossipService init compilation. I also get the generated IR, but I am afraid that doesn't help us much. The output:

/home/sinisa/sig-test/zig/lib/std/debug.zig:343:14: 0x98764c in assert (zig) if (!ok) unreachable; // assertion failure ^ /home/sinisa/sig-test/zig/lib/std/array_list.zig:742:19: 0xbd2e82 in appendSliceAssumeCapacity (zig) assert(new_len <= self.capacity); ^ /home/sinisa/sig-test/zig/src/InternPool.zig:5190:39: 0xbd39c9 in finishGetEnum (zig) ip.extra.appendSliceAssumeCapacity(@ptrCast(enum_type.values)); ^ /home/sinisa/sig-test/zig/src/InternPool.zig:3726:50: 0x9efd57 in get (zig) .explicit => return finishGetEnum(ip, gpa, enum_type, .type_enum_explicit), ^ /home/sinisa/sig-test/zig/src/Module.zig:6466:31: 0xa95232 in intern (zig) return mod.intern_pool.get(mod.gpa, key); ^ /home/sinisa/sig-test/zig/src/Sema.zig:35232:35: 0x1947fc4 in generateUnionTagTypeNumbered (zig) const enum_ty = try mod.intern(.{ .enum_type = .{ ^ /home/sinisa/sig-test/zig/src/Sema.zig:35195:65: 0x1263977 in semaUnionFields (zig) union_obj.tag_ty = try sema.generateUnionTagTypeNumbered(&block_scope, enum_field_names, enum_field_vals.keys(), union_obj); ^ /home/sinisa/sig-test/zig/src/Sema.zig:34315:24: 0xec747c in resolveTypeFieldsUnion (zig) try semaUnionFields(sema.mod, union_obj); ^ /home/sinisa/sig-test/zig/src/Sema.zig:36138:56: 0xc6b16b in typeRequiresComptime (zig) try sema.resolveTypeFieldsUnion(ty, union_obj); ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36142:62: 0xc6b2ed in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36030:53: 0xc6a33a in typeRequiresComptime (zig) return sema.typeRequiresComptime(child_ty); ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36030:53: 0xc6a33a in typeRequiresComptime (zig) return sema.typeRequiresComptime(child_ty); ^ /home/sinisa/sig-test/zig/src/Sema.zig:36109:62: 0xc6ad46 in typeRequiresComptime (zig) if (try sema.typeRequiresComptime(field.ty)) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:36042:49: 0xc6a87a in typeRequiresComptime (zig) return sema.typeRequiresComptime(error_union_type.payload_type.toType()); ^ /home/sinisa/sig-test/zig/src/Sema.zig:8856:53: 0x18a5956 in funcCommon (zig) const ret_poison = if (sema.typeRequiresComptime(bare_return_type)) |ret_comptime| rp: { ^ /home/sinisa/sig-test/zig/src/Sema.zig:8554:27: 0x1183f41 in zirFunc (zig) return sema.funcCommon( ^ /home/sinisa/sig-test/zig/src/Sema.zig:1039:62: 0xeb2c52 in analyzeBodyInner (zig) .func => try sema.zirFunc(block, inst, false), ^ /home/sinisa/sig-test/zig/src/Sema.zig:901:45: 0xc9c4b5 in analyzeBodyBreak (zig) const break_inst = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Module.zig:4342:50: 0xc997c8 in semaDecl (zig) const result_ref = (try sema.analyzeBodyBreak(&block_scope, body)).?.operand; ^ /home/sinisa/sig-test/zig/src/Module.zig:3858:32: 0xa949b7 in ensureDeclAnalyzed (zig) break :blk mod.semaDecl(decl_index) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:30524:27: 0x18ce103 in ensureDeclAnalyzed (zig) mod.ensureDeclAnalyzed(decl_index) catch |err| { ^ /home/sinisa/sig-test/zig/src/Sema.zig:30588:32: 0x19539a0 in analyzeDeclRefInner (zig) try sema.ensureDeclAnalyzed(decl_index); ^ /home/sinisa/sig-test/zig/src/Sema.zig:30492:50: 0x189e98b in analyzeDeclVal (zig) const decl_ref = try sema.analyzeDeclRefInner(decl_index, false); ^ /home/sinisa/sig-test/zig/src/Sema.zig:25870:35: 0x1e703ee in namespaceLookupVal (zig) return try sema.analyzeDeclVal(block, src, decl); ^ /home/sinisa/sig-test/zig/src/Sema.zig:25345:56: 0x18a40fa in fieldVal (zig) if (try sema.namespaceLookupVal(block, src, namespace, field_name)) |inst| { ^ /home/sinisa/sig-test/zig/src/Sema.zig:25690:54: 0x18976cf in fieldCallBind (zig) return .{ .direct = try sema.fieldVal(block, src, namespace, field_name, field_name_src) }; ^ /home/sinisa/sig-test/zig/src/Sema.zig:6526:46: 0x1176a76 in zirCallanon_141772 (zig) break :blk try sema.fieldCallBind(block, callee_src, object_ptr, field_name, field_name_src); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1006:62: 0xeb1201 in analyzeBodyInner (zig) .field_call => try sema.zirCall(block, inst, .field), ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:5711:33: 0x124ead3 in zirBlock (zig) return sema.resolveBlockBody(parent_block, src, &child_block, body, inst, &label.merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1546:49: 0xec2bcf in analyzeBodyInner (zig) break :blk try sema.zirBlock(block, inst, tags[inst] == .blockcomptime); ^ /home/sinisa/sig-test/zig/src/Sema.zig:884:30: 0x110c688 in analyzeBody (zig) = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Module.zig:5356:21: 0xe90998 in analyzeFnBody (zig) sema.analyzeBody(&inner_block, fn_info.body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Module.zig:3952:40: 0xc63ab6 in ensureFuncBodyAnalyzed (zig) var air = mod.analyzeFnBody(func_index, sema_arena) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:30537:31: 0x195d26c in ensureFuncBodyAnalyzed (zig) mod.ensureFuncBodyAnalyzed(func) catch |err| { ^ /home/sinisa/sig-test/zig/src/Sema.zig:34361:40: 0x127e019 in resolveInferredErrorSet (zig) try sema.ensureFuncBodyAnalyzed(func_index); ^ /home/sinisa/sig-test/zig/src/Sema.zig:30893:69: 0x124af21 in analyzeIsNonErrComptimeOnly (zig) const resolved_ty = try sema.resolveInferredErrorSet(block, src, set_ty); ^ /home/sinisa/sig-test/zig/src/Sema.zig:30922:56: 0x18a925c in analyzeIsNonErr (zig) const result = try sema.analyzeIsNonErrComptimeOnly(block, src, operand); ^ /home/sinisa/sig-test/zig/src/Sema.zig:17928:32: 0x1188252 in zirIsNonErr (zig) return sema.analyzeIsNonErr(block, src, operand); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1049:66: 0xeb3420 in analyzeBodyInner (zig) .is_non_err => try sema.zirIsNonErr(block, inst), ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:5711:33: 0x124ead3 in zirBlock (zig) return sema.resolveBlockBody(parent_block, src, &child_block, body, inst, &label.merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1546:49: 0xec2bcf in analyzeBodyInner (zig) break :blk try sema.zirBlock(block, inst, tags[inst] == .block_comptime); ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:5711:33: 0x124ead3 in zirBlock (zig) return sema.resolveBlockBody(parent_block, src, &child_block, body, inst, &label.merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1546:49: 0xec2bcf in analyzeBodyInner (zig) break :blk try sema.zirBlock(block, inst, tags[inst] == .block_comptime); ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:10162:45: 0x18ca77c in resolveProngComptime (zig) return sema.resolveBlockBody(spa.parent_block, src, child_block, prong_body, spa.switch_block_inst, merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:11399:52: 0x1199ddc in zirSwitchBlock (zig) return spa.resolveProngComptime( ^ /home/sinisa/sig-test/zig/src/Sema.zig:1072:69: 0xeb4631 in analyzeBodyInner (zig) .switch_block => try sema.zirSwitchBlock(block, inst, false), ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:5711:33: 0x124ead3 in zirBlock (zig) return sema.resolveBlockBody(parent_block, src, &child_block, body, inst, &label.merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1546:49: 0xec2bcf in analyzeBodyInner (zig) break :blk try sema.zirBlock(block, inst, tags[inst] == .blockcomptime); ^ /home/sinisa/sig-test/zig/src/Sema.zig:884:30: 0x110c688 in analyzeBody (zig) = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:7154:33: 0x18904c2 in analyzeCall (zig) sema.analyzeBody(&child_block, fn_info.body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:23037:28: 0x11d8601 in zirBuiltinCall (zig) return sema.analyzeCall(block, func, func_ty, func_src, call_src, modifier, ensure_result_used, resolved_args, null, null, .@"@call"); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1121:69: 0xeb6ca9 in analyzeBodyInner (zig) .builtin_call => try sema.zirBuiltinCall(block, inst), ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:5711:33: 0x124ead3 in zirBlock (zig) return sema.resolveBlockBody(parent_block, src, &child_block, body, inst, &label.merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1546:49: 0xec2bcf in analyzeBodyInner (zig) break :blk try sema.zirBlock(block, inst, tags[inst] == .blockcomptime); ^ /home/sinisa/sig-test/zig/src/Sema.zig:884:30: 0x110c688 in analyzeBody (zig) = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:7154:33: 0x18904c2 in analyzeCall (zig) sema.analyzeBody(&child_block, fn_info.body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:6643:32: 0x1175c60 in zirCallanon_141770 (zig) return sema.analyzeCall(block, func, func_ty, callee_src, call_src, modifier, ensure_result_used, resolved_args, bound_arg_src, call_dbg_node, .call); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1005:62: 0xeb1139 in analyzeBodyInner (zig) .call => try sema.zirCall(block, inst, .direct), ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:5711:33: 0x124ead3 in zirBlock (zig) return sema.resolveBlockBody(parent_block, src, &child_block, body, inst, &label.merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1546:49: 0xec2bcf in analyzeBodyInner (zig) break :blk try sema.zirBlock(block, inst, tags[inst] == .blockcomptime); ^ /home/sinisa/sig-test/zig/src/Sema.zig:884:30: 0x110c688 in analyzeBody (zig) = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:7154:33: 0x18904c2 in analyzeCall (zig) sema.analyzeBody(&child_block, fn_info.body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:23037:28: 0x11d8601 in zirBuiltinCall (zig) return sema.analyzeCall(block, func, func_ty, func_src, call_src, modifier, ensure_result_used, resolved_args, null, null, .@"@call"); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1121:69: 0xeb6ca9 in analyzeBodyInner (zig) .builtin_call => try sema.zirBuiltinCall(block, inst), ^ /home/sinisa/sig-test/zig/src/Sema.zig:901:45: 0xc9c4b5 in analyzeBodyBreak (zig) const break_inst = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Sema.zig:850:50: 0x18853b3 in resolveBody (zig) const break_data = (try sema.analyzeBodyBreak(block, body)) orelse ^ /home/sinisa/sig-test/zig/src/Sema.zig:6586:46: 0x11776ee in zirCallanon_141772 (zig) const resolved = try sema.resolveBody(block, args_body[arg_start..arg_end], inst); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1006:62: 0xeb1201 in analyzeBodyInner (zig) .field_call => try sema.zirCall(block, inst, .field), ^ /home/sinisa/sig-test/zig/src/Sema.zig:5728:34: 0x19398ab in resolveBlockBody (zig) if (sema.analyzeBodyInner(childblock, body)) || { ^ /home/sinisa/sig-test/zig/src/Sema.zig:5711:33: 0x124ead3 in zirBlock (zig) return sema.resolveBlockBody(parent_block, src, &child_block, body, inst, &label.merges); ^ /home/sinisa/sig-test/zig/src/Sema.zig:1546:49: 0xec2bcf in analyzeBodyInner (zig) break :blk try sema.zirBlock(block, inst, tags[inst] == .blockcomptime); ^ /home/sinisa/sig-test/zig/src/Sema.zig:884:30: 0x110c688 in analyzeBody (zig) = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Module.zig:5356:21: 0xe90998 in analyzeFnBody (zig) sema.analyzeBody(&inner_block, fn_info.body) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Module.zig:3952:40: 0xc63ab6 in ensureFuncBodyAnalyzed (zig) var air = mod.analyzeFnBody(func_index, sema_arena) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Compilation.zig:3197:42: 0xc61b70 in processOneJob (zig) module.ensureFuncBodyAnalyzed(func) catch |err| switch (err) { ^ /home/sinisa/sig-test/zig/src/Compilation.zig:3134:30: 0xad75bd in performAllTheWork (zig) try processOneJob(comp, work_item, main_progress_node); ^ /home/sinisa/sig-test/zig/src/Compilation.zig:2058:31: 0xad30a1 in update (zig) try comp.performAllTheWork(main_progress_node); ^ /home/sinisa/sig-test/zig/src/main.zig:3594:36: 0xb00b76 in serve (zig) try comp.update(main_progress_node); ^ /home/sinisa/sig-test/zig/src/main.zig:3408:22: 0xb24bd6 in buildOutputType (zig) try serve( ^ /home/sinisa/sig-test/zig/src/main.zig:270:31: 0x98974f in mainArgs (zig) return buildOutputType(gpa, arena, args, .{ .build = .Exe }); ^ /home/sinisa/sig-test/zig/src/main.zig:214:20: 0x986ad5 in main (zig) return mainArgs(gpa, arena, args); ^ /home/sinisa/sig-test/zig/lib/std/start.zig:574:37: 0x9864be in main (zig) const result = root.main() catch |err| { ^ ../sysdeps/nptl/libc_start_call_main.h:58:16: 0x761bc5429d8f in libc_start_call_main (../sysdeps/x86/libc-start.c) ../csu/libc-start.c:392:3: 0x761bc5429e3f in __libc_start_main_impl (../sysdeps/x86/libc-start.c) ???:?:?: 0x9860c4 in ??? (???) ???:?:?: 0x0 in ??? (???)

psymark commented 7 months ago

Just tested with another machine, compiled via zig compiler built from source, and I get no error, so yeah, it seems like it really is just a broken setup, or some really weird compiler issue. I am closing the issue as it works on the other machine.