zig icon indicating copy to clipboard operation
zig copied to clipboard

Failed to compile

Open alialrahahleh opened this issue 2 months ago • 2 comments

Zig Version

0.12

Steps to Reproduce and Observed Behavior

Build Summary: 0/3 steps succeeded; 1 failed zig build -Doptimize=ReleaseFast --summary all install └─ install rates └─ zig build-exe rates ReleaseFast native 3 errors /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/compress/flate/inflate.zig:303:27: error: no field or member function named 'writeAll' in 'io.GenericReader(*io.buffered_reader.BufferedReader(4096,io.GenericReader(fs.File,error{SystemResources,Unexpected,InputOutput,AccessDenied,BrokenPipe,OperationAborted,WouldBlock,ConnectionResetByPeer,IsDir,ConnectionTimedOut,NotOpenForReading,SocketNotConnected},(function 'read'))),error{SystemResources,Unexpected,InputOutput,AccessDenied,BrokenPipe,OperationAborted,WouldBlock,ConnectionResetByPeer,IsDir,ConnectionTimedOut,NotOpenForReading,SocketNotConnected},(function 'read'))' try writer.writeAll(buf); ~~~~~~^~~~~~~~~ /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/io.zig:85:12: note: struct declared here return struct { ^~~~~~ referenced by: decompress__anon_4052: /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/compress/flate/inflate.zig:16:21 decompress__anon_4016: /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/compress/gzip.zig:6:27 remaining reference traces hidden; use '-freference-trace' to see all reference traces /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/compress/flate/bit_reader.zig:70:51: error: no field or member function named 'readAll' in 'mem.Allocator' const bytes_read = self.forward_reader.readAll(buf[0..empty_bytes]) catch 0; ~~~~~~~~~~~~~~~~~~~^~~~~~~~ /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/mem/Allocator.zig:1:1: note: struct declared here //! The standard memory allocation interface. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/compress/flate/bit_reader.zig:127:34: note: called from here try self.fill(n); // ensure that there are n bits in the buffer ~~~~~~~~~^~~ /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/compress/flate/bit_reader.zig:70:51: error: no field or member function named 'readAll' in 'mem.Allocator' const bytes_read = self.forward_reader.readAll(buf[0..empty_bytes]) catch 0; ~~~~~~~~~~~~~~~~~~~^~~~~~~~ /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/mem/Allocator.zig:1:1: note: struct declared here //! The standard memory allocation interface. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/JJJ/zig-macos-aarch64-0.12.0/lib/std/compress/flate/bit_reader.zig:45:22: note: called from here self.fill(1) catch {}; ~~~~~~~~~^~~ error: the following command failed with 3 compilation errors: /Users/JJJ/zig-macos-aarch64-0.12.0/zig build-exe -cflags -std=c++20 -pthread -- /Users/JJJ/project/mrfstream/src/parquet.cpp -lz -I/opt/homebrew/Cellar/apache-arrow/16.0.0/include -L/opt/homebrew/Cellar/apache-arrow/16.0.0/lib -larrow -larrow_dataset -I/opt/homebrew/Cellar/apache-arrow/16.0.0/include -L/opt/homebrew/Cellar/apache-arrow/16.0.0/lib -lparquet -larrow -OReleaseFast -I /Users/JJJ/project/mrfstream/src -I /opt/homebrew/include -L /opt/homebrew/lib -Mroot=/Users/JJJ/project/mrfstream/src/rates.zig -lc++ -lc --cache-dir /Users/JJJ/project/mrfstream/zig-cache --global-cache-dir /Users/JJJ/.cache/zig --name rates --listen=- Build Summary: 0/3 steps succeeded; 1 failed

alialrahahleh avatar Apr 28 '24 20:04 alialrahahleh

It seems to only happen when compiling using latest build. Bootstraping works just fine

AndrewKraevskii avatar Apr 28 '24 20:04 AndrewKraevskii

I see it with bootstrap too -> /Users/XXX/zig-bootstrap-0.12.0/out/host/bin/zig

alialrahahleh avatar Apr 30 '24 16:04 alialrahahleh