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

Compiler and build system panic on invalid macos target #18018

Open
Tracked by #8
andreas-schwab opened this issue Nov 16, 2023 · 8 comments · Fixed by #18869
Open
Tracked by #8

Compiler and build system panic on invalid macos target #18018

andreas-schwab opened this issue Nov 16, 2023 · 8 comments · Fixed by #18869
Labels
arch-riscv 32-bit and 64-bit RISC-V bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness. os-macos zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@andreas-schwab
Copy link

andreas-schwab commented Nov 16, 2023

https://build.opensuse.org/package/live_build_log/openSUSE:Factory:RISCV/zig/standard/riscv64

FAILED: stage3/bin/zig /home/abuild/rpmbuild/BUILD/zig-0.11.0/build/stage3/bin/zig 
cd /home/abuild/rpmbuild/BUILD/zig-0.11.0 && /home/abuild/rpmbuild/BUILD/zig-0.11.0/build/zig2 build --prefix /home/abuild/rpmbuild/BUILD/zig-0.11.0/build/stage3 --zig-lib-dir /home/abuild/rpmbuild/BUILD/zig-0.11.0/lib -Dconfig_h=/home/abuild/rpmbuild/BUILD/zig-0.11.0/build/config.h -Denable-llvm -Doptimize=ReleaseFast -Dno-langref -Dno-autodocs -Dtarget=native -Dcpu=baseline -Dversion-string=0.11.0
thread 16830 panic: reached unreachable code
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/target.zig:289:33: 0x18c91f in default (build)
                        else => unreachable,
                                ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/target.zig:89:58: 0x132cd3 in defaultVersionRange (build)
                    .version_range = VersionRange.default(tag, arch),
                                                         ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/zig/system/NativeTargetInfo.zig:38:57: 0x12b797 in detect (build)
    var os = cross_target.getOsTag().defaultVersionRange(cross_target.getCpuArch());
                                                        ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/Build/Step/Compile.zig:397:48: 0x1a161d in create (build)
    const target_info = NativeTargetInfo.detect(options.target) catch @panic("unhandled error");
                                               ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/Build.zig:490:31: 0x14cf21 in addExecutable (build)
    return Step.Compile.create(b, .{
                              ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/test/link/macho/bugs/13457/build.zig:18:32: 0x2cfdad in add (build)
    const exe = b.addExecutable(.{
                               ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/test/link/macho/bugs/13457/build.zig:9:8: 0x29cd6d in build (build)
    add(b, test_step, .Debug);
       ^
[ 6400s] /home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/Build.zig:1638:33: 0x260c23 in runBuild__anon_61187 (build)
        .Void => build_zig.build(b),
                                ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/Build.zig:1622:25: 0x20bab3 in dependencyInner__anon_57121 (build)
    sub_builder.runBuild(build_zig) catch @panic("unhandled error");
                        ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/Build.zig:1597:27: 0x1bbc39 in anonymousDependency__anon_26667 (build)
    return dependencyInner(b, name, build_root, build_zig, args);
                          ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/test/tests.zig:656:46: 0x15affd in addLinkTests (build)
            const dep = b.anonymousDependency(case.build_root, case.import, .{});
                                             ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/build.zig:492:42: 0x14aacb in build (build)
    test_step.dependOn(tests.addLinkTests(b, enable_macos_sdk, false, enable_symlinks_windows));
                                         ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/Build.zig:1639:43: 0x12ea71 in runBuild__anon_7025 (build)
        .ErrorUnion => try build_zig.build(b),
                                          ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/build_runner.zig:297:29: 0x12ac87 in main (build)
        try builder.runBuild(root);
                            ^
/home/abuild/rpmbuild/BUILD/zig-0.11.0/lib/std/start.zig:574:37: 0x11966b in posixCallMainAndExit (build)
            const result = root.main() catch |err| {
                                    ^
???:?:?: 0x0 in ??? (???)
error: the following build command crashed:
/home/abuild/rpmbuild/BUILD/zig-0.11.0/zig-cache/o/864178534dcbe7c026b2764eb2a4a3ac/build /home/abuild/rpmbuild/BUILD/zig-0.11.0/build/zig2 /home/abuild/rpmbuild/BUILD/zig-0.11.0 /home/abuild/rpmbuild/BUILD/zig-0.11.0/zig-cache /home/abuild/.cache/zig --prefix /home/abuild/rpmbuild/BUILD/zig-0.11.0/build/stage3 --zig-lib-dir /home/abuild/rpmbuild/BUILD/zig-0.11.0/lib -Dconfig_h=/home/abuild/rpmbuild/BUILD/zig-0.11.0/build/config.h -Denable-llvm -Doptimize=ReleaseFast -Dno-langref -Dno-autodocs -Dtarget=native -Dcpu=baseline -Dversion-string=0.11.0

@felixonmars
Copy link

felixonmars commented Nov 22, 2023

I have tried to disable all macho link tests and successfully built zig stage3. The patch I use is:

patch
--- zig-0.11.0/test/link.zig.orig	2023-11-22 10:45:40.666337735 +0200
+++ zig-0.11.0/test/link.zig	2023-11-22 10:46:00.534125211 +0200
@@ -83,109 +83,4 @@
         .import = @import("link/wasm/type/build.zig"),
     },
 
-    // Mach-O Cases
-    .{
-        .build_root = "test/link/macho/bugs/13056",
-        .import = @import("link/macho/bugs/13056/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/bugs/13457",
-        .import = @import("link/macho/bugs/13457/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/bugs/16308",
-        .import = @import("link/macho/bugs/16308/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/bugs/16628",
-        .import = @import("link/macho/bugs/16628/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/dead_strip",
-        .import = @import("link/macho/dead_strip/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/dead_strip_dylibs",
-        .import = @import("link/macho/dead_strip_dylibs/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/dylib",
-        .import = @import("link/macho/dylib/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/empty",
-        .import = @import("link/macho/empty/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/entry",
-        .import = @import("link/macho/entry/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/entry_in_archive",
-        .import = @import("link/macho/entry_in_archive/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/entry_in_dylib",
-        .import = @import("link/macho/entry_in_dylib/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/headerpad",
-        .import = @import("link/macho/headerpad/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/linksection",
-        .import = @import("link/macho/linksection/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/needed_framework",
-        .import = @import("link/macho/needed_framework/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/needed_library",
-        .import = @import("link/macho/needed_library/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/objc",
-        .import = @import("link/macho/objc/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/objcpp",
-        .import = @import("link/macho/objcpp/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/pagezero",
-        .import = @import("link/macho/pagezero/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/search_strategy",
-        .import = @import("link/macho/search_strategy/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/stack_size",
-        .import = @import("link/macho/stack_size/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/strict_validation",
-        .import = @import("link/macho/strict_validation/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/tbdv3",
-        .import = @import("link/macho/tbdv3/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/tls",
-        .import = @import("link/macho/tls/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/unwind_info",
-        .import = @import("link/macho/unwind_info/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/weak_library",
-        .import = @import("link/macho/weak_library/build.zig"),
-    },
-    .{
-        .build_root = "test/link/macho/weak_framework",
-        .import = @import("link/macho/weak_framework/build.zig"),
-    },
 };

Now I got a lot of test failures. I am not sure if I should change the default code model in zig code (or whether it has anything to do with these failures). Hope it helps in any way.

trace
zig build-exe zig Debug native: error: the following command failed with 1 compilation errors:
/build/zig/src/zig-0.11.0/testinstall/usr/bin/zig build-exe --stack 33554432 /build/zig/src/zig-0.11.0/src/main.zig /build/zig/src/zig-0.11.0/build/zigcpp/libzigcpp.a /usr/lib/libclang-cpp.so.16 /usr/lib/liblldMinGW.so /usr/lib/liblldELF.so /usr/lib/liblldCOFF.so /usr/lib/liblldWasm.so /usr/lib/liblldMachO.so /usr/lib/liblldCommon.so /usr/lib/libLLVM-16.so /lib/libstdc++.so -lunwind -lc --cache-dir /build/zig/src/zig-0.11.0/zig-cache --global-cache-dir /build/.cache/zig --name zig --mod build_options::/build/zig/src/zig-0.11.0/zig-cache/c/c4c3c2f0e3c6f9a560f0d5600bcdabb9/options.zig --deps build_options -I /usr/include -I /usr/include -L /usr/lib --listen=-
run @intFromFloat cannot fit - negative out of range: error: error: TestFailed
/build/zig/src/zig-0.11.0/zig-cache/o/ab8171c9cb06ee8681575b5072ceef6f/tmp.zig:12:5: 0x1d035 in main (@intFromFloat cannot fit - negative out of range)
    return error.TestFailed;
    ^

run @intFromFloat cannot fit - negative out of range: error: the following command exited with code 1 (expected exited with code 0):
/build/zig/src/zig-0.11.0/zig-cache/o/9672f4afef54a05ef7c81230c43fa948/@intFromFloat cannot fit - negative out of range
run @intFromFloat cannot fit - positive out of range: error: error: TestFailed
/build/zig/src/zig-0.11.0/zig-cache/o/066bec9aec93318094e6fb5f9be97f92/tmp.zig:12:5: 0x1d035 in main (@intFromFloat cannot fit - positive out of range)
    return error.TestFailed;
    ^

run @intFromFloat cannot fit - positive out of range: error: the following command exited with code 1 (expected exited with code 0):
/build/zig/src/zig-0.11.0/zig-cache/o/65bf2201bc3537bdcd49bd38021a950b/@intFromFloat cannot fit - positive out of range
run test behavior-native-ReleaseFast: error: 'test.@mulAdd f80' failed
run test behavior-native-ReleaseFast: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/4bdc02c53334186600f6f54712fc7945/test --listen=-
run test behavior-native-ReleaseFast-single: error: 'test.@mulAdd f80' failed
run test behavior-native-ReleaseFast-single: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/2ae878e6a7d93ba9b1ed58bf55ac32a3/test --listen=-
run test behavior-native-ReleaseFast-libc: error: 'test.@mulAdd f80' failed
run test behavior-native-ReleaseFast-libc: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/51d3ded5bfc6e3cf6e85ff05f9aff32b/test --listen=-
run test behavior-native-ReleaseSafe: error: 'test.@mulAdd f80' failed: /build/zig/src/zig-0.11.0/lib/std/testing.zig:515:14: 0x575d5 in test.@mulAdd f80 (test)
    if (!ok) return error.TestUnexpectedResult;
             ^
/build/zig/src/zig-0.11.0/test/behavior/muladd.zig:69:5: 0x575df in test.@mulAdd f80 (test)
    try expect(@mulAdd(f80, a, b, c) == 20);
    ^
/build/zig/src/zig-0.11.0/test/behavior/muladd.zig:62:5: 0x575e9 in test.@mulAdd f80 (test)
    try testMulAdd80();
    ^
run test behavior-native-ReleaseSafe: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/86b4b6a15b4790e6dc6c9f06f79a8f5c/test --listen=-
run test behavior-native-ReleaseSmall: error: 'test.@mulAdd f80' failed
run test behavior-native-ReleaseSmall: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/dfe3cac61ec49d47af593fdaa8af4e67/test --listen=-
run test behavior-native-ReleaseSmall-single: error: 'test.@mulAdd f80' failed
run test behavior-native-ReleaseSmall-single: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/5c18c2dc09975215e08df4082aa59db6/test --listen=-
run test behavior-native-ReleaseSmall-libc: error: 'test.@mulAdd f80' failed
run test behavior-native-ReleaseSmall-libc: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/1b15583c4b4dcd782f71bc79873bb718/test --listen=-
run test behavior-native-ReleaseSafe-single: error: 'test.@mulAdd f80' failed: /build/zig/src/zig-0.11.0/lib/std/testing.zig:515:14: 0x56015 in test.@mulAdd f80 (test)
    if (!ok) return error.TestUnexpectedResult;
             ^
/build/zig/src/zig-0.11.0/test/behavior/muladd.zig:69:5: 0x5601f in test.@mulAdd f80 (test)
    try expect(@mulAdd(f80, a, b, c) == 20);
    ^
/build/zig/src/zig-0.11.0/test/behavior/muladd.zig:62:5: 0x56029 in test.@mulAdd f80 (test)
    try testMulAdd80();
    ^
run test behavior-native-ReleaseSafe-single: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/22ede742656338a3882693170027056f/test --listen=-
run test behavior-native-ReleaseSafe-libc: error: 'test.@mulAdd f80' failed: /build/zig/src/zig-0.11.0/lib/std/testing.zig:515:14: 0x49889 in test.@mulAdd f80 (test)
    if (!ok) return error.TestUnexpectedResult;
             ^
/build/zig/src/zig-0.11.0/test/behavior/muladd.zig:69:5: 0x49893 in test.@mulAdd f80 (test)
    try expect(@mulAdd(f80, a, b, c) == 20);
    ^
/build/zig/src/zig-0.11.0/test/behavior/muladd.zig:62:5: 0x4989d in test.@mulAdd f80 (test)
    try testMulAdd80();
    ^
run test behavior-native-ReleaseSafe-libc: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/5bbe769d5fc066733e5a3bd68680238b/test --listen=-
run test behavior-native-Debug-libc-cbe: error: 'test.remainder division' failed
run test behavior-native-Debug-libc-cbe: error: 'test.float remainder division using @rem' failed
run test behavior-native-Debug-libc-cbe: error: 'test.@min/max for floats' failed: expected -3.140625e+00, found 0.0e+00
run test behavior-native-Debug-libc-cbe: error: 'test.@mulAdd f16' failed
run test behavior-native-Debug-libc-cbe: error: 'test.vector f16' failed
run test behavior-native-Debug-libc-cbe: error: 'test.vector division operators' failed
run test behavior-native-Debug-libc-cbe: error: 'test.vector reduce operation' failed
run test behavior-native-Debug-libc-cbe: error: while executing test 'test.no clobbering happened', the following test command failed:
/build/zig/src/zig-0.11.0/zig-cache/o/d3a9e18c3eac3cf42da7da35cd2253ac/behavior-native-Debug-libc-cbe --listen=-
test.standalone.c_compiler.run test_c: error: the following command terminated with signal 6 (expected exited with code 0):
/build/zig/src/zig-0.11.0/zig-cache/o/d6bd2d1e3301063e4ca84b385e6e436e/test_c
test.standalone.c_compiler.run test_c: error: the following command terminated with signal 6 (expected exited with code 0):
/build/zig/src/zig-0.11.0/zig-cache/o/a61eba2289bddeec6f6edbd4504a51a0/test_c
test.standalone.c_compiler.run test_c: error: the following command terminated with signal 6 (expected exited with code 0):
/build/zig/src/zig-0.11.0/zig-cache/o/6ad05fdd14b113a55279a7bc58a4615c/test_c
test.standalone.c_compiler.zig build-exe test_cpp Debug native: error: error(compilation): clang failed with stderr: In file included from /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:2:
In file included from testinstall/usr/lib/zig/libcxx/include/iostream:43:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:26:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_functions.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/strstream.cpp:15:
In file included from testinstall/usr/lib/zig/libcxx/include/strstream:134:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/regex.cpp:11:
In file included from testinstall/usr/lib/zig/libcxx/include/regex:771:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/locale.cpp:18:
In file included from testinstall/usr/lib/zig/libcxx/include/codecvt:59:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__std_stream:16:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:186:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:193:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/format.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/format:181:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/container_adaptor.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_default_formatter.h:23:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_formatter.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/operations.cpp:14:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/directory_iterator.cpp:12:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'


test.standalone.c_compiler.zig build-exe test_cpp Debug native: error: the following command failed with 2 compilation errors:
/build/zig/src/zig-0.11.0/testinstall/usr/bin/zig build-exe /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp -lc++ --cache-dir /build/zig/src/zig-0.11.0/zig-cache --global-cache-dir /build/.cache/zig --name test_cpp --listen=-
test.standalone.c_compiler.run test_c: error: the following command terminated with signal 6 (expected exited with code 0):
/build/zig/src/zig-0.11.0/zig-cache/o/20460231184027fdf8db87ac5096bbbd/test_c
test.standalone.c_compiler.zig build-exe test_cpp ReleaseSmall native: error: error(compilation): clang failed with stderr: In file included from /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:2:
In file included from testinstall/usr/lib/zig/libcxx/include/iostream:43:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/strstream.cpp:15:
In file included from testinstall/usr/lib/zig/libcxx/include/strstream:134:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:26:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_functions.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/regex.cpp:11:
In file included from testinstall/usr/lib/zig/libcxx/include/regex:771:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__std_stream:16:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/locale.cpp:18:
In file included from testinstall/usr/lib/zig/libcxx/include/codecvt:59:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:186:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:193:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/format.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/format:181:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/container_adaptor.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_default_formatter.h:23:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_formatter.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/operations.cpp:14:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/directory_iterator.cpp:12:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'


test.standalone.c_compiler.zig build-exe test_cpp ReleaseSmall native: error: the following command failed with 2 compilation errors:
/build/zig/src/zig-0.11.0/testinstall/usr/bin/zig build-exe /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp -lc++ -OReleaseSmall --cache-dir /build/zig/src/zig-0.11.0/zig-cache --global-cache-dir /build/.cache/zig --name test_cpp --listen=-
test.standalone.c_compiler.zig build-exe test_cpp ReleaseSafe native: error: error(compilation): clang failed with stderr: In file included from /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:2:
In file included from testinstall/usr/lib/zig/libcxx/include/iostream:43:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/regex.cpp:11:
In file included from testinstall/usr/lib/zig/libcxx/include/regex:771:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/strstream.cpp:15:
In file included from testinstall/usr/lib/zig/libcxx/include/strstream:134:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:186:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:193:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__std_stream:16:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/locale.cpp:18:
In file included from testinstall/usr/lib/zig/libcxx/include/codecvt:59:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:26:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_functions.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/format.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/format:181:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/container_adaptor.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_default_formatter.h:23:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_formatter.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/operations.cpp:14:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/directory_iterator.cpp:12:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'


test.standalone.c_compiler.zig build-exe test_cpp ReleaseSafe native: error: the following command failed with 2 compilation errors:
/build/zig/src/zig-0.11.0/testinstall/usr/bin/zig build-exe /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp -lc++ -OReleaseSafe --cache-dir /build/zig/src/zig-0.11.0/zig-cache --global-cache-dir /build/.cache/zig --name test_cpp --listen=-
test.standalone.c_compiler.zig build-exe test_cpp ReleaseFast native: error: error(compilation): clang failed with stderr: In file included from /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:2:
In file included from testinstall/usr/lib/zig/libcxx/include/iostream:43:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/strstream.cpp:15:
In file included from testinstall/usr/lib/zig/libcxx/include/strstream:134:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/regex.cpp:11:
In file included from testinstall/usr/lib/zig/libcxx/include/regex:771:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/locale.cpp:18:
In file included from testinstall/usr/lib/zig/libcxx/include/codecvt:59:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/iostream.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__std_stream:16:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:186:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/ios.instantiations.cpp:10:
In file included from testinstall/usr/lib/zig/libcxx/include/fstream:193:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/format.cpp:9:
In file included from testinstall/usr/lib/zig/libcxx/include/format:181:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/container_adaptor.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_default_formatter.h:23:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/range_formatter.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/operations.cpp:14:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/filesystem/directory_iterator.cpp:12:
In file included from testinstall/usr/lib/zig/libcxx/include/filesystem:435:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/directory_entry.h:20:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/filesystem_error.h:15:
In file included from testinstall/usr/lib/zig/libcxx/include/__filesystem/path.h:25:
In file included from testinstall/usr/lib/zig/libcxx/include/iomanip:47:
In file included from testinstall/usr/lib/zig/libcxx/include/istream:165:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:171:
In file included from testinstall/usr/lib/zig/libcxx/include/ios:221:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'

error(compilation): clang failed with stderr: In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:26:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_functions.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/__format/format_context.h:30:
In file included from testinstall/usr/lib/zig/libcxx/include/locale:203:
In file included from testinstall/usr/lib/zig/libcxx/include/__locale:46:
testinstall/usr/lib/zig/libcxx/include/__support/musl/xlocale.h:40:42: error: functions that differ only in their return type cannot be overloaded
/usr/include/wchar.h:600:47: note: previous declaration is here
/usr/include/sys/cdefs.h:259:6: note: expanded from macro '__REDIRECT_NTH'
In file included from testinstall/usr/lib/zig/libcxx/src/chrono.cpp:16:
In file included from testinstall/usr/lib/zig/libcxx/include/chrono:773:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/formatter.h:21:
In file included from testinstall/usr/lib/zig/libcxx/include/__chrono/ostream.h:27:
In file included from testinstall/usr/lib/zig/libcxx/include/ostream:170:
testinstall/usr/lib/zig/libcxx/include/bitset:396:63: warning: shift count >= width of type [-Wshift-count-overflow]


test.standalone.c_compiler.zig build-exe test_cpp ReleaseFast native: error: the following command failed with 2 compilation errors:
/build/zig/src/zig-0.11.0/testinstall/usr/bin/zig build-exe /build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp -lc++ -OReleaseFast --cache-dir /build/zig/src/zig-0.11.0/zig-cache --global-cache-dir /build/.cache/zig --name test_cpp --listen=-
Build Summary: 2921/3011 steps succeeded; 60 skipped; 21 failed; 63806/66679 tests passed; 2857 skipped; 16 failed (disable with --summary none)
test transitive failure
+- zig build-exe zig Debug native 1 errors
+- test-cases transitive failure
|  +- run decl_value_arena skipped
|  +- run decl_value_arena skipped
|  +- run decl_value_arena skipped
|  +- run exit skipped
|  +- run exit skipped
|  +- run exit skipped
|  +- run f32_passed_to_variadic_fn skipped
|  +- run fn_typeinfo_passed_to_comptime_fn skipped
|  +- run fn_typeinfo_passed_to_comptime_fn skipped
|  +- run fn_typeinfo_passed_to_comptime_fn skipped
|  +- run fn_typeinfo_passed_to_comptime_fn skipped
|  +- run fn_typeinfo_passed_to_comptime_fn skipped
|  +- run fn_typeinfo_passed_to_comptime_fn skipped
|  +- run function_pointers skipped
|  +- run large_add_function skipped
|  +- run large_add_function skipped
|  +- run blocks skipped
|  +- run blocks skipped
|  +- run for_loop skipped
|  +- run hello_world skipped
|  +- run nested_blocks skipped
|  +- run nested_blocks skipped
|  +- run optionals skipped
|  +- run rem skipped
|  +- run rem skipped
|  +- run simple_addition_and_subtraction skipped
|  +- run simple_addition_and_subtraction skipped
|  +- run simple_if_statement skipped
|  +- run simple_if_statement skipped
|  +- run while_loops skipped
|  +- run while_loops skipped
|  +- run non_leaf_functions skipped
|  +- run non_leaf_functions skipped
|  +- run non_leaf_functions skipped
|  +- run passing_u0_to_function skipped
|  +- run passing_u0_to_function skipped
|  +- run passing_u0_to_function skipped
|  +- run print_u32s skipped
|  +- run recursive_fibonacci skipped
|  +- run recursive_fibonacci skipped
|  +- run runtime_bitwise_and skipped
|  +- run runtime_bitwise_and skipped
|  +- run runtime_bitwise_and skipped
|  +- run runtime_bitwise_or skipped
|  +- run runtime_bitwise_or skipped
|  +- run runtime_bitwise_or skipped
|  +- run @intFromFloat cannot fit - negative out of range failure
|  +- run @intFromFloat cannot fit - positive out of range failure
|  +- run save_function_return_values_in_callee_preserved_register skipped
|  +- run save_function_return_values_in_callee_preserved_register skipped
|  +- run save_function_return_values_in_callee_preserved_register skipped
|  +- run tail_call_noreturn skipped
|  +- run tail_call_noreturn skipped
|  +- run tail_call_noreturn skipped
+- test-behavior transitive failure
|  +- run test behavior-native-ReleaseFast 1686/1789 passed, 1 failed, 102 skipped
|  +- run test behavior-native-ReleaseFast-libc 1686/1789 passed, 1 failed, 102 skipped
|  +- run test behavior-native-ReleaseFast-single 1686/1789 passed, 1 failed, 102 skipped
|  +- run test behavior-native-ReleaseSafe 1688/1789 passed, 1 failed, 100 skipped
|  +- run test behavior-native-ReleaseSafe-libc 1688/1789 passed, 1 failed, 100 skipped
|  +- run test behavior-native-ReleaseSafe-single 1688/1789 passed, 1 failed, 100 skipped
|  +- run test behavior-native-ReleaseSmall 1686/1789 passed, 1 failed, 102 skipped
|  +- run test behavior-native-ReleaseSmall-libc 1686/1789 passed, 1 failed, 102 skipped
|  +- run test behavior-native-ReleaseSmall-single 1686/1789 passed, 1 failed, 102 skipped
|  +- run test behavior-native-Debug-libc-cbe 1655/1779 passed, 7 failed, 117 skipped
+- test-standalone transitive failure
   +- standalone.c_compiler.test transitive failure
      +- zig build-exe test_cpp Debug native 2 errors
      +- run test_c failure
      +- run test_cpp transitive failure
      |  +- zig build-exe test_cpp Debug native (reused)
      +- zig build-exe test_cpp ReleaseFast native 2 errors
      +- run test_c failure
      +- run test_cpp transitive failure
      |  +- zig build-exe test_cpp ReleaseFast native (reused)
      +- zig build-exe test_cpp ReleaseSmall native 2 errors
      +- run test_c failure
      +- run test_cpp transitive failure
      |  +- zig build-exe test_cpp ReleaseSmall native (reused)
      +- zig build-exe test_cpp ReleaseSafe native 2 errors
      +- run test_c failure
      +- run test_cpp transitive failure
         +- zig build-exe test_cpp ReleaseSafe native (reused)
testinstall/usr/lib/zig/std/os/linux.zig:87:33: error: root struct of file 'os.linux.riscv64' has no member named 'ucontext_t'
/build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:1:1: error: unable to build C object: clang exited with code 1
error: unable to build libcxx: SubCompilationFailed
/build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:1:1: error: unable to build C object: clang exited with code 1
error: unable to build libcxx: SubCompilationFailed
/build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:1:1: error: unable to build C object: clang exited with code 1
error: unable to build libcxx: SubCompilationFailed
/build/zig/src/zig-0.11.0/test/standalone/c_compiler/test.cpp:1:1: error: unable to build C object: clang exited with code 1
error: unable to build libcxx: SubCompilationFailed

felixonmars added a commit to felixonmars/archriscv-packages that referenced this issue Nov 22, 2023
Skip macho link tests because they don't build on riscv64.

`nocheck` is still required and test failures have been reported to
ziglang/zig#18018
felixonmars added a commit to felixonmars/archriscv-packages that referenced this issue Nov 22, 2023
Skip macho link tests because they don't build on riscv64.

`nocheck` is still required and test failures have been reported to
ziglang/zig#18018
@felixonmars
Copy link

I went on and gave a try to build ncdu with the resulting stage3 zig. It seems more problems ahead:

zig build-exe ncdu ReleaseSafe native-linux.5.15-gnu: error: error(compilation): clang failed with stderr: /usr/lib/zig/libc/glibc/sysdeps/riscv/start-2.33.S:48:2: error: unknown directive
 .cfi_label .Ldummy
 ^


zig build-exe ncdu ReleaseSafe native-linux.5.15-gnu: error: the following command failed with 3 compilation errors:
/usr/bin/zig build-exe /build/ncdu/src/ncdu-2.3/src/main.zig -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -lncursesw /build/ncdu/src/ncdu-2.3/src/ncurses_refs.c -lc -OReleaseSafe --cache-dir /build/ncdu/src/ncdu-2.3/zig-cache --global-cache-dir /build/.cache/zig --name ncdu -target native-linux.5.15-gnu -mcpu baseline_rv64 -L /usr/lib -I /usr/include -fPIE --listen=-                                                     
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
+- install ncdu transitive failure                                                                                                        
   +- zig build-exe ncdu ReleaseSafe native-linux.5.15-gnu 3 errors                                                                       
error: sub-compilation of glibc Scrt1.o failed
    /usr/lib/zig/libc/glibc/sysdeps/riscv/start-2.33.S:1:1: note: unable to build C object: clang exited with code 1                      
error: unable to build glibc CRT file: SubCompilationFailed
/usr/lib/zig/std/os/linux.zig:87:33: error: root struct of file 'os.linux.riscv64' has no member named 'ucontext_t'    

@felixonmars
Copy link

The first issue seems to be #3340 and could be worked around by removing the cfi_label line.

The second issue seems to require adding ucontect_t and relevant structs to std/os/linux/riscv64.zig

@RossComputerGuy
Copy link
Contributor

RossComputerGuy commented Feb 8, 2024

@felixonmars The cfi_label fix should come in #18803.

On the otherhand, I was shared this patch which would fix this particular issue. I don't see a PR for this fix so one should probably be open.

--- a/test/link/macho.zig
+++ b/test/link/macho.zig
@@ -3,9 +3,6 @@
 pub fn testAll(b: *Build, build_opts: BuildOptions) *Step {
     const macho_step = b.step("test-macho", "Run MachO tests");
 
-    const default_target = b.resolveTargetQuery(.{
-        .os_tag = .macos,
-    });
     const x86_64_target = b.resolveTargetQuery(.{
         .cpu_arch = .x86_64,
         .os_tag = .macos,
@@ -14,6 +11,12 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step {
         .cpu_arch = .aarch64,
         .os_tag = .macos,
     });
+    const default_target = switch (builtin.cpu.arch) {
+        .x86_64, .aarch64 => b.resolveTargetQuery(.{
+            .os_tag = .macos,
+        }),
+        else => aarch64_target,
+    };
 
     // Exercise linker with self-hosted backend (no LLVM)
     macho_step.dependOn(testHelloZig(b, .{ .use_llvm = false, .target = x86_64_target }));

@Vexu Vexu added bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness. zig build system std.Build, the build runner, `zig build` subcommand, package management os-macos labels Feb 9, 2024
@Vexu Vexu changed the title panic: reached unreachable code Compiler and build system panic on invalid macos target Feb 9, 2024
@Vexu
Copy link
Member

Vexu commented Feb 9, 2024

The compiler and build system should issue a proper error for this rather than panicking.

@RossComputerGuy
Copy link
Contributor

@Vexu yeah, though the problem comes from https://github.com/ziglang/zig/blob/master/lib/std/Target.zig#L299. How would std be updated to prevent an unreachable inside the builder like this?

@Vexu
Copy link
Member

Vexu commented Feb 9, 2024

Target.Query should issue an error for invalid macos architecture.

@Vexu
Copy link
Member

Vexu commented Feb 9, 2024

Target.Query improvements are covered by #18876.

@Vexu Vexu reopened this Feb 14, 2024
@Vexu Vexu added this to the 0.13.0 milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-riscv 32-bit and 64-bit RISC-V bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness. os-macos zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants