Closed koek67 closed 1 year ago
I was trying to build using zig build and I got an error in realloc. I could not figure out which one of those parameters was redundant.
zig build
koushik@KOUSHIK-WIN:~/code/ziglibc$ ../zig-linux-x86_64-0.11.0-dev.426+fc3142aa9/zig build src/cstd.zig:178:46: error: member function expected 4 argument(s), found 5 const result = global.gpa.allocator().rawResize(gpa_buf, alloc_align, gpa_size, 0, @returnAddress()); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /home/koushik/code/zig-linux-x86_64-0.11.0-dev.426+fc3142aa9/lib/std/mem/Allocator.zig:91:12: note: function declared here pub inline fn rawResize(self: Allocator, buf: []u8, log2_buf_align: u8, new_len: usize, ret_addr: usize) bool { ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: cguana... error: The following command exited with error code 1: /home/koushik/code/zig-linux-x86_64-0.11.0-dev.426+fc3142aa9/zig build-lib /home/koushik/code/ziglibc/src/lib.zig -cflags -std=c11 -- /home/koushik/code/ziglibc/src/printf.c -cflags -std=c11 -- /home/koushik/code/ziglibc/src/scanf.c /home/koushik/code/ziglibc/src/linux/jmp.s -cflags -std=c11 -- /home/koushik/code/ziglibc/src/posix.c --cache-dir /home/koushik/code/ziglibc/zig-cache --global-cache-dir /home/koushik/.cache/zig --name cguana -static --pkg-begin modules /home/koushik/code/ziglibc/zig-cache/options/F51Q_Uyw4Pk5rbCJDQ0kbXcFP8n9iW-SLeU79xV6Nt48LFokMhWAU6fkUQSotRBH --pkg-end --pkg-begin trace_options /home/koushik/code/ziglibc/zig-cache/options/XIvaN2RGAX0S44ndtFs2hQLL26HL-qfev8ZLoO9m9iTAeAon07hR_fpN9hi3R-2J --pkg-end -I /home/koushik/code/ziglibc/inc/libc -I /home/koushik/code/ziglibc/inc/posix -I /home/koushik/code/ziglibc/inc/gnu -fPIC --enable-cache error: the following build command failed with exit code 1: /home/koushik/code/ziglibc/zig-cache/o/383ea65e7eed9e57377a203f8b5297ee/build /home/koushik/code/zig-linux-x86_64-0.11.0-dev.426+fc3142aa9/zig /home/koushik/code/ziglibc /home/koushik/code/ziglibc/zig-cache /home/koushik/.cache/zig
Nevermind! I got it to work with zig 0.10. Looks like there's some issues with 0.11.
I was trying to build using
zig build
and I got an error in realloc. I could not figure out which one of those parameters was redundant.