2
3
Fork
You've already forked ncsu
0

zig-0.16 build breakage #276

Closed
opened 2026年04月20日 09:10:24 +02:00 by wiz · 6 comments
wiz commented 2026年04月20日 09:10:24 +02:00 (Migrated from code.blicky.net)
Copy link

I have read that 2.9.2 only claims to support zig 0.14 and zig 0.15.
This is a heads-up that zig 0.16 breaks it.
We've updated zig in pkgsrc to 0.16 and now see:


install
+- install ncdu
 +- compile exe ncdu ReleaseSafe native-native 155 errors
src/ui.zig:290:16: error: invalid builtin function: '@Type'
 break :lbl @Type(.{
 ^~~~~
src/c.zig:4:15: error: C import failed
pub const c = @cImport({
 ^~~~~~~~
referenced by:
 c: src/main.zig:21:27
 main: src/main.zig:470:9
 4 reference(s) hidden; use '-freference-trace=6' to see all references
error: translation failure
/usr/include/stdio.h:151:1: error: unknown type name 'pragma'
__END_DECLS
^

and many more errors like the last one, full log at eg. https://releng.netbsd.org/pkgreports/shadow/HEAD/NetBSD-11.0-x86_64/20260418.0931/ncdu-2.9.2/build.log

I have read that 2.9.2 only claims to support zig 0.14 and zig 0.15. This is a heads-up that zig 0.16 breaks it. We've updated zig in pkgsrc to 0.16 and now see: ``` install +- install ncdu +- compile exe ncdu ReleaseSafe native-native 155 errors src/ui.zig:290:16: error: invalid builtin function: '@Type' break :lbl @Type(.{ ^~~~~ src/c.zig:4:15: error: C import failed pub const c = @cImport({ ^~~~~~~~ referenced by: c: src/main.zig:21:27 main: src/main.zig:470:9 4 reference(s) hidden; use '-freference-trace=6' to see all references error: translation failure /usr/include/stdio.h:151:1: error: unknown type name 'pragma' __END_DECLS ^ ``` and many more errors like the last one, full log at eg. https://releng.netbsd.org/pkgreports/shadow/HEAD/NetBSD-11.0-x86_64/20260418.0931/ncdu-2.9.2/build.log
richardfearn commented 2026年05月16日 13:36:21 +02:00 (Migrated from code.blicky.net)
Copy link

I'd been wondering for a couple of weeks if ncdu would be updated to work with Zig 0.16.

I discovered recently that Yoran, who created ncdu, has died :(

https://vndb.org/t24787

I'd been wondering for a couple of weeks if ncdu would be updated to work with Zig 0.16. I discovered recently that Yoran, who created ncdu, has died :( https://vndb.org/t24787
BratishkaErik commented 2026年05月17日 22:35:19 +02:00 (Migrated from code.blicky.net)
Copy link

@richardfearn wrote in https://code.blicky.net/yorhel/ncdu/issues/276#issuecomment-1803:

I'd been wondering for a couple of weeks if ncdu would be updated to work with Zig 0.16.

I discovered recently that Yoran, who created ncdu, has died :(

https://vndb.org/t24787

Do you know perchance if someone has taken over maintenance of this Forgejo instance, or Mastodon server, or ncdu itself? I heard the VNDB is in good hands with its other admins, but what about future of Yorhel’s other projects? Maybe some fork exist?

It would be incredibly sad if these projects (and ncdc etc.) fade away over time.


I have a bit of experience helping port ncdu2 to newer Zig versions, but I:

  1. don't know ncurses or C shenanigans that well,
  2. don’t want to disrespect his memory with deviating changes or views/ideas/vision/style.

Which means I don’t want to create arbitrary and random/fragmented fork... even if I tried, it would be hard to keep same level of quality in both Zig and C versions.

If someone more qualified is willing to step up and lead or coordinate the maintenance (or someone already did, and I just do not know about it), I would be more than happy to assist with Zig version.

@richardfearn wrote in https://code.blicky.net/yorhel/ncdu/issues/276#issuecomment-1803: > I'd been wondering for a couple of weeks if ncdu would be updated to work with Zig 0.16. > > I discovered recently that Yoran, who created ncdu, has died :( > > https://vndb.org/t24787 Do you know perchance if someone has taken over maintenance of this Forgejo instance, or Mastodon server, or ncdu itself? I heard the VNDB is in good hands with its other admins, but what about future of Yorhel’s other projects? Maybe some fork exist? It would be incredibly sad if these projects (and ncdc etc.) fade away over time. --- I have a bit of experience helping port ncdu2 to newer Zig versions, but I: 1. don't know ncurses or C shenanigans that well, 2. don’t want to disrespect his memory with deviating changes or views/ideas/vision/style. Which means I don’t want to create arbitrary and random/fragmented fork... even if I tried, it would be hard to keep same level of quality in both Zig and C versions. If someone more qualified is willing to step up and lead or coordinate the maintenance (or someone already did, and I just do not know about it), I would be more than happy to assist with Zig version.
richardfearn commented 2026年05月18日 19:20:48 +02:00 (Migrated from code.blicky.net)
Copy link

@BratishkaErik wrote in https://code.blicky.net/yorhel/ncdu/issues/276#issuecomment-1804:

Do you know perchance if someone has taken over maintenance of this Forgejo instance, or Mastodon server, or ncdu itself?

I have no idea I'm afraid... I only found out last week.

@BratishkaErik wrote in https://code.blicky.net/yorhel/ncdu/issues/276#issuecomment-1804: > Do you know perchance if someone has taken over maintenance of this Forgejo instance, or Mastodon server, or ncdu itself? I have no idea I'm afraid... I only found out last week.
BratishkaErik commented 2026年05月19日 22:10:09 +02:00 (Migrated from code.blicky.net)
Copy link

@richardfearn wrote in https://code.blicky.net/yorhel/ncdu/issues/276#issuecomment-1805:

@BratishkaErik wrote in #276 (комментарий):

Do you know perchance if someone has taken over maintenance of this Forgejo instance, or Mastodon server, or ncdu itself?

I have no idea I'm afraid... I only found out last week.

Hi, I decided to keep maintaining for a time, I already updated to Zig 0.16:

https://github.com/BratishkaErik/ncdu/pull/1
https://code.blicky.net/BratishkaErik/ncdu/src/branch/zig-0.16

I invite both of you to continue this discussion in PR comments. I don't know what will happen to this instance, so I don't want to risk losing it, Github IMHO is more reliable.

You can build yourself, it works for x86_64-linux-gnu. I haven't tried building for musl or other OS yet, so static binaries are not yet available. When they will be I will attach to that PR.

@richardfearn wrote in https://code.blicky.net/yorhel/ncdu/issues/276#issuecomment-1805: > @BratishkaErik wrote in #276 (комментарий): > > > Do you know perchance if someone has taken over maintenance of this Forgejo instance, or Mastodon server, or ncdu itself? > > I have no idea I'm afraid... I only found out last week. Hi, I decided to keep maintaining for a time, I already updated to Zig 0.16: https://github.com/BratishkaErik/ncdu/pull/1 https://code.blicky.net/BratishkaErik/ncdu/src/branch/zig-0.16 I invite both of you to continue this discussion in PR comments. I don't know what will happen to this instance, so I don't want to risk losing it, Github IMHO is more reliable. You can build yourself, it works for x86_64-linux-gnu. I haven't tried building for musl or other OS yet, so static binaries are not yet available. When they will be I will attach to that PR.
selfisekai commented 2026年05月23日 22:59:22 +02:00 (Migrated from code.blicky.net)
Copy link

Oh. Oh shit.

Oh. Oh shit.

Solved by #278

Solved by #278
Sign in to join this conversation.
No Branch/Tag specified
zig
zig0.16
master
zig-threaded
openat
chdir
clear
compll
v2.9.3
v2.9.2
v2.9.1
v2.9
v2.8.2
v2.8.1
v2.8
v1.22
v1.21
v2.7
v2.6
v2.5
v1.20
v2.4
v1.19
v2.3
v1.18.1
v2.2.2
v1.18
v2.2.1
v2.2
v1.17
v2.1.2
v2.1.1
v2.1
v2.0.1
v2.0
v2.0-beta3
v2.0-beta2
v2.0-beta1
v1.16
v1.15.1
v1.15
v1.14.2
v1.14.1
v1.14
v1.13
v1.12
v1.11
v1.10
v1.9
v1.8
v1.7
v1.6
v1.5
v1.4
v1.3
v1.2
v1.1
No labels
1.x
2.x
bug
feature
imported
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
selfisekai/ncsu#276
Reference in a new issue
selfisekai/ncsu
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?