zap
zap copied to clipboard
Zap build for arm(32) aggressively approaches errors
Zap 0.10.1 (although build.zig.zon still is 0.9.1?), trying to (cross)compile for arm (32 bit), returns with:
> [authentication arm 1/1] RUN /compiler/zig build -Doptimize=ReleaseSafe -Dtarget=arm-linux-musleabihf:
6.371 install
6.371 +- install authentication
6.371 +- zig build-exe authentication ReleaseSafe arm-linux-musleabihf
6.371 +- zig build-lib facil.io ReleaseSafe arm-linux-musleabihf 2 errors
6.371 /root/.cache/zig/p/zap-0.9.1-GoeB8zBOJAAFXit6idaxejwAtPn9iYgCXwzybs1zxUgc/facil.io/lib/facil/fio.h:2542:15: error: shift count >= width of type
6.371 len ^= (len << 33);
6.371 ^~~~
6.371 /root/.cache/zig/p/zap-0.9.1-GoeB8zBOJAAFXit6idaxejwAtPn9iYgCXwzybs1zxUgc/facil.io/lib/facil/fio.c:8:10: note: in file included from /root/.cache/zig/p/zap-0.9.1-GoeB8zBOJAAFXit6idaxejwAtPn9iYgCXwzybs1zxUgc/facil.io/lib/facil/fio.c:8:
6.371 #include <fio.h>
6.371 ^
6.371 /root/.cache/zig/p/zap-0.9.1-GoeB8zBOJAAFXit6idaxejwAtPn9iYgCXwzybs1zxUgc/facil.io/lib/facil/fio.c:2691:7: error: call to undeclared function 'sendfile64'; ISO C99 and later do not support implicit function declarations
6.371 sendfile64(fd, packet->data.fd, (off_t *)&packet->offset, packet->length);
6.371 ^
- error: shift count >= width
- error: call to undeclared function 'sendfile64'
musl libc isn't available for 32-bit arm, so musleabihf is compiled on-demand. Due to facil's approach to the (what looks to be) a hash, are 32-bit builds feasible? x86 can still be compiled for, although I'm not sure what the mileage is.
Zig 0.14.0 stable
Docker alpine, but same behaviour on macOS 15 aarch64 (I wouldn't expect any different from Zig)