Skip to content

Zig 0.14.0 fails to compile hello world on WSL 1 #23153

@Glavo

Description

@Glavo

Zig Version

0.15.0-dev.10+214750fcf

Steps to Reproduce and Observed Behavior

I'm using the following environment:

                             ....              glavo@glavo-desktop
              .',:clooo:  .:looooo:.           -------------------
           .;looooooooc  .oooooooooo'          OS: Ubuntu 24.04.1 LTS x86_64
        .;looooool:,''.  :ooooooooooc          Host: Windows Subsystem for Linux - Ubuntu-24.04 (2.4.12)
       ;looool;.         'oooooooooo,          Kernel: Linux 4.4.0-26100-Microsoft
      ;clool'             .cooooooc.  ,,       Uptime: 8 hours, 47 mins
         ...                ......  .:oo,      Packages: 1124 (dpkg)
  .;clol:,.                        .loooo'     Shell: fish 3.7.0
 :ooooooooo,                        'ooool     Theme: Yaru [GTK3]
'ooooooooooo.                        loooo.    Icons: Yaru [GTK3]
'ooooooooool                         coooo.    Cursor: Adwaita
 ,loooooooc.                        .loooo.    Terminal: Windows Terminal
   .,;;;'.                          ;ooooc     CPU: 12th Gen Intel(R) Core(TM) i7-12700K (20) @ 4.80 GHz
       ...                         ,ooool.     GPU: Mesa llvmpipe (LLVM 19.1.1, 256 bits)
    .cooooc.              ..',,'.  .cooo.      Memory: 42.16 GiB / 63.78 GiB (66%)
      ;ooooo:.           ;oooooooc.  :l.       Swap: 206.18 MiB / 192.00 GiB (0%)
       .coooooc,..      coooooooooo.           Disk (/): 1.13 TiB / 1.82 TiB (62%) - wslfs
         .:ooooooolc:. .ooooooooooo'           Local IP (eth2): 192.168.31.37/24
           .':loooooo;  ,oooooooooc            Battery: 100% [Charging, AC Connected]
               ..';::c'  .;loooo:'             Locale: C.UTF-8

zig 0.13.0 works fine for me, but zig 0.14.0/0.15.0-dev.10+214750fcf can't compile or run anything even Hello World:

> cat main.zig
const std = @import("std");
pub fn main() !void {
    std.debug.print("Hello, World!\n", .{});
}

> /opt/zig-linux-x86_64-0.13.0/zig run main.zig
Hello, World!
> /opt/zig-linux-x86_64-0.14.0/zig run main.zig
error: unable to write '/home/glavo/.cache/zig/b/a2647189139b29c40a1c6df6248e388bbuiltin.zig': Unexpected
error: sub-compilation of compiler_rt failed
    note: failed to check cache: '/opt/zig-linux-x86_64-0.14.0/lib/compiler_rt.zig' file_hash Unexpected
error: unable to load '/opt/zig-linux-x86_64-0.14.0/lib/std/std.zig': Unexpected
error: unable to load '/opt/zig-linux-x86_64-0.14.0/lib/ubsan_rt.zig': Unexpected
> /opt/zig-linux-x86_64-0.15.0-dev.10+214750fcf/zig run main.zig
error: unable to write '/home/glavo/.cache/zig/b/14048194837c7e803a6d83848568e205builtin.zig': Unexpected
error: sub-compilation of compiler_rt failed
    note: failed to check cache: '/opt/zig-linux-x86_64-0.15.0-dev.10+214750fcf/lib/compiler_rt.zig' file_hash Unexpected
error: unable to load '/opt/zig-linux-x86_64-0.15.0-dev.10+214750fcf/lib/std/std.zig': Unexpected
error: unable to load '/opt/zig-linux-x86_64-0.15.0-dev.10+214750fcf/lib/ubsan_rt.zig': Unexpected

Expected Behavior

Compile normally

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions