Skip to content
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

[Windows] cannot build zig with zig error: type 'usize' cannot represent integer value '7500000000' #21452

Open
nm-remarkable opened this issue Sep 19, 2024 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@nm-remarkable
Copy link

nm-remarkable commented Sep 19, 2024

Zig Version

0.14.0-dev.1587+feaee2ba1

Steps to Reproduce and Observed Behavior

Running the steps in the README with the latest zig build. Or just zig build.

Windows Version: 10.0.22631 Build 22631
zig: 0.14.0-dev.1587+feaee2ba1
LLVM: 18.1.8

PS C:\Users\Nuno\Documents\GitHub\zig> zig build -p stage3 --search-prefix C:\Program Files\LLVM --zig-lib-dir lib -Dstatic-llvm -Doptimize=ReleaseSafe
C:\Users\Nuno\Documents\GitHub\zig\build.zig:534:10: error: type 'usize' cannot represent integer value '5029889638'
        .max_rss = 5029889638,
        ~^~~~~~~~~~~~~~~~~~~~
referenced by:
    runBuild__anon_4525: lib\std\Build.zig:2168:44
    main: lib\compiler\build_runner.zig:335:29
    4 reference(s) hidden; use '-freference-trace=6' to see all references
C:\Users\Nuno\Documents\GitHub\zig\build.zig:646:10: error: type 'usize' cannot represent integer value '7500000000'
        .max_rss = 7_500_000_000,
        ~^~~~~~~~~~~~~~~~~~~~~~~
PS C:\Users\Nuno\Documents\GitHub\zig> zig version
0.14.0-dev.1587+feaee2ba1
PS C:\Users\Nuno\Documents\GitHub\zig>

Expected Behavior

Zig to be able to build itself.

FYI: this issue seems similar #17596

extra information, when making the size of max_rss smaller I then encounter this error:

PS C:\Users\Nuno\Documents\GitHub\zig> zig build -p stage3 --search-prefix C:\Program Files\LLVM --zig-lib-dir lib -Dstatic-llvm -Doptimize=ReleaseSafe
lib\std\Build\Step\CheckObject.zig:1472:34: error: expected type 'usize', found 'u64'
                it.pos += creader.bytes_read;
                          ~~~~~~~^~~~~~~~~~~
lib\std\Build\Step\CheckObject.zig:1472:34: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
referenced by:
    parseTrieNode: lib\std\Build\Step\CheckObject.zig:1542:44
    dumpExportsTrie__anon_171776: lib\std\Build\Step\CheckObject.zig:1430:30
    17 reference(s) hidden; use '-freference-trace=19' to see all references
PS C:\Users\Nuno\Documents\GitHub\zig>
@nm-remarkable nm-remarkable added the bug Observed behavior contradicts documented or intended behavior label Sep 19, 2024
@mlugg mlugg added the zig build system std.Build, the build runner, `zig build` subcommand, package management label Sep 19, 2024
@mlugg mlugg added this to the 0.15.0 milestone Sep 19, 2024
@nm-remarkable nm-remarkable changed the title [Windows] cannot build zig with zig [Windows] cannot build zig with zig error: type 'usize' cannot represent integer value '7500000000' Sep 19, 2024
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 zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

No branches or pull requests

2 participants