Skip to content
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

Problems with using expected_errors when a version map is used #18941

Open
RossComputerGuy opened this issue Feb 15, 2024 · 0 comments · May be fixed by #19922
Open

Problems with using expected_errors when a version map is used #18941

RossComputerGuy opened this issue Feb 15, 2024 · 0 comments · May be fixed by #19922
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@RossComputerGuy
Copy link
Sponsor Contributor

Zig Version

0.12.0-dev.2728+e0aa7a4ef

Steps to Reproduce and Observed Behavior

  1. Try building this repo

When trying to match the error using the exact type:

error: warning(link): unexpected LLD stderr:
ld.lld: warning: attempt to reassign symbol '__old_change_hat' of version 'IMMUNIX_1.0' to version 'APPARMOR_1.1'
ld.lld: warning: attempt to reassign symbol 'parse_record' of version 'APPARMOR_1.0' to version 'APPARMOR_1.1'
ld.lld: warning: attempt to reassign symbol 'free_record' of version 'APPARMOR_1.0' to version 'APPARMOR_1.1'


error:
========= expected: =====================


========= but found: ====================

=========================================

With contains type of expected error being an empty string:

error: warning(link): unexpected LLD stderr:
ld.lld: warning: attempt to reassign symbol '__old_change_hat' of version 'IMMUNIX_1.0' to version 'APPARMOR_1.1'
ld.lld: warning: attempt to reassign symbol 'parse_record' of version 'APPARMOR_1.0' to version 'APPARMOR_1.1'
ld.lld: warning: attempt to reassign symbol 'free_record' of version 'APPARMOR_1.0' to version 'APPARMOR_1.1'


getPath() was called on a GeneratedFile that wasn't built yet.
  source package path: /home/ross/MidstallSoftware/apparmor.zig
  Is there a missing Step dependency on step 'zig build-lib apparmor ReleaseSmall native'?
    The step was created by this stack trace:
name: 'zig build-lib apparmor ReleaseSmall native'. creation stack trace:
/home/ross/zig/lib/zig/std/Build/Step/Compile.zig:298:26: 0x10fc1e3 in create (build)
        .step = Step.init(.{
                         ^
/home/ross/MidstallSoftware/apparmor.zig/build.zig:104:54: 0x10faa43 in build (build)
    const libapparmor = std.Build.Step.Compile.create(b, .{
                                                     ^
/home/ross/zig/lib/zig/std/Build.zig:1999:43: 0x10d6bab in runBuild__anon_8803 (build)
        .ErrorUnion => try build_zig.build(b),
                                          ^
/home/ross/zig/lib/zig/build_runner.zig:317:29: 0x10d1d93 in main (build)
        try builder.runBuild(root);
                            ^
/home/ross/zig/lib/zig/std/start.zig:511:37: 0x10ba2b7 in posixCallMainAndExit (build)
            const result = root.main() catch |err| {
                                    ^
    The step 'install apparmor' that is missing a dependency on the above step was created by this stack trace:
name: 'install apparmor'. creation stack trace:
/home/ross/zig/lib/zig/std/Build/Step/InstallArtifact.zig:66:26: 0x11ac517 in create (build)
        .step = Step.init(.{
                         ^
/home/ross/zig/lib/zig/std/Build.zig:1543:39: 0x114ed57 in addInstallArtifact (build)
    return Step.InstallArtifact.create(self, artifact, options);
                                      ^
/home/ross/zig/lib/zig/std/Build.zig:1533:60: 0x10fd2f7 in installArtifact (build)
    self.getInstallStep().dependOn(&self.addInstallArtifact(artifact, .{}).step);
                                                           ^
/home/ross/MidstallSoftware/apparmor.zig/build.zig:152:22: 0x10fae43 in build (build)
    b.installArtifact(libapparmor);
                     ^
/home/ross/zig/lib/zig/std/Build.zig:1999:43: 0x10d6bab in runBuild__anon_8803 (build)
        .ErrorUnion => try build_zig.build(b),
                                          ^
/home/ross/zig/lib/zig/build_runner.zig:317:29: 0x10d1d93 in main (build)
        try builder.runBuild(root);
                            ^
/home/ross/zig/lib/zig/std/start.zig:511:37: 0x10ba2b7 in posixCallMainAndExit (build)
            const result = root.main() catch |err| {
                                    ^
    Hope that helps. Proceeding to panic.
thread 27220 panic: misconfigured build script
/home/ross/zig/lib/zig/std/Build.zig:2192:17: 0x114e413 in getPath2 (build)
                @panic("misconfigured build script");
                ^
/home/ross/zig/lib/zig/std/Build/Step/InstallArtifact.zig:132:58: 0x11eb267 in make (build)
        const full_src_path = self.emitted_bin.?.getPath2(step.owner, step);
                                                         ^
/home/ross/zig/lib/zig/std/Build/Step.zig:186:13: 0x1156adf in make (build)
    s.makeFn(s, prog_node) catch |err| switch (err) {
            ^
/home/ross/zig/lib/zig/build_runner.zig:965:31: 0x110492b in workerMakeOneStep (build)
    const make_result = s.make(&sub_prog_node);
                              ^
/home/ross/zig/lib/zig/std/Thread/Pool.zig:93:39: 0x10c64db in runFn (build)
            @call(.auto, func, closure.arguments);
                                      ^
/home/ross/zig/lib/zig/std/Thread/Pool.zig:132:18: 0x11b001b in worker (build)
            runFn(&run_node.data);
                 ^
/home/ross/zig/lib/zig/std/Thread.zig:411:13: 0x115535f in callFn__anon_16578 (build)
            @call(.auto, f, args);
            ^
/home/ross/zig/lib/zig/std/Thread.zig:1204:30: 0x11041a7 in entryFn (build)
                return callFn(f, self.fn_args);
                             ^
/home/ross/ExpidusOS/zig/build/stage3/lib/zig/c.zig:269:13: 0x126b9b7 in clone (c)
            asm volatile (
            ^
???:?:?: 0xffffc1248217 in ??? (???)
/home/ross/zig/lib/zig/std/Thread/Condition.zig:292:27: 0x1105427 in wake__anon_10499 (build)
                Futex.wake(&self.epoch, to_wake);
                          ^
/home/ross/zig/lib/zig/std/Thread/Condition.zig:100:19: 0x10c658b in signal (build)
    self.impl.wake(.one);
                  ^

I've noticed the stderr doesn't have anything in it which is making it impossible to match.

Expected Behavior

Zig should be able to match the error.

@RossComputerGuy RossComputerGuy added the bug Observed behavior contradicts documented or intended behavior label Feb 15, 2024
RossComputerGuy added a commit to ExpidusOS/zig that referenced this issue Feb 15, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to ExpidusOS/zig that referenced this issue Feb 22, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to ExpidusOS/zig that referenced this issue Feb 29, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to ExpidusOS/zig that referenced this issue Mar 7, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to ExpidusOS/zig that referenced this issue Mar 11, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to ExpidusOS/zig that referenced this issue Mar 11, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to ExpidusOS/zig that referenced this issue Mar 20, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to MidstallSoftware/zig that referenced this issue Apr 5, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to MidstallSoftware/zig that referenced this issue May 10, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to MidstallSoftware/zig that referenced this issue May 10, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
RossComputerGuy added a commit to MidstallSoftware/zig that referenced this issue May 10, 2024
Fixes ziglang#18941 by moving the
"checkCompileErrors" call from Build.Step.Compile to Build.Step and
returning result if the errors match as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
1 participant