Skip to content

zig failed to log out integer larger than 128 bit on Windows #13382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CGQAQ opened this issue Nov 1, 2022 · 1 comment
Closed

zig failed to log out integer larger than 128 bit on Windows #13382

CGQAQ opened this issue Nov 1, 2022 · 1 comment
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@CGQAQ
Copy link

CGQAQ commented Nov 1, 2022

Zig Version

0.10.0-dev.4588+9c0d975a0

Steps to Reproduce and Observed Behavior

const std = @import("std");

pub fn main() !void {
    const a = 11111111111111111111111111111111111111111111;
    std.log.info("Hello, world! {d}", .{a});
}
zig build run
LLD Link... lld-link: error: undefined symbol: __umodei4
>>> referenced by C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\fmt.zig:1433      
>>>               E:\toys\zig-1\zig-cache\o\082230bc56705709f7e3787ce50a2be0\zig-1.exe.obj:(fmt.formatInt__anon_8279)

lld-link: error: undefined symbol: __udivei4
>>> referenced by C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\fmt.zig:1436      
>>>               E:\toys\zig-1\zig-cache\o\082230bc56705709f7e3787ce50a2be0\zig-1.exe.obj:(fmt.formatInt__anon_8279)
error: FileNotFound
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\os\windows.zig:126:35: 0x7ff626c92bd9 in OpenFile (build.exe.obj)
        .OBJECT_NAME_NOT_FOUND => return error.FileNotFound,
                                  ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\fs.zig:1200:23: 0x7ff626c962c3 in openFileW (build.exe.obj)
            .handle = try w.OpenFile(sub_path_w, .{
                      ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\fs.zig:1072:13: 0x7ff626c7379e in openFile (build.exe.obj)
            return self.openFileW(path_w.span(), flags);
            ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\fs.zig:2508:24: 0x7ff626cf7402 in updateFile (build.exe.obj)
        var src_file = try source_dir.openFile(source_path, .{});
                       ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:1089:29: 0x7ff626d0bdbd in updateFile (build.exe.obj)
        const prev_status = try fs.Dir.updateFile(cwd, source_path, cwd, dest_path, .{});
                            ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:3417:9: 0x7ff626cee0f3 in 
make (build.exe.obj)
        try builder.updateFile(self.artifact.getOutputSource().getPath(builder), full_dest_path);
        ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:3649:9: 0x7ff626c5eaa9 in 
make (build.exe.obj)
        try self.makeFn(self);
        ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:509:9: 0x7ff626c4c84c in makeOneStep (build.exe.obj)
        try s.make();
        ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:503:17: 0x7ff626c4c7c5 in 
makeOneStep (build.exe.obj)
                return err;
                ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:503:17: 0x7ff626c4c7c5 in 
makeOneStep (build.exe.obj)
                return err;
                ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:503:17: 0x7ff626c4c7c5 in 
makeOneStep (build.exe.obj)
                return err;
                ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\std\build.zig:464:13: 0x7ff626c4c518 in 
make (build.exe.obj)
            try self.makeOneStep(s);
            ^
C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\lib\build_runner.zig:223:21: 0x7ff626c4f5cd 
in main (build.exe.obj)
            else => return err,
                    ^
error: the following build command failed with exit code 1:
E:\toys\zig-1\zig-cache\o\52934a3e3b70d6b327cbfda2d1633471\build.exe C:\Users\Troila\Downloads\zig-windows-x86_64-0.10.0-dev.4588+9c0d975a0\zig.exe E:\toys\zig-1 E:\toys\zig-1\zig-cache C:\Users\Troila\AppData\Local\zig run 

Expected Behavior

just works

@CGQAQ CGQAQ added the bug Observed behavior contradicts documented or intended behavior label Nov 1, 2022
@Vexu
Copy link
Member

Vexu commented Nov 1, 2022

Duplicate of #1534

@Vexu Vexu marked this as a duplicate of #1534 Nov 1, 2022
@Vexu Vexu closed this as completed Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants