-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Zig fails to compile zig init-exe
program on linux-aarch64
#16331
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
Comments
I can not reproduce with
What Kernel are you on (uname -a)? Does the issue occur sporadically or always? |
some form of crash always occurs, but the specifics appear to vary. here's
|
@ryleelyman
|
This would be fixed by #11308 This error with msync is even called out in the first comment. |
Just to close the loop a little: the following allows // mem.zig
pub const page_size = switch (builtin.cpu.arch) {
.wasm32, .wasm64 => 64 * 1024,
.aarch64 => switch (builtin.os.tag) {
+ .macos, .ios, .watchos, .tvos, .linux => 16 * 1024,
- .macos, .ios, .watchos, .tvos, => 16 * 1024,
else => 4 * 1024,
},
.sparc64 => 8 * 1024,
else => 4 * 1024,
}; |
@ryleelyman Related: #4082 Edit: oops, that's not right since we plan to rename There needs to be a runtime check on the page size somewhere instead of relying on this hard coded value. |
I was a bit surprised to find that these values were hardcoded when I started looking into this topic today (I am completely new to Zig). To me that should be just a fallback if for some reason there is no access to the page size during runtime. When using C on UNIX style systems there is the sysconf call to get the page size: https://www.man7.org/linux/man-pages/man3/sysconf.3.html I am fairly new to all this low level stuff though so apologies if that is not relevant in any shape or form. EDIT: |
I'm looking to fix this myself for Apple M1 Pro and what I've kind of thought of is the current way we handle page sizing isn't optimal. The issue I see is there's quite a bit of std relying on the comptime aspect of |
Zig Version
0.11.0-dev.3937+78eb3c561
Steps to Reproduce and Observed Behavior
downloaded the latest zig, created a new project with
zig init-exe
and ranzig build run
.I get the following error:
Expected Behavior
zig build run
should work.The text was updated successfully, but these errors were encountered: