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

build failures for lib/std/Build/Fuzz/WebServer.zig on armv7l #22523

Open
M-Evans opened this issue Jan 18, 2025 · 1 comment
Open

build failures for lib/std/Build/Fuzz/WebServer.zig on armv7l #22523

M-Evans opened this issue Jan 18, 2025 · 1 comment
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@M-Evans
Copy link

M-Evans commented Jan 18, 2025

Zig Version

0.14.0-dev.2802+257054a14

Steps to Reproduce and Observed Behavior

attempt zig build in any project on an armv7l machine

$ uname -a
Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

Expected Behavior

expected: zig build to build the project.

actual:

$ zig build
/opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/Build/Fuzz/WebServer.zig:633:9: error: expected type 'usize', found 'u64'
        file_size,
        ^~~~~~~~~
/opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/Build/Fuzz/WebServer.zig:633:9: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
/opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/posix.zig:4732:13: note: parameter type declared here
    length: usize,
            ^~~~~
referenced by:
    coverageRun: /opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/Build/Fuzz/WebServer.zig:562:50
    callFn__anon_63280: /opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/Thread.zig:486:13
    10 reference(s) hidden; use '-freference-trace=12' to see all references

I then added an @intCast here:


which makes the error go away. yet my build still fails with a separate issue:

$ zig build
/opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/Build/Fuzz/WebServer.zig:654:5: error: TODO: lower @memcpy to a for loop because the element types have different ABI sizes
    @memcpy(sorted_pcs.items(.pc), pcs);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    coverageRun: /opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/Build/Fuzz/WebServer.zig:562:50
    callFn__anon_63280: /opt/zig/zig-linux-armv7a-0.14.0-dev.2802+257054a14/lib/std/Thread.zig:486:13
    10 reference(s) hidden; use '-freference-trace=12' to see all references
@M-Evans M-Evans added the bug Observed behavior contradicts documented or intended behavior label Jan 18, 2025
@alexrp
Copy link
Member

alexrp commented Jan 18, 2025

I'll take a look at the file_size issue.

@mlugg @Rexicon226 perhaps one of you would be interested in tackling the Sema @memcpy issue?

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