Skip to content

Zig bootstrap crashes build on ReleaseSafe #19512

Description

@kassane

Zig Version

0.12.0-dev.3518+d2be725e4

Steps to Reproduce and Observed Behavior

Using latest zig-master src on bootstrap: d2be725

  • build zig (cmake + wasm) [RelSafe]: OK
  • build LLVM using zig: OK
  • build zig using zig(cmake+wasm)[RelSafe]: Fail
./build x86_64-linux-musl baseline
-- Configuring zig version 0.12.0-dev.3518+d2be725e4
-- Configuring done (0.1s)
-- Generating done (0.1s)
-- Build files have been written to: /home/kassane/zig-bootstrap/out/build-zig-host
[ 36%] Built target zigcpp
[ 47%] Built target zig-wasm2c
[ 68%] Built target zig1
[ 73%] Running zig1.wasm to produce /home/kassane/zig-bootstrap/out/build-zig-host/zig2.c
[ 78%] Running zig1.wasm to produce /home/kassane/zig-bootstrap/out/build-zig-host/compiler_rt.c
[ 84%] Building C object CMakeFiles/zig2.dir/zig2.c.o
[ 89%] Building C object CMakeFiles/zig2.dir/compiler_rt.c.o
[ 94%] Linking CXX executable zig2
[ 94%] Built target zig2
[100%] Building stage3
[100%] Built target stage3
Install the project...
-- Install configuration: "Release"
error: sub-compilation of zig_libc failed
/home/kassane/zig-bootstrap/out/host/lib/zig/std/zig/c_translation.zig:417:16: note: expected 3 arguments, found 2
return @fieldParentPtr(member, ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/zig/AstGen.zig:11718:66: note: expected 3 arguments, found 2
.defer_normal, .defer_error =>return @alignCast(@fieldParentPtr("base", base)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/http/Client.zig:111:29: note: expected 3 arguments, found 2
const node: *Node = @fieldParentPtr("data", connection);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Pool.zig:91:46: note: expected 3 arguments, found 2
const run_node: *RunQueue.Node = @fieldParentPtr("data", runnable);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:647:35: note: expected 3 arguments, found 2
const head: *Waiter = @fieldParentPtr("node", entry_node);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:659:63: note: expected 3 arguments, found 2
var queue_head: ?*Waiter = if (entry.node) |node| @fieldParentPtr("node", node) else null;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:702:39: note: expected 3 arguments, found 2
const head: *Waiter = @fieldParentPtr("node", entry.node orelse unreachable);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Build.zig:1065:42: note: expected 3 arguments, found 2
const uninstall_tls: *TopLevelStep = @fieldParentPtr("step", uninstall_step);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: sub-compilation of compiler_rt failed
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Build.zig:1065:42: note: expected 3 arguments, found 2
const uninstall_tls: *TopLevelStep = @fieldParentPtr("step", uninstall_step);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/zig/c_translation.zig:417:16: note: expected 3 arguments, found 2
return @fieldParentPtr(member, ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/zig/AstGen.zig:11718:66: note: expected 3 arguments, found 2
.defer_normal, .defer_error =>return @alignCast(@fieldParentPtr("base", base)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/http/Client.zig:111:29: note: expected 3 arguments, found 2
const node: *Node = @fieldParentPtr("data", connection);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Pool.zig:91:46: note: expected 3 arguments, found 2
const run_node: *RunQueue.Node = @fieldParentPtr("data", runnable);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:647:35: note: expected 3 arguments, found 2
const head: *Waiter = @fieldParentPtr("node", entry_node);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:659:63: note: expected 3 arguments, found 2
var queue_head: ?*Waiter = if (entry.node) |node| @fieldParentPtr("node", node) else null;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:702:39: note: expected 3 arguments, found 2
const head: *Waiter = @fieldParentPtr("node", entry.node orelse unreachable);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:216:44: error: expected 3 arguments, found 2
returnif (base.tag == T.base_tag) @fieldParentPtr("base", base) else null;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:373:39: error: expected 3 arguments, found 2
return@as(*t.Type(), @fieldParentPtr("base", base)).lowerUnnamedConst(val, decl_index);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:392:39: error: expected 3 arguments, found 2
return@as(*t.Type(), @fieldParentPtr("base", base)).getGlobalSymbol(name, lib_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:404:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).updateDecl(module, decl_index);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:420:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).updateFunc(module, func_index, air, liveness);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:432:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).updateDeclLineNumber(module, decl_index);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:456:34: error: expected 3 arguments, found 2
@as(*tag.Type(), @fieldParentPtr("base", base)).deinit();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:539:28: error: expected 3 arguments, found 2
return @as(*C, @fieldParentPtr("base", base)).flush(arena, prog_node);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:577:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).flushModule(arena, prog_node);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:587:34: error: expected 3 arguments, found 2
@as(*tag.Type(), @fieldParentPtr("base", base)).freeDecl(decl_index);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:610:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).updateExports(module, exported, exports);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:634:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).getDeclVAddr(decl_index, reloc_info);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:653:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).lowerAnonDecl(decl_val, decl_align, src_loc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:665:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).getAnonDeclVAddr(decl_val, reloc_info);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/link.zig:684:41: error: expected 3 arguments, found 2
return@as(*tag.Type(), @fieldParentPtr("base", base)).deleteDeclExport(decl_index, name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/Module.zig:302:50: error: expected 3 arguments, found 2
return @as(*std.heap.ArenaAllocator, @fieldParentPtr("state", state_acquired)).allocator();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/Module.zig:312:43: error: expected 3 arguments, found 2
if (@as(*std.heap.ArenaAllocator, @fieldParentPtr("state", self.state_acquired.?)) == arena_allocator) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Build.zig:1065:42: error: expected 3 arguments, found 2
const uninstall_tls: *TopLevelStep = @fieldParentPtr("step", uninstall_step);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/src/register_manager.zig:62:31: error: expected 3 arguments, found 2
return @alignCast(@fieldParentPtr("register_manager", self));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/zig/test/standalone/cmakedefine/build.zig:89:46: error: expected 3 arguments, found 2
const config_header: *ConfigHeader = @fieldParentPtr("step", config_header_step);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/zig/c_translation.zig:417:16: error: expected 3 arguments, found 2
return @fieldParentPtr(member, ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/zig/AstGen.zig:11718:66: error: expected 3 arguments, found 2
.defer_normal, .defer_error =>return @alignCast(@fieldParentPtr("base", base)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/http/Client.zig:111:29: error: expected 3 arguments, found 2
const node: *Node = @fieldParentPtr("data", connection);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:647:35: error: expected 3 arguments, found 2
const head: *Waiter = @fieldParentPtr("node", entry_node);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:659:63: error: expected 3 arguments, found 2
var queue_head: ?*Waiter = if (entry.node) |node| @fieldParentPtr("node", node) else null;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Futex.zig:702:39: error: expected 3 arguments, found 2
const head: *Waiter = @fieldParentPtr("node", entry.node orelse unreachable);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/zig-bootstrap/out/host/lib/zig/std/Thread/Pool.zig:91:46: error: expected 3 arguments, found 2
const run_node: *RunQueue.Node = @fieldParentPtr("data", runnable);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected Behavior

Successful build. ReleaseFast works.

  • build zig (cmake + wasm)[RelFast]: Ok
  • build llvm using zig[RelFast]: Ok
  • build zig[RelSafe] using zig[RelFast]: Ok

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions