ziglang / zig-bootstrap Goto Github PK
View Code? Open in Web Editor NEWtake off every zig
take off every zig
Currently I see no POSIX-specific utlities need to bootstrap Zig besides bash. Maybe we can switch to use Python for scripting to reduce dependencies. Another benifit for this is to be able to run this on Windows.
I can compile from master for x86_64-linux-musl but when trying for arm with the command below I get the following errors.
./build -j4 arm-linux-musleabi mpcorenovfp
[ 99%] Building self-hosted component /home/lance/zig-bootstrap/out/build-zig-arm-linux-musleabi-mpcorenovfp/zig1.o
./src/link/MachO/Object.zig:295:53: error: expected type 'usize', found 'u64'
var code = try self.allocator.alloc(u8, sect.size);
^
./src/link/MachO/Object.zig:295:53: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
var code = try self.allocator.alloc(u8, sect.size);
^
./src/link/MachO/Object.zig:295:44: note: referenced here
var code = try self.allocator.alloc(u8, sect.size);
^
./src/link/MachO/Object.zig:216:5: note: referenced here
try self.parseSections();
^
./src/link/MachO/Zld.zig:296:17: note: referenced here
try object.parse();
^
./src/link/MachO/Zld.zig:216:5: note: referenced here
try self.parseInputFiles(files);
^
./src/link/MachO.zig:702:13: note: referenced here
try zld.link(input_files.items, full_out_path);
^
./src/Compilation.zig:1447:5: note: referenced here
try self.bin_file.flush(self);
^
./src/main.zig:2089:5: note: referenced here
try comp.update();
^
./src/main.zig:1930:35: note: referenced here
updateModule(gpa, comp, hook) catch |err| switch (err) {
^
./src/stage1.zig:47:43: note: referenced here
stage2.mainArgs(gpa, arena, args) catch |err| fatal("{s}", .{@errorName(err)});
^
./src/codegen/c.zig:900:58: error: destination type 'codegen.AnyMCValue' has size 16 but source type 'codegen.c.CValue' has size 8
inst.codegen.mcv = @bitCast(@import("../codegen.zig").AnyMCValue, result);
^
./src/codegen/c.zig:900:71: note: referenced here
inst.codegen.mcv = @bitCast(@import("../codegen.zig").AnyMCValue, result);
^
./src/codegen/c.zig:643:23: note: referenced here
.block => try genBlock(o, inst.castTag(.block).?),
^
./src/Sema.zig:1781:63: error: expected type 'usize', found 'u64'
.data = .{ .name = sema.mod.error_name_list.items[int] },
^
./src/Sema.zig:1781:63: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
.data = .{ .name = sema.mod.error_name_list.items[int] },
^
./src/codegen/wasm.zig:898:47: error: destination type 'codegen.AnyMCValue' has size 16 but source type 'codegen.wasm.WValue' has size 8
.mcv = @bitCast(AnyMCValue, WValue{ .block_idx = self.block_depth }),
^
./src/codegen/wasm.zig:1011:33: error: destination type 'codegen.wasm.WValue' has size 8 but source type 'codegen.AnyMCValue' has size 16
const wvalue = @bitCast(WValue, br.block.codegen.mcv);
^
./src/codegen/wasm.zig:1011:57: note: referenced here
const wvalue = @bitCast(WValue, br.block.codegen.mcv);
^
./src/translate_c.zig:4230:52: error: expected type 'usize', found 'u64'
return Tag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_type });
^
./src/translate_c.zig:4230:52: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
return Tag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_type });
^
./src/translate_c.zig:4230:41: note: referenced here
return Tag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_type });
^
./src/type.zig:2187:45: error: expected type 'usize', found 'u64'
return int_val.toUnsignedInt();
^
./src/type.zig:2187:45: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
return int_val.toUnsignedInt();
^
./src/translate_c.zig:2340:63: error: expected type 'usize', found 'u64'
const filler_node = try Tag.array_filler.create(c.arena, .{
^
./src/translate_c.zig:2340:63: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
const filler_node = try Tag.array_filler.create(c.arena, .{
^
./src/translate_c.zig:2340:52: note: referenced here
const filler_node = try Tag.array_filler.create(c.arena, .{
^
make[2]: *** [CMakeFiles/zig.dir/build.make:326: zig1.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:188: CMakeFiles/zig.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Attempting to run on Ubuntu the bootstrap build script for Zig 0.6.0 as-is leads to the error message "line 13: bad substitution". After some research, it looks like Ubuntu symlinks /bin/sh
to dash
instead of bash
. I was able to get the script running by invoking it as bash build ...
.
Is it possible to use bash
for all Linux systems? If not, perhaps a disclaimer in the bootstrap information might help others that run into this issue in the future.
Instead of copying the zig source over, a git submodule should be used as it would keep the source updated automatically.
LLVM's build cycle has a undeclared phony dependency on Git's Python 3 (of the form git
(or not? currently building to check) & an undeclared dependency onpython${major}${minor}
).
Here's a Nix expression for a reproducing derivation:
zig-bootstrap-29-0-repro.nix
{ pkgs ? import pkgsPath { }
, pkgsPath ? # <nixpkgs>
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/95b9c99f6d091273572ff1ec62b97b6ad3f68bdf.tar.gz";
sha256 = "1qcwr9binkwfayix88aljwssxi5djkwscx0rnwlk1yp9q60rgp3d";
}
, withUndeclaredInputs ? false
}:
pkgs.callPackage (
{ lib, stdenv, cmake, fetchFromGitHub, python3, writeScriptBin
, hostTriple ? let host = stdenv.hostPlatform.parsed; in {
cpu = host.cpu.name;
os = host.kernel.name;
abi = host.abi.name;
}
, withUndeclaredInputs ? true
}:
stdenv.mkDerivation rec {
pname = "zig-bootstrapped";
version = "0.6.0+2020-04-16";
src = fetchFromGitHub {
owner = "ziglang";
repo = "zig-bootstrap";
rev = "2bd6bea6203d7275851dacad34eaa8df205c8898";
sha256 = "0dk71y30pn85dr30q4dnhkbx2rsf28rinmhvv5qa7wrvcdvvbpv2";
};
nativeBuildInputs = [
cmake
] ++ lib.optionals withUndeclaredInputs [
# Python 3
python3
# usages: path /// dependency type; usage
# + ./clang/CMakeLists.txt /// hard
# - controlled by LLVM_INCLUDE_TESTS, enabled by default
# (unless LLVM_LIT is false, which it isn't, as
# ./llvm/utils/lit/lit.py exists in our vendoring)
# + ./clang/bindings/python/tests/CMakeLists.txt /// soft
# - used for target "check-clang-python"
# - controlled by RUN_PYTHON_TESTS, enabled by default
# (unless LLVM_ENABLE_PIC is false, due to a libclang.so dep)
# + ./clang/utils/perf-training/CMakeLists.txt /// hard?
# - used for targets "clear-profraw", "generate-profdata",
# "clear-dtrace-logs", & "generate-order-file"
# - these all just unceremoniously use PYTHON_EXECUTABLE
# - target "generate-order-file" creates CLANG_ORDER_FILE,
# which ./clang/CMakeLists.txt hard depends on existing when APPLE
# + ./lld/CMakeLists.txt /// hard
# - controlled by LLVM_INCLUDE_TESTS, enabled by default
# (unless LLVM_LIT is false, as above)
# + ./llvm/CMakeLists.txt /// hard
# - requires 2.7 or newer
# - used for LLVMBuild (llvm-build)
# - mocking out an executable to only pass FindPythonInterp's tests
# results in LLVMBUILDCMAKEFRAG not being generated & its include
# failing a screen of code later
# + ./llvm/cmake/config-ix.cmake /// hard?
# - PYTHON_EXECUTABLE used in the "find_python_module" function,
# which is used later in the same file to start finding modules
# + ./llvm/cmake/modules/AddLLVM.cmake /// hard
# - various utility usages? could probably be replaced here reasonably
# by invocations of other languages.
# + ./llvm/runtimes/CMakeLists.txt /// none
# - this file includes FindPythonInterp and then does nothing with it?
# + ./llvm/tools/llvm-shlib/CMakeLists.txt /// hard
# - controlled by MSVC
# - PYTHON_EXECUTABLE used to generate a C API export file for Windows
];
dontUseCmakeConfigure = true;
preBuild = ''
export HOME=$TMPDIR;
'';
buildPhase = let host = hostTriple; in ''
runHook preBuild
./build -j1 ${host.cpu}-${host.os}-${host.abi} baseline
runHook postBuild
'';
doCheck = false;
# everything is dumped in the `out` output b/c this takes forever to build
installPhase = ''
runHook preInstall
cp -R ./out/ "$out"/
runHook postInstall
'';
meta = {
description =
"General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software";
homepage = "https://ziglang.org/";
license = with lib.licenses; [ l.mit ];
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ andrewrk bb010g ];
};
}
) {
inherit withUndeclaredInputs;
}
Run nix-build --show-trace -k ./zig-bootstrap-29-0-repro.nix
to reproduce. To build successfully, pass an argument --arg withUndeclaredInputs true
. To use your local Nixpkgs channel instead of downloading & using the provided pinned version, pass an argument --arg pkgsPath '<nixpkgs>'
.
(An actual issue after bringing this up to Andrew on Twitter yesterday)
This one crashed clang!
-- Check for working C compiler: /home/andy/dev/bootstrap-zig/out/host/bin/zig -- broken
CMake Error at /nix/store/qbn4f7k7yj5dj8ay292hr2nv0q8854vq-cmake-3.16.3/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/home/andy/dev/bootstrap-zig/out/host/bin/zig"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/andy/dev/bootstrap-zig/out/build-llvm-powerpc64le-linux-musl/CMakeFiles/CMakeTmp
Run Build Command(s):/nix/store/as5612va9alwps1hlggh201iw181md8r-gnumake-4.2.1/bin/make cmTC_76b4c/fast && /nix/store/as5612va9alwps1hlggh201iw181md8r-gnumake-4.2.1/bin/make -f CMakeFiles/cmTC_76b4c.dir/build.make CMakeFiles/cmTC_76b4c.dir/build
make[1]: Entering directory '/home/andy/dev/bootstrap-zig/out/build-llvm-powerpc64le-linux-musl/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_76b4c.dir/testCCompiler.c.o
/home/andy/dev/bootstrap-zig/out/host/bin/zig cc -target powerpc64le-linux-musl -o CMakeFiles/cmTC_76b4c.dir/testCCompiler.c.o -c /home/andy/dev/bootstrap-zig/out/build-llvm-powerpc64le-linux-musl/CMakeFiles/CMakeTmp/testCCompiler.c
fatal error: error in backend: Do not know how to expand the result of this operator!
Stack dump:
0. Program arguments: /home/andy/dev/bootstrap-zig/out/host/bin/zig clang -c -MD -MV -MF zig-cache/tmp/fSpHbprMwAww-testCCompiler.o.d -nostdinc -fno-spell-checking -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/include -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/powerpc64-linux-musl -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/generic-musl -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/powerpc64le-linux-any -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/any-linux-any -target powerpc64le-unknown-linux-musl -Xclang -target-cpu -Xclang generic -Xclang -target-feature -Xclang -64bit,-64bitregs,-allow-unaligned-fp-access,-altivec,-booke,-bpermd,-cmpb,-crbits,-crypto,-direct-move,-e500,-extdiv,-fcpsgn,-float128,-fpcvt,-fprnd,-fpu,-fre,-fres,-frsqrte,-frsqrtes,-fsqrt,+hard-float,-htm,-icbt,-invariant-function-descriptors,-isa-v30-instructions,-isel,-ldbrx,-lfiwax,-longcall,-mfocrf,-msync,-partword-atomics,-popcntd,-power8-altivec,-power8-vector,-power9-altivec,-power9-vector,-ppc-postra-sched,-ppc-prera-sched,-ppc4xx,-ppc6xx,-qpx,-recipprec,-secure-plt,-slow-popcntd,-spe,-stfiwx,-two-const-nr,-vectors-use-two-units,-vsx -fno-omit-frame-pointer -fsanitize=undefined -fsanitize-trap=undefined -D_DEBUG -Og -fstack-protector-strong --param ssp-buffer-size=4 -o zig-cache/tmp/fSpHbprMwAww-testCCompiler.o /home/andy/dev/bootstrap-zig/out/build-llvm-powerpc64le-linux-musl/CMakeFiles/CMakeTmp/testCCompiler.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/home/andy/dev/bootstrap-zig/out/build-llvm-powerpc64le-linux-musl/CMakeFiles/CMakeTmp/testCCompiler.c'.
4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@main'
#0 0x00000000058ab6ea llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x58ab6ea)
#1 0x00000000058a9454 llvm::sys::RunSignalHandlers() (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x58a9454)
#2 0x00000000058a96e1 llvm::sys::CleanupOnSignal(unsigned long) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x58a96e1)
#3 0x00000000057e8264 llvm::CrashRecoveryContext::HandleExit(int) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57e8264)
#4 0x00000000058a2627 llvm::sys::Process::Exit(int) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x58a2627)
#5 0x0000000000c38943 LLVMErrorHandler(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc38943)
#6 0x00000000057ef487 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57ef487)
#7 0x00000000057ef5d0 llvm::report_fatal_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57ef5d0)
#8 0x000000000468eff4 llvm::DAGTypeLegalizer::ExpandIntegerResult(llvm::SDNode*, unsigned int) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x468eff4)
#9 0x00000000045fad57 llvm::DAGTypeLegalizer::run() (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x45fad57)
#10 0x00000000045fb0f1 llvm::SelectionDAG::LegalizeTypes() (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x45fb0f1)
#11 0x000000000459d821 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x459d821)
#12 0x00000000045a14df llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x45a14df)
#13 0x00000000045a4614 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x45a4614)
#14 0x00000000036ac259 (anonymous namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x36ac259)
#15 0x00000000048cbe74 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x48cbe74)
#16 0x00000000055820b8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x55820b8)
#17 0x0000000005583651 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x5583651)
#18 0x0000000005583a08 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x5583a08)
#19 0x0000000000ca037c clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xca037c)
#20 0x0000000000c52791 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc52791)
#21 0x0000000002727ff1 clang::ParseAST(clang::Sema&, bool, bool) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x2727ff1)
#22 0x0000000001130bb9 clang::FrontendAction::Execute() (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x1130bb9)
#23 0x00000000010ec413 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x10ec413)
#24 0x0000000000c4435b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc4435b)
#25 0x0000000000c390da cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc390da)
#26 0x0000000000c33c72 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc33c72)
#27 0x0000000001233c85 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x1233c85)
#28 0x00000000057e80f3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57e80f3)
#29 0x000000000123487e clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x123487e)
#30 0x000000000120b948 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x120b948)
#31 0x000000000120c249 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x120c249)
#32 0x0000000001213fff clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x1213fff)
#33 0x0000000000c37051 ZigClang_main (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc37051)
#34 0x0000000000a30501 main0(int, char**) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xa30501)
#35 0x00000000009a3127 main (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x9a3127)
#36 0x00007f10489b3b8e __libc_start_main (/nix/store/y9zg6ryffgc5c9y67fcmfdkyyiivjzpj-glibc-2.27/lib/libc.so.6+0x22b8e)
#37 0x0000000000a2ee3a _start /build/glibc-2.27/csu/../sysdeps/x86_64/start.S:122:0
zig: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 10.0.0 (/home/andy/dev/bootstrap-zig/clang e1504c160a6174bc3243cc828499d80b727507de)
Target: powerpc64le-unknown-linux-musl
Thread model: posix
InstalledDir: /run/current-system/sw/bin
zig: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
zig: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
zig: note: diagnostic msg: /run/user/1000/testCCompiler-5a2058.c
zig: note: diagnostic msg: /run/user/1000/testCCompiler-5a2058.sh
zig: note: diagnostic msg:
********************
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_M_create
The following command failed:
/home/andy/dev/bootstrap-zig/out/host/bin/zig clang -c -MD -MV -MF zig-cache/tmp/fSpHbprMwAww-testCCompiler.o.d -nostdinc -fno-spell-checking -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/include -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/powerpc64-linux-musl -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/generic-musl -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/powerpc64le-linux-any -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/any-linux-any -target powerpc64le-unknown-linux-musl -Xclang -target-cpu -Xclang generic -Xclang -target-feature -Xclang -64bit,-64bitregs,-allow-unaligned-fp-access,-altivec,-booke,-bpermd,-cmpb,-crbits,-crypto,-direct-move,-e500,-extdiv,-fcpsgn,-float128,-fpcvt,-fprnd,-fpu,-fre,-fres,-frsqrte,-frsqrtes,-fsqrt,+hard-float,-htm,-icbt,-invariant-function-descriptors,-isa-v30-instructions,-isel,-ldbrx,-lfiwax,-longcall,-mfocrf,-msync,-partword-atomics,-popcntd,-power8-altivec,-power8-vector,-power9-altivec,-power9-vector,-ppc-postra-sched,-ppc-prera-sched,-ppc4xx,-ppc6xx,-qpx,-recipprec,-secure-plt,-slow-popcntd,-spe,-stfiwx,-two-const-nr,-vectors-use-two-units,-vsx -fno-omit-frame-pointer -fsanitize=undefined -fsanitize-trap=undefined -D_DEBUG -Og -fstack-protector-strong --param ssp-buffer-size=4 -o zig-cache/tmp/fSpHbprMwAww-testCCompiler.o /home/andy/dev/bootstrap-zig/out/build-llvm-powerpc64le-linux-musl/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: *** [CMakeFiles/cmTC_76b4c.dir/build.make:66: CMakeFiles/cmTC_76b4c.dir/testCCompiler.c.o] Error 1
make[1]: Leaving directory '/home/andy/dev/bootstrap-zig/out/build-llvm-powerpc64le-linux-musl/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_76b4c/fast] Error 2
[ 5%] Linking CXX executable ../../bin/llvm-tblgen
warning: unsupported linker arg: -allow-shlib-undefined
warning: unsupported linker arg: -O3
warning: unsupported linker arg: --gc-sections
lld: error: undefined symbol: _Unwind_Resume
>>> referenced by cxa_guard.cpp
>>> /home/andy/.cache/zig/stage1/o/LXJ6UCtVoQ2R9vWp__dOACHpfLGEHpsWZAbrKIseuPa2QI20nDtL1U6OlB0dmZSh/cxa_guard.o:(__cxa_guard_acquire) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:(__cxa_demangle) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:(__cxa_demangle) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:((anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::parseTemplateArgs(bool)) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:((anonymous namespace)::itanium_demangle::ForwardTemplateReference::hasRHSComponentSlow((anonymous namespace)::itanium_demangle::OutputStream&) const) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:((anonymous namespace)::itanium_demangle::ForwardTemplateReference::hasArraySlow((anonymous namespace)::itanium_demangle::OutputStream&) const) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:((anonymous namespace)::itanium_demangle::ForwardTemplateReference::hasFunctionSlow((anonymous namespace)::itanium_demangle::OutputStream&) const) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:((anonymous namespace)::itanium_demangle::ForwardTemplateReference::getSyntaxNode((anonymous namespace)::itanium_demangle::OutputStream&) const) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:((anonymous namespace)::itanium_demangle::ForwardTemplateReference::printLeft((anonymous namespace)::itanium_demangle::OutputStream&) const) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_demangle.cpp
>>> /home/andy/.cache/zig/stage1/o/nTgnXN0Jb-D7x1Fyg3kX1rA2lf0ZBX6O7Jv-3wCaFT1cyXdPB3blFvdhBRpJzlbo/cxa_demangle.o:((anonymous namespace)::itanium_demangle::ForwardTemplateReference::printRight((anonymous namespace)::itanium_demangle::OutputStream&) const) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced 90 more times
lld: error: undefined symbol: _Unwind_RaiseException
>>> referenced by cxa_exception.cpp
>>> /home/andy/.cache/zig/stage1/o/2UpEDygc3DpAQeDk9mwJcBinvpku9bfuYICqJbD-ihBbJGMIVn4o9vk4sS62MEGZ/cxa_exception.o:(__cxa_throw) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_exception.cpp
>>> /home/andy/.cache/zig/stage1/o/2UpEDygc3DpAQeDk9mwJcBinvpku9bfuYICqJbD-ihBbJGMIVn4o9vk4sS62MEGZ/cxa_exception.o:(__cxa_rethrow) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_exception.cpp
>>> /home/andy/.cache/zig/stage1/o/2UpEDygc3DpAQeDk9mwJcBinvpku9bfuYICqJbD-ihBbJGMIVn4o9vk4sS62MEGZ/cxa_exception.o:(__cxa_rethrow_primary_exception) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
lld: error: undefined symbol: _Unwind_DeleteException
>>> referenced by cxa_exception.cpp
>>> /home/andy/.cache/zig/stage1/o/2UpEDygc3DpAQeDk9mwJcBinvpku9bfuYICqJbD-ihBbJGMIVn4o9vk4sS62MEGZ/cxa_exception.o:(__cxa_end_catch) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
lld: error: undefined symbol: _Unwind_VRS_Set
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
lld: error: undefined symbol: _Unwind_VRS_Get
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__cxxabiv1::scan_eh_tab(__cxxabiv1::(anonymous namespace)::scan_results&, _Unwind_Action, bool, _Unwind_Control_Block*, _Unwind_Context*)) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
lld: error: undefined symbol: __gnu_unwind_frame
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__gxx_personality_v0) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
lld: error: undefined symbol: _Unwind_GetLanguageSpecificData
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__cxxabiv1::scan_eh_tab(__cxxabiv1::(anonymous namespace)::scan_results&, _Unwind_Action, bool, _Unwind_Control_Block*, _Unwind_Context*)) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
lld: error: undefined symbol: _Unwind_GetRegionStart
>>> referenced by cxa_personality.cpp
>>> /home/andy/.cache/zig/stage1/o/FFtIKI4fP9Vftn2C2fQht7A0PKVyVfOBPDBYXNvAo2sR73USdUTDk_jSLNdV9kVA/cxa_personality.o:(__cxxabiv1::scan_eh_tab(__cxxabiv1::(anonymous namespace)::scan_results&, _Unwind_Action, bool, _Unwind_Control_Block*, _Unwind_Context*)) in archive /home/andy/.cache/zig/stage1/o/_TNe8eWFsSv6GGM1wA2mhHGPTa9t9p1Uf5-tXWy6rTl5YdbnT1QDjiXZSA-6EmxW/libc++abi.a
make[2]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/build.make:176: bin/llvm-tblgen] Error 1
make[1]: *** [CMakeFiles/Makefile2:8865: utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
It looks like the version of zig in the repo can't even compile for this target:
-- The C compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/riley/zig-bootstrap/out/host/bin/zig
-- Check for working C compiler: /home/riley/zig-bootstrap/out/host/bin/zig - broken
CMake Error at /usr/local/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"/home/riley/zig-bootstrap/out/host/bin/zig"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/riley/zig-bootstrap/out/build-zlib-aarch64-windows-gnu-baseline/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_c2e8c/fast && /usr/bin/make -f CMakeFiles/cmTC_c2e8c.dir/build.make CMakeFiles/cmTC_c2e8c.dir/build
make[1]: Entering directory '/home/riley/zig-bootstrap/out/build-zlib-aarch64-windows-gnu-baseline/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c2e8c.dir/testCCompiler.c.obj
/home/riley/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -target aarch64-windows-gnu -mcpu=baseline -MD -MT CMakeFiles/cmTC_c2e8c.dir/testCCompiler.c.obj -MF CMakeFiles/cmTC_c2e8c.dir/testCCompiler.c.obj.d -o CMakeFiles/cmTC_c2e8c.dir/testCCompiler.c.obj -c /home/riley/zig-bootstrap/out/build-zlib-aarch64-windows-gnu-baseline/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_c2e8c.exe
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c2e8c.dir/link.txt --verbose=1
/usr/local/bin/cmake -E rm -f CMakeFiles/cmTC_c2e8c.dir/objects.a
/home/riley/zig-bootstrap/out/host/bin/llvm-ar cr CMakeFiles/cmTC_c2e8c.dir/objects.a @CMakeFiles/cmTC_c2e8c.dir/objects1.rsp
/home/riley/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -target aarch64-windows-gnu -mcpu=baseline -Wl,--whole-archive CMakeFiles/cmTC_c2e8c.dir/objects.a -Wl,--no-whole-archive -o cmTC_c2e8c.exe -Wl,--out-implib,libcmTC_c2e8c.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/cmTC_c2e8c.dir/linklibs.rsp
warning: unsupported linker arg: --whole-archive
warning: unsupported linker arg: --no-whole-archive
warning: unsupported linker arg: --out-implib
warning: unsupported linker arg: libcmTC_c2e8c.dll.a
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/s_truncf.c:24:10: fatal error: '../bsd_private_base.h' file not found
#include "../bsd_private_base.h"
^~~~~~~~~~~~~~~~~~~~~~~
1 error/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/s_trunc.c:26:10: fatal error: '../bsd_private_base.h' file not found
generated.
#include "../bsd_private_base.h"
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
free(): corrupted unsorted chunks
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:17:8: error: vector register expected
push {r4, r5, r11, lr}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:18:6: error: invalid operand for instruction
add r11, sp, #8
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:19:9: error: vector register expected
vpush {d8}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/nearbyintl.S/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:21:6: error: invalid operand for instruction
mov r4, r0
^
:14:8: error: vector register expected
push {r4, lr}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:22:6: error: invalid operand for instruction
mov r5, r1
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:23:2: error: unrecognized instruction mnemonic, did you mean: fmov, mov, movi, movk, movn, movz, smov, umov?
vmov.f64 d8, d0
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/nearbyintl.S:15:2: error: unrecognized instruction mnemonic, did you mean: mrs?
vmrs r4, fpscr
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:25:2: error: unrecognized instruction mnemonic, did you mean: stlr, str, strb, strh, sttr, stur, stxr?
vstr d0, [r4]
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:27:2: error: unrecognized instruction mnemonic, did you mean: fmov, mov, movi, movk, movn, movz, smov, umov?
vmov.f64 d0, d8
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/nearbyintl.S:17:2: error: unrecognized instruction mnemonic, did you mean: msr?
vmsr fpscr, r4
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/nearbyintl.S:18:7: error: vector register expected
pop {r4, pc}
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S : 29^:
2: error: unrecognized instruction mnemonic, did you mean: stlr, str, strb, strh, sttr, stur, stxr?
vstr d0, [r5]
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:31:8: error: vector register expected
vpop {d8}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincos.S:32:7: error: vector register expected
pop {r4, r5, r11, pc}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:14:8: error: vector register expected
push {r4, r5, r11, lr}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:15:6: error: invalid operand for instruction
add r11, sp, #8
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:16:9: error: vector register expected
vpush {d8}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:18:6: error: invalid operand for instruction
mov r4, r0
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:19:6: error: invalid operand for instruction
mov r5, r1
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:20:2: error: unrecognized instruction mnemonic, did you mean: fmov, mov, movi, movk, movn, movz, smov, umov?
vmov.f32 s16, s0
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:22:2: error: unrecognized instruction mnemonic, did you mean: stlr, str, strb, strh, sttr, stur, stxr?
vstr s0, [r4]
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:24:2: error: unrecognized instruction mnemonic, did you mean: fmov, mov, movi, movk, movn, movz, smov, umov?
vmov.f32 s0, s16
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:26:2: error: unrecognized instruction mnemonic, did you mean: stlr, str, strb, strh, sttr, stur, stxr?
vstr s0, [r5]
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:28:8: error: vector register expected
vpop {d8}
^
/home/riley/zig-bootstrap/out/host/lib/zig/libc/mingw/math/arm/sincosf.S:29:7: error: vector register expected
pop {r4, r5, r11, pc}
^
Error running link command: Segmentation fault
make[1]: *** [CMakeFiles/cmTC_c2e8c.dir/build.make:102: cmTC_c2e8c.exe] Error 1
make[1]: Leaving directory '/home/riley/zig-bootstrap/out/build-zlib-aarch64-windows-gnu-baseline/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_c2e8c/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
-- Configuring incomplete, errors occurred!
See also "/home/riley/zig-bootstrap/out/build-zlib-aarch64-windows-gnu-baseline/CMakeFiles/CMakeOutput.log".
See also "/home/riley/zig-bootstrap/out/build-zlib-aarch64-windows-gnu-baseline/CMakeFiles/CMakeError.log".
We get pretty far:
[ 99%] Built target zig0 [40/8420]
[ 99%] Building self-hosted component /usr/home/kameliya/Code/zig-bootstrap/out/build-zig-host/zig1.o
Scanning dependencies of target zig
[100%] Building CXX object CMakeFiles/zig.dir/src/stage1/empty.cpp.o
[100%] Linking CXX executable zig
[100%] Built target zig
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig
-- Set runtime path of "/usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig" to ""
-- Installing: /usr/home/kameliya/Code/zig-bootstrap/out/host/lib
-- The C compiler identification is Clang 11.0.1
-- The CXX compiler identification is Clang 11.0.1
-- The ASM compiler identification is unknown
-- Found assembler: /usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig
-- Check for working C compiler: /usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig - broken
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"/usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /usr/home/kameliya/Code/zig-bootstrap/out/build-llvm-x86_64-freebsd-gnu-baseline/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_f356b/fast && /usr/bin/make -f CMakeFiles/cmTC_f356b.dir/build.make CMakeFiles/cmTC_f356b.dir/build
Building C object CMakeFiles/cmTC_f356b.dir/testCCompiler.c.o
/usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -target x86_64-freebsd-gnu -mcpu=baseline -o CMakeFiles/cmTC_f356b.di
r/testCCompiler.c.o -c /usr/home/kameliya/Code/zig-bootstrap/out/build-llvm-x86_64-freebsd-gnu-baseline/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_f356b
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f356b.dir/link.txt --verbose=1
/usr/home/kameliya/Code/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -target x86_64-freebsd-gnu -mcpu=baseline CMakeFiles/cmTC_f356b.dir/test
CCompiler.c.o -o cmTC_f356b
In file included from /usr/home/kameliya/Code/zig-bootstrap/out/host/lib/zig/libunwind/src/libunwind.cpp:12:
In file included from /usr/home/kameliya/Code/zig-bootstrap/out/host/lib/zig/libunwind/include/libunwind.h:18:
In file included from /usr/home/kameliya/Code/zig-bootstrap/out/host/lib/zig/libcxx/include/stdint.h:106:
/usr/home/kameliya/Code/zig-bootstrap/out/host/lib/zig/libcxx/include/__config:247:12: fatal error: 'sys/endian.h' file not found
# include <sys/endian.h>
^~~~~~~~~~~~~~
1 error generated.
*** Error code 1
Stop.
make[1]: stopped in /usr/home/kameliya/Code/zig-bootstrap/out/build-llvm-x86_64-freebsd-gnu-baseline/CMakeFiles/CMakeTmp
*** Error code 1
Stop.
make: stopped in /usr/home/kameliya/Code/zig-bootstrap/out/build-llvm-x86_64-freebsd-gnu-baseline/CMakeFiles/CMakeTmp
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:57 (project)
-- Configuring incomplete, errors occurred!
See also "/usr/home/kameliya/Code/zig-bootstrap/out/build-llvm-x86_64-freebsd-gnu-baseline/CMakeFiles/CMakeOutput.log".
See also "/usr/home/kameliya/Code/zig-bootstrap/out/build-llvm-x86_64-freebsd-gnu-baseline/CMakeFiles/CMakeError.log".
[ 8%] Linking CXX shared module ../../LLVMHello.so
warning: unsupported linker arg: -O3
warning: unsupported linker arg: --gc-sections
warning: unsupported linker arg: --version-script
warning: unsupported linker arg: /home/andy/dev/bootstrap-zig/out/build-llvm-mips64el-linux-musl/lib/Transforms/Hello/LLVMHello.exports
warning: unsupported linker arg: -z
warning: unsupported linker arg: nodelete
lld: error: can't create dynamic relocation R_MIPS_64 against symbol: DW.ref.__gxx_personality_v0 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /home/andy/.cache/zig/stage1/o/uaPpjWXXLVoQKEib-ER81h5jQb-cdtJxGrifvrRbSFJoyWDeOxO78ob0GfF_F8Pv/libc++.a(/home/andy/.cache/zig/stage1/o/_-0XcBUeTnuXpdMG0KAoTyXYgRxrDkE-C_cNC6OTx3RxxbOBFeYN_V0UIQy3BdOq/new.o)
>>> referenced by new.cpp
>>> /home/andy/.cache/zig/stage1/o/_-0XcBUeTnuXpdMG0KAoTyXYgRxrDkE-C_cNC6OTx3RxxbOBFeYN_V0UIQy3BdOq/new.o:(.eh_frame+0x3AA3) in archive /home/andy/.cache/zig/stage1/o/uaPpjWXXLVoQKEib-ER81h5jQb-cdtJxGrifvrRbSFJoyWDeOxO78ob0GfF_F8Pv/libc++.a
Currently, whenever we update the sources, we apply the same patches again. This is not only redundant but also making the commit log messy.
Suggestions:
If the $TARGET is the same as the host, could the bootstrap be greatly sped-up by skipping the rebuild of LLVM with Zig?
Archive: zig+llvm+lld+clang-x86_64-windows-gnu-0.9.0-dev.1249+210ef5af8.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
This is from MSYS2 unzip
. Explorer isn't happy either; same result for the artifact before that.
Perhaps the artifact should be zipped before uploading, as advised in the Actions warning?
โโท 1c9ef63
$ echo $(lsb_release -sir)
Debian 10
$ ./build -j1 arm-linux-musleabihf baseline
./build: 16: ./build: Bad substitution
$ head -1 build
#!/bin/sh
$ awk 'NR==16' build
TARGET_OS_CMAKE="${TARGET_OS_CMAKE/macos/Darwin}"
A typical /bin/sh
doesn't support substitutions. Is your /bin/sh
still a link to bash
?
bash ./build -j1 arm-linux-musleabihf baseline
...starts to run as expected.
[100%] Linking CXX executable zig
[100%] Built target zig
Install the project...
-- Install configuration: "Release"
-- Installing: /home/andy/dev/bootstrap-zig/out/host/bin/zig
-- Set runtime path of "/home/andy/dev/bootstrap-zig/out/host/bin/zig" to ""
-- Installing: /home/andy/dev/bootstrap-zig/out/host/lib
-- The C compiler identification is Clang 11.0.0
-- The CXX compiler identification is Clang 11.0.0
-- The ASM compiler identification is unknown
-- Found assembler: /home/andy/dev/bootstrap-zig/out/host/bin/zig
-- Check for working C compiler: /home/andy/dev/bootstrap-zig/out/host/bin/zig
-- Check for working C compiler: /home/andy/dev/bootstrap-zig/out/host/bin/zig -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/andy/dev/bootstrap-zig/out/host/bin/zig
-- Check for working CXX compiler: /home/andy/dev/bootstrap-zig/out/host/bin/zig -- broken
CMake Error at /nix/store/acw9iism5wr6mxaq54h306bbxnl27n63-cmake-3.16.3/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler
"/home/andy/dev/bootstrap-zig/out/host/bin/zig"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/andy/dev/bootstrap-zig/out/build-llvm-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmp
Run Build Command(s):/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin/make cmTC_7ccfb/fast && /nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin/make -f CMakeFiles/cmTC_7ccfb.dir/build.make CMakeFiles/cmTC_7ccfb.dir/build
make[1]: Entering directory '/home/andy/dev/bootstrap-zig/out/build-llvm-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_7ccfb.dir/testCXXCompiler.cxx.o
/home/andy/dev/bootstrap-zig/out/host/bin/zig c++ -fno-sanitize=all -target arm-linux-musleabi -mcpu=generic+v6kz -o CMakeFiles/cmTC_7ccfb.dir/testCXXCompiler.cxx.o -c /home/andy/dev/bootstrap-zig/out/build-llvm-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_7ccfb
/nix/store/acw9iism5wr6mxaq54h306bbxnl27n63-cmake-3.16.3/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7ccfb.dir/link.txt --verbose=1
/home/andy/dev/bootstrap-zig/out/host/bin/zig c++ -fno-sanitize=all -target arm-linux-musleabi -mcpu=generic+v6kz CMakeFiles/cmTC_7ccfb.dir/testCXXCompiler.cxx.o -o cmTC_7ccfb
In file included from /home/andy/dev/bootstrap-zig/out/host/lib/zig/libcxx/src/algorithm.cpp:9:
In file included from /home/andy/dev/bootstrap-zig/out/host/lib/zig/libcxx/include/algorithm:643:
In file included from /home/andy/dev/bootstrap-zig/out/host/lib/zig/libcxx/include/memory:681:
/home/andy/dev/bootstrap-zig/out/host/lib/zig/libcxx/include/atomic:2780:16: error: use of undeclared identifier '__libcpp_signed_lock_free'
typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
^
/home/andy/dev/bootstrap-zig/out/host/lib/zig/libcxx/include/atomic:2781:16: error: use of undeclared identifier '__libcpp_unsigned_lock_free'
typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
^
2 errors generated.
make[1]: *** [CMakeFiles/cmTC_7ccfb.dir/build.make:87: cmTC_7ccfb] Error 1
make[1]: Leaving directory '/home/andy/dev/bootstrap-zig/out/build-llvm-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_7ccfb/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:57 (project)
I'm trying to bootstrap zig. However, stage1 compiler crashes on code generation phase.
$ ./build -j2 native baseline
...
[100%] Built target zig
Install the project...
-- Install configuration: "Release"
-- Installing: /tmp/zig-bootstrap-0.9.1/out/host/bin/zig
-- Installing: /tmp/zig-bootstrap-0.9.1/out/host/lib
::
:: ERROR: Segmentation fault
:: (execute_process)
::
:: argv: /tmp/zig-bootstrap-0.9.1/out/build-zig-host/zig build --zig-lib-dir /tmp/zig-bootstrap-0.9.1/zig/lib -Dlib-files-only --prefix /tmp/zig-bootstrap-0.9.1/out/host -Dconfig_h=/tmp/zig-bootstrap-0.9.1/out/build-zig-host/config.h install
::
:: argv[0]: /tmp/zig-bootstrap-0.9.1/out/build-zig-host/zig
:: argv[1]: build
:: argv[2]: --zig-lib-dir
:: argv[3]: /tmp/zig-bootstrap-0.9.1/zig/lib
:: argv[4]: -Dlib-files-only
:: argv[5]: --prefix
:: argv[6]: /tmp/zig-bootstrap-0.9.1/out/host
:: argv[7]: -Dconfig_h=/tmp/zig-bootstrap-0.9.1/out/build-zig-host/config.h
:: argv[8]: install
::
CMake Error at /tmp/zig-bootstrap-0.9.1/zig/cmake/install.cmake:36 (message):
Call Stack (most recent call first):
cmake_install.cmake:78 (include)
Makefile:92: recipe for target 'install' failed
make: *** [install] Error 1
Running zig build
inside zig directory:
$ zig build
Code Generation [630/572] compiler_rt.udivmod.udivmod... Segmentation fault
Stack seems to be corrupted, so backtrace looks like this:
(gdb) bt
#0 0x0b9f602e in __libc_realloc ()
#1 0x00000000 in ?? ()
With single stepping I've located crash in LLVM's ModulePassManager::run (zig_llvm.cpp, line 386). Even more precisely, it seems to be somewhere in llvm::ModuleToFunctionPassAdaptor::run, but I can't get closer.
My build environment is custom Linux chroot with musl libc, i386. Tried to bootstrap with both gcc (7.5) and clang (13). The only thing I've altered was build script, adding -DLLVM_BUILD_STATIC=ON -DLIBCLANG_BUILD_STATIC=ON
to first stage LLVM's config.
lld: error: /home/andy/.cache/zig/stage1/o/idTlYJzLF5JDepr0OBQiZEUxpNLOfZLOLICfh_CQDzGq4eT7v8CtG_4dBaZAqBT2/libcompiler_rt.a(/home/andy/.cache/zig/stage1/o/idTlYJzLF5JDepr0OBQiZEUxpNLOfZLOLICfh_CQDzGq4eT7v8CtG_4dBaZAqBT2/compiler_rt.o): cannot link object files with different floating-point ABI
lld: error: /home/andy/.cache/zig/stage1/o/idTlYJzLF5JDepr0OBQiZEUxpNLOfZLOLICfh_CQDzGq4eT7v8CtG_4dBaZAqBT2/libcompiler_rt.a(/home/andy/.cache/zig/stage1/o/idTlYJzLF5JDepr0OBQiZEUxpNLOfZLOLICfh_CQDzGq4eT7v8CtG_4dBaZAqBT2/compiler_rt.o): cannot link object files with different floating-point ABI
lld: error: undefined symbol: _Unwind_Resume
>>> referenced by ios.cpp
>>> /home/andy/.cache/zig/stage1/o/VXVFC-R6rO1gnod_SD4DUfoX4wA9ftIZncqL5nvl-MQO2dNiKBz5JfxuI9x6Fg8V/ios.o:(std::__1::ios_base::copyfmt(std::__1::ios_base const&)) in archive /home/andy/.cache/zig/stage1/o/sGdJPGnwDYy7qkUqURlEuf-c0KopUXXBRGm_eNwQxazi9ZnVK9qwkL_p3y4R0lrV/libc++.a
>>> referenced by ios.cpp
https://git-scm.com/book/en/v2/Git-Tools-Submodules
$ git submodule add https://github.com/ziglang/zig.git
$ git submodule add https://github.com/llvm/llvm-project.git
/zig -> /zig
/clang -> /llvm-project/clang
/lld -> /llvm-project/lld
/llvm -> /llvm-project/llvm
to workaround ziglang/zig#8562, ish-app/ish#1468 etc
i.e. probably I can put something other than 'baseline' in -mcpu but no idea where to start
I forgot to specify the third argument, and got no warning until a compile error much of the way through saying it could not detect features of "" cpu. Makes sense in retrospect, but shows that validating arguments would be very helpful for people who are not familiar with classic system programming toolchains and configuration.
./build -j4 arm-linux-musleabi mpcorenovfp
/home/user/zig-bootstrap/out/host/lib/zig/libc/musl/libc.s:3:19: error: expected STT_<TYPE_IN_UPPER_CASE>, '#<type>', '%<type>' or "<type>"
.type ___environ, @object;
^
And then it repeats this error a bunch of times with different line numbers for libc.s
I've previously built 0.7.0 fine, but I'm having this issue with 0.7.1.
I'm compiling on Debian 10.
std::errc::state_not_recoverable
.
CMake can do -G 'Ninja'
to generate ninja.build
files instead of Makefiles.
Apparently ninja is faster, simpler, and more modern? That's what I'm told at least.
I compiled a binary for people to try on their RPI0/RPI1 (don't have one myself).
@fengb and @shakesoda tried it but got the following error:
SIGILL, Illegal instruction. -- 0x025bf470 in __ARMv7ABSLongThunk___libc_start_main ()
Illegal instruction
because something emitted armv7 code, which the RPI0/RPI1 doesn't understand.
I suspect a few things:
arm-linux-musleabi
to clang/llvm defaults to armv7. -- LLVM default target triple: arm-linux-musleabi
Edit: @LemonBoy mentioned in IRC: 'lld was tricked into thinking you're targeting a v7 or greater arch'
This one gets quite close - all the way through LLVM and then chokes on zig_clang.cpp:
/home/andy/dev/bootstrap-zig/zig/src/zig_clang.cpp:1423:1: error: static_assert failed due to requirement 'sizeof(ZigClangAPValue) == sizeof(clang::APValue)' ""
static_assert(sizeof(ZigClangAPValue) == sizeof(clang::APValue), "");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andy/dev/bootstrap-zig/zig/src/zig_clang.cpp:1449:1: error: static_assert failed due to requirement 'sizeof(ZigClangExprEvalResult) == sizeof(clang::Expr::EvalResult)' ""
static_assert(sizeof(ZigClangExprEvalResult) == sizeof(clang::Expr::EvalResult), "");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The paths searched in zig/cmake/Findllvm.cmake
when looking for llvm-config
are all system level and do not handle the scenario where the system LLVM may be an older version than the current target of zig-bootstrap.
Apply this diff:
diff --git a/build b/build
index b04aa6efb..de95f721d 100755
--- a/build
+++ b/build
@@ -126,7 +126,7 @@ cmake "$ROOTDIR/zig" \
-DCMAKE_SYSTEM_NAME="$TARGET_OS_CMAKE" \
-DCMAKE_AR="$ROOTDIR/out/host/bin/llvm-ar" \
-DCMAKE_RANLIB="$ROOTDIR/out/host/bin/llvm-ranlib" \
- -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_TYPE=Debug \
-DZIG_TARGET_TRIPLE="$TARGET" \
-DZIG_TARGET_MCPU="$MCPU" \
-DZIG_EXECUTABLE="$ZIG" \
(END)
Then you get this error:
warning: unsupported linker arg: -headerpad_max_install_names
error(link): undefined reference to symbol '__ZNK4llvm3cfg6UpdateIPNS_10BasicBlockEE4dumpEv'
error(link): first referenced in '/Users/kubkon/dev/zig-bootstrap/out/build-zig-aarch64-macos-gnu-baseline/zigcpp/libzigcpp.a(zig_llvm.cpp.o)'
error: UndefinedSymbolReference
make[2]: *** [zig] Error 1
make[1]: *** [CMakeFiles/zig.dir/all] Error 2
make: *** [all] Error 2
Architecture: AMD64 iCore 5
OS: Arch Linux
Log:
Configuring zig version 0.7.0
-- Configuring done
-- Generating done
-- Build files have been written to: ... zig-bootstrap-0.7.0/out/build-zig-native-native-musl-native
[ 1%] ... zig-bootstrap-0.7.0/out/build-zig-native-native-musl-native
/zig1.o
[ 78%] Built target embedded_softfloat
[ 80%] Built target opt_c_util
[ 84%] Built target zigcpp
[ 98%] Built target zigstage1
[ 99%] Linking CXX executable zig0
[ 99%] Built target zig_build_zig1
Scanning dependencies of target zig
[ 99%] Building CXX object CMakeFiles/zig.dir/src/stage1/empty.cpp.o
[100%] Linking CXX executable zig
lld: error: undefined symbol: compressBound
referenced by Compression.cpp
Compression.cpp.o:(llvm::zlib::compress(llvm::StringRef, llvm::SmallVectorImpl&, int)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
lld: error: undefined symbol: compress2
referenced by Compression.cpp
Compression.cpp.o:(llvm::zlib::compress(llvm::StringRef, llvm::SmallVectorImpl&, int)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
lld: error: undefined symbol: uncompress
referenced by Compression.cpp
Compression.cpp.o:(llvm::zlib::uncompress(llvm::StringRef, char*, unsigned long&)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
referenced by Compression.cpp
Compression.cpp.o:(llvm::zlib::uncompress(llvm::StringRef, llvm::SmallVectorImpl&, unsigned long)) in ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
lld: error: undefined symbol: crc32
referenced by Compression.cpp
Compression.cpp.o:(llvm::zlib::crc32(llvm::StringRef)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
referenced by CRC.cpp
CRC.cpp.o:(llvm::crc32(unsigned int, llvm::ArrayRef)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
referenced by CRC.cpp
CRC.cpp.o:(llvm::crc32(llvm::ArrayRef)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
referenced 1 more times
lld: error: undefined symbol: setupterm
referenced by Process.cpp
Process.cpp.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
lld: error: undefined symbol: tigetnum
referenced by Process.cpp
Process.cpp.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
lld: error: undefined symbol: del_curterm
referenced by Process.cpp
Process.cpp.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive ... /zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
error: LLDReportedFailure
make[2]: *** [CMakeFiles/zig0.dir/build.make:295: zig0] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/zig0.dir/all] Fehler 2
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
lld: error: undefined symbol: compressBound
referenced by Compression.cpp
Compression.cpp.o:(llvm::zlib::compress(llvm::StringRef, llvm::SmallVectorImpl&, int)) in archive ... zig-bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
lld: error: undefined symbol: compress2
referenced by Compression.cpp
Compression.cpp.o:(llvm::zlib::compress(llvm::StringRef, llvm::SmallVectorImpl&, int)) in archive ... bootstrap-0.7.0/out/native-native-musl-native/lib/libLLVMSupport.a
and so on.
On a debian powerpc64le virtual machine, Zig release 0.6.0:
Scanning dependencies of target zig0
[ 98%] Building CXX object CMakeFiles/zig0.dir/src/main.cpp.o
[ 98%] Building CXX object CMakeFiles/zig0.dir/src/stage2.cpp.o
[ 99%] Linking CXX executable zig0
[ 99%] Built target zig0
Scanning dependencies of target zig_build_libstage2
./lib/std/fs/file.zig:30:24: error: container 'std.os' has no member called 'mode_t'
pub const Mode = os.mode_t;
^
./lib/std/fs.zig:1343:19: note: referenced here
mode: File.Mode = File.default_mode,
^
./lib/std/io/buffered_atomic_file.zig:29:40: note: referenced here
self.atomic_file = try fs.cwd().atomicFile(dest_path, .{});
^
./src-self-hosted/stage2.zig:373:21: note: referenced here
const baf = try io.BufferedAtomicFile.create(fmt.allocator, file_path);
^
./lib/std/time.zig:146:23: error: container 'std.os' has no member called 'timespec'
var ts: os.timespec = undefined;
^
./lib/std/fs/file.zig:208:18: error: container 'std.os' has no member called 'ino_t'
inode: os.ino_t,
^
./lib/std/fs/file.zig:226:38: note: referenced here
pub fn stat(self: File) StatError!Stat {
^
./lib/std/fs/file.zig:186:25: note: referenced here
return (try self.stat()).size;
^
./lib/std/event/loop.zig:1244:25: error: container 'std.os' has no member called 'mode_t'
mode: os.mode_t,
^
./lib/std/event/loop.zig:1182:13: note: while checking this field
open: Open,
^
./lib/std/event/loop.zig:1165:9: note: while checking this field
msg: Msg,
^
./lib/std/linked_list.zig:200:13: note: while checking this field
data: T,
^
./lib/std/atomic/queue.zig:12:9: note: while checking this field
head: ?*Node,
^
./lib/std/event/loop.zig:1160:9: note: while checking this field
fs_queue: std.atomic.Queue(Request),
^
./lib/std/event/loop.zig:16:5: note: while checking this field
os_data: OsData,
^
./lib/std/event/loop.zig:96:25: note: referenced here
pub const instance: ?*Loop = if (@hasDecl(root, "event_loop")) root.event_loop else default_instance;
^
./lib/std/os.zig:614:41: note: referenced here
EAGAIN => if (std.event.Loop.instance) |loop| {
^
./lib/std/fs.zig:609:54: error: container 'std.os' has no member called 'O_CLOEXEC'
const os_flags = lock_flag | O_LARGEFILE | os.O_CLOEXEC | if (flags.write and flags.read)
^
./lib/std/fs.zig:835:53: error: container 'std.os' has no member called 'O_DIRECTORY'
return self.openDirFlagsZ(sub_path_c, os.O_DIRECTORY | os.O_RDONLY | os.O_CLOEXEC | O_PATH);
^
./lib/std/reset_event.zig:252:26: error: container 'std.os.linux' has no member called 'timespec'
var ts: linux.timespec = undefined;
^
./lib/std/os/linux.zig:138:12: error: use of undeclared identifier 'syscall3'
return syscall3(
^
./lib/std/time.zig:183:19: error: container 'std.os' has no member called 'timespec'
var ts: os.timespec = undefined;
^
./lib/std/os.zig:912:74: error: use of undeclared identifier 'mode_t'
pub fn openatZ(dir_fd: fd_t, file_path: [*:0]const u8, flags: u32, mode: mode_t) OpenError!fd_t {
^
./lib/std/fs.zig:857:15: note: referenced here
os.openatZ(self.fd, sub_path_c, flags, 0);
^
make[2]: *** [CMakeFiles/zig_build_libstage2.dir/build.make:57: CMakeFiles/zig_build_libstage2] Error 1
make[1]: *** [CMakeFiles/Makefile2:304: CMakeFiles/zig_build_libstage2.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Behavior tests:
jelle@summit:~/zig-bootstrap-0.6.0/zig$ ./zig0 test test/stage1/behavior.zig
./test/stage1/behavior/bugs/920.zig:23:21: error: division by zero
tables.x[0] = v / f(r);
^
./test/stage1/behavior/bugs/920.zig:54:27: note: called from here
break :blk ZigTableGen(true, norm_r, norm_v, norm_f, norm_f_inv, norm_zero_case);
^
./test/stage1/behavior/bugs/920.zig:52:25: note: called from here
const NormalDist = blk: {
^
./test/stage1/behavior/bugs/920.zig:54:27: note: referenced here
break :blk ZigTableGen(true, norm_r, norm_v, norm_f, norm_f_inv, norm_zero_case);
^
./test/stage1/behavior/bugs/920.zig:63:48: note: referenced here
std.testing.expect(NormalDist1.f[i] == NormalDist.f[i]);
^
./test/stage1/behavior/cast.zig:283:12: error: integer value '18446744073709551615' cannot be stored in type 'u8'
expect(@floatToInt(I, f) == i);
^
./test/stage1/behavior/cast.zig:273:21: note: called from here
expectFloatToInt(f16, 255.1, u8, 255);
^
./test/stage1/behavior/cast.zig:265:29: note: called from here
comptime testFloatToInts();
^
./test/stage1/behavior/cast.zig:263:20: note: called from here
test "@floatToInt" {
^
./test/stage1/behavior/cast.zig:273:21: note: referenced here
expectFloatToInt(f16, 255.1, u8, 255);
^
./test/stage1/behavior/cast.zig:265:29: note: referenced here
comptime testFloatToInts();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:23:15: note: called from here
expect(math.approxEq(f32, @sqrt(b), 1.0488088481701516, epsilon));
^
./test/stage1/behavior/floatop.zig:10:22: note: called from here
comptime testSqrt();
^
./test/stage1/behavior/floatop.zig:9:14: note: called from here
test "@sqrt" {
^
./test/stage1/behavior/floatop.zig:23:15: note: referenced here
expect(math.approxEq(f32, @sqrt(b), 1.0488088481701516, epsilon));
^
./test/stage1/behavior/floatop.zig:10:22: note: referenced here
comptime testSqrt();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:151:15: note: called from here
expect(math.approxEq(f32, @exp(@as(f32, 1.1)), result[0], epsilon));
^
./test/stage1/behavior/floatop.zig:129:21: note: called from here
comptime testExp();
^
./test/stage1/behavior/floatop.zig:128:13: note: called from here
test "@exp" {
^
./test/stage1/behavior/floatop.zig:151:15: note: referenced here
expect(math.approxEq(f32, @exp(@as(f32, 1.1)), result[0], epsilon));
^
./test/stage1/behavior/floatop.zig:129:21: note: referenced here
comptime testExp();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:181:15: note: called from here
expect(math.approxEq(f32, @exp2(@as(f32, 1.1)), result[0], epsilon));
^
./test/stage1/behavior/floatop.zig:159:22: note: called from here
comptime testExp2();
^
./test/stage1/behavior/floatop.zig:158:14: note: called from here
test "@exp2" {
^
./test/stage1/behavior/floatop.zig:181:15: note: referenced here
expect(math.approxEq(f32, @exp2(@as(f32, 1.1)), result[0], epsilon));
^
./test/stage1/behavior/floatop.zig:159:22: note: referenced here
comptime testExp2();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:200:15: note: called from here
expect(math.approxEq(f16, @log(a), 1, epsilon));
^
./test/stage1/behavior/floatop.zig:191:21: note: called from here
comptime testLog();
^
./test/stage1/behavior/floatop.zig:188:13: note: called from here
test "@log" {
^
./test/stage1/behavior/floatop.zig:200:15: note: referenced here
expect(math.approxEq(f16, @log(a), 1, epsilon));
^
./test/stage1/behavior/floatop.zig:191:21: note: referenced here
comptime testLog();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:326:15: note: called from here
expect(@floor(a) == 2);
^
./test/stage1/behavior/floatop.zig:317:23: note: called from here
comptime testFloor();
^
./test/stage1/behavior/floatop.zig:316:15: note: called from here
test "@floor" {
^
./test/stage1/behavior/floatop.zig:326:15: note: referenced here
expect(@floor(a) == 2);
^
./test/stage1/behavior/floatop.zig:317:23: note: referenced here
comptime testFloor();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:356:15: note: called from here
expect(@ceil(a) == 3);
^
./test/stage1/behavior/floatop.zig:347:22: note: called from here
comptime testCeil();
^
./test/stage1/behavior/floatop.zig:346:14: note: called from here
test "@ceil" {
^
./test/stage1/behavior/floatop.zig:356:15: note: referenced here
expect(@ceil(a) == 3);
^
./test/stage1/behavior/floatop.zig:347:22: note: referenced here
comptime testCeil();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:386:15: note: called from here
expect(@trunc(a) == 2);
^
./test/stage1/behavior/floatop.zig:377:23: note: called from here
comptime testTrunc();
^
./test/stage1/behavior/floatop.zig:376:15: note: called from here
test "@trunc" {
^
./test/stage1/behavior/floatop.zig:386:15: note: referenced here
expect(@trunc(a) == 2);
^
./test/stage1/behavior/floatop.zig:377:23: note: referenced here
comptime testTrunc();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/floatop.zig:429:19: note: called from here
expect(x < 2);
^
./test/stage1/behavior/floatop.zig:408:34: note: called from here
comptime testFloatComparisons();
^
./test/stage1/behavior/floatop.zig:406:35: note: called from here
test "floating point comparisons" {
^
./test/stage1/behavior/floatop.zig:429:19: note: referenced here
expect(x < 2);
^
./test/stage1/behavior/floatop.zig:408:34: note: referenced here
comptime testFloatComparisons();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/math.zig:15:11: note: called from here
expect(div(f16, 1.0, 2.0) == 0.5);
^
./test/stage1/behavior/math.zig:11:26: note: called from here
comptime testDivision();
^
./test/stage1/behavior/math.zig:9:17: note: called from here
test "division" {
^
./test/stage1/behavior/math.zig:15:11: note: referenced here
expect(div(f16, 1.0, 2.0) == 0.5);
^
./test/stage1/behavior/math.zig:11:26: note: referenced here
comptime testDivision();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/math.zig:310:20: note: called from here
comptime expect(0x1.0 == 1.0);
^
./test/stage1/behavior/math.zig:309:34: note: called from here
test "hex float literal parsing" {
^
./test/stage1/behavior/math.zig:310:20: note: referenced here
comptime expect(0x1.0 == 1.0);
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/math.zig:335:23: note: called from here
expect(@bitCast(u128, f) == 0x40042eab345678439abcdefea5678234);
^
./test/stage1/behavior/math.zig:407:25: note: called from here
comptime S.doTheTest();
^
./test/stage1/behavior/math.zig:320:48: note: called from here
test "quad hex float literal parsing accurate" {
^
./test/stage1/behavior/math.zig:335:23: note: referenced here
expect(@bitCast(u128, f) == 0x40042eab345678439abcdefea5678234);
^
./test/stage1/behavior/math.zig:407:25: note: referenced here
comptime S.doTheTest();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/math.zig:587:11: note: called from here
expect(make_f128(1.0) > 0.9);
^
./test/stage1/behavior/math.zig:576:23: note: called from here
comptime test_f128();
^
./test/stage1/behavior/math.zig:574:13: note: called from here
test "f128" {
^
./test/stage1/behavior/math.zig:587:11: note: referenced here
expect(make_f128(1.0) > 0.9);
^
./test/stage1/behavior/math.zig:576:23: note: referenced here
comptime test_f128();
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/math.zig:678:11: note: called from here
expect(nan1 != nan2);
^
./test/stage1/behavior/math.zig:672:26: note: called from here
comptime testNanEqNan(f128);
^
./test/stage1/behavior/math.zig:664:23: note: called from here
test "NaN comparison" {
^
./test/stage1/behavior/math.zig:678:11: note: referenced here
expect(nan1 != nan2);
^
./test/stage1/behavior/math.zig:672:26: note: referenced here
comptime testNanEqNan(f128);
^
./lib/std/testing.zig:192:14: error: encountered @panic at compile-time
if (!ok) @panic("test failure");
^
./test/stage1/behavior/muladd.zig:13:15: note: called from here
expect(@mulAdd(f16, a, b, c) == 20);
^
./test/stage1/behavior/muladd.zig:4:24: note: called from here
comptime testMulAdd();
^
./test/stage1/behavior/muladd.zig:3:16: note: called from here
test "@mulAdd" {
^
./test/stage1/behavior/muladd.zig:13:15: note: referenced here
expect(@mulAdd(f16, a, b, c) == 20);
^
./test/stage1/behavior/muladd.zig:4:24: note: referenced here
comptime testMulAdd();
^
./lib/std/start.zig:119:17: error: unsupported arch
else => @compileError("unsupported arch"),
^
./lib/std/event/loop.zig:1244:25: error: container 'std.os' has no member called 'mode_t'
mode: os.mode_t,
^
./lib/std/event/loop.zig:1182:13: note: while checking this field
open: Open,
^
./lib/std/event/loop.zig:1165:9: note: while checking this field
msg: Msg,
^
./lib/std/linked_list.zig:200:13: note: while checking this field
data: T,
^
./lib/std/atomic/queue.zig:12:9: note: while checking this field
head: ?*Node,
^
./lib/std/event/loop.zig:1160:9: note: while checking this field
fs_queue: std.atomic.Queue(Request),
^
./lib/std/event/loop.zig:16:5: note: while checking this field
os_data: OsData,
^
./lib/std/event/loop.zig:96:25: note: referenced here
pub const instance: ?*Loop = if (@hasDecl(root, "event_loop")) root.event_loop else default_instance;
^
./lib/std/os.zig:614:41: note: referenced here
EAGAIN => if (std.event.Loop.instance) |loop| {
^
./lib/std/fs/file.zig:208:18: error: container 'std.os' has no member called 'ino_t'
inode: os.ino_t,
^
./lib/std/fs/file.zig:226:38: note: referenced here
pub fn stat(self: File) StatError!Stat {
^
./lib/std/fs/file.zig:186:25: note: referenced here
return (try self.stat()).size;
^
./lib/std/reset_event.zig:252:26: error: container 'std.os.linux' has no member called 'timespec'
var ts: linux.timespec = undefined;
^
./lib/std/os/linux.zig:789:60: error: use of undeclared identifier 'restore_rt'
const restorer_fn = if ((act.flags & SA_SIGINFO) != 0) restore_rt else restore;
^
./lib/std/os/linux.zig:390:12: error: use of undeclared identifier 'syscall3'
return syscall3(.write, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count);
^
./lib/std/os/linux.zig:781:12: error: use of undeclared identifier 'syscall4'
return syscall4(.rt_sigprocmask, flags, @ptrToInt(set), @ptrToInt(oldset), NSIG / 8);
^
./lib/std/os/linux.zig:777:43: error: use of undeclared identifier 'syscall0'
return @bitCast(pid_t, @truncate(u32, syscall0(.gettid)));
^
./lib/std/os/linux.zig:568:12: error: use of undeclared identifier 'syscall2'
return syscall2(.tkill, @bitCast(usize, @as(isize, tid)), @bitCast(usize, @as(isize, sig)));
^
./lib/std/os/linux.zig:555:9: error: use of undeclared identifier 'syscall1'
_ = syscall1(.exit_group, @bitCast(usize, @as(isize, status)));
^
./lib/std/fs.zig:609:54: error: container 'std.os' has no member called 'O_CLOEXEC'
const os_flags = lock_flag | O_LARGEFILE | os.O_CLOEXEC | if (flags.write and flags.read)
^
./lib/std/os/linux.zig:195:19: error: use of undeclared identifier 'SYS'
if (@hasField(SYS, "mmap2")) {
^
Hi there, I got the following error when bootstrapping for a mipsel-linux-musl
target on a macOS 10.14 host.
$ ./build -j1 mipsel-linux-musl 1004kc
-- The ASM compiler identification is unknown
-- Found assembler: /opt/local/bin/zig
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Warning: Did not find file Compiler/-ASM
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- debuginfo-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is enabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY)
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-apple-darwin18.7.0
-- LLVM default target triple: x86_64-apple-darwin18.7.0
CMake Warning at cmake/modules/HandleLLVMOptions.cmake:261 (message):
-fPIC is not supported.
Call Stack (most recent call first):
cmake/modules/HandleLLVMOptions.cmake:297 (add_flag_or_print_warning)
CMakeLists.txt:698 (include)
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting AVR
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Clang version: 12.0.1
-- Host linker version: 530
-- Performing Test LINKER_ORDER_FILE_WORKS
-- Performing Test LINKER_ORDER_FILE_WORKS - Success
-- LLD version: 12.0.1
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/zig-bootstrap/out/build-llvm-host
Consolidate compiler generated dependencies of target LLVMDemangle
[ 0%] Built target LLVMDemangle
Scanning dependencies of target LLVMSupport
Consolidate compiler generated dependencies of target LLVMSupport
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CrashRecoveryContext.cpp.o
In file included from /tmp/zig-bootstrap/llvm/lib/Support/CrashRecoveryContext.cpp:12:0:
/tmp/zig-bootstrap/llvm/include/llvm/Support/ExitCodes.h:30:2: error: #error Exit code EX_IOERR not available
#error Exit code EX_IOERR not available
^~~~~
/tmp/zig-bootstrap/llvm/lib/Support/CrashRecoveryContext.cpp: In function 'void CrashRecoverySignalHandler(int)':
/tmp/zig-bootstrap/llvm/lib/Support/CrashRecoveryContext.cpp:385:15: error: 'EX_IOERR' was not declared in this scope
RetCode = EX_IOERR;
^~~~~~~~
/tmp/zig-bootstrap/llvm/lib/Support/CrashRecoveryContext.cpp:385:15: note: suggested alternative: 'EDEVERR'
RetCode = EX_IOERR;
^~~~~~~~
EDEVERR
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/CrashRecoveryContext.cpp.o] Error 1
make[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make: *** [all] Error 2
Here is some system information you may find helpful
$ zig version
0.8.0
$ zig env
{
"zig_exe": "/opt/local/bin/zig",
"lib_dir": "/opt/local/lib/zig",
"std_dir": "/opt/local/lib/zig/std",
"global_cache_dir": "/Users/nalzok/.cache/zig",
"version": "0.8.0"
}
$ zig libc
Zig attempted to find the path to native system libc headers by executing this command:
zig cc -target mips64-linux-musl -E -Wp,-v -xc /dev/null
error: unable to detect native libc: UnableToSpawnCCompiler
Could you please take a look?
heidezomp@acerola:~/Downloads/zig-bootstrap-0.6.0$ ./build -j2 native native
[... compiling llvm/zig natively works fine ...]
[100%] Built target zig
Install the project...
-- Install configuration: "Release"
-- Installing: /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/bin/zig
-- Set runtime path of "/home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/bin/zig" to ""
-- Installing: /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/lib
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- The ASM compiler identification is Clang
-- Found assembler: /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/bin/zig
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Check for working C compiler: /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/bin/zig
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Check for working C compiler: /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/bin/zig -- works
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Detecting C compile features
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/bin/zig
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Check for working CXX compiler: /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/host/bin/zig -- works
-- Detecting CXX compiler ABI info
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Detecting CXX compile features - done
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- debuginfo-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is enabled
-- lldb project is disabled
-- llgo project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)
-- Performing Test LLVM_LIBSTDCXX_MIN
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test LLVM_LIBSTDCXX_MIN - Success
-- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
-- Looking for dlfcn.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for dlfcn.h - found
-- Looking for errno.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for errno.h - found
-- Looking for fcntl.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for fcntl.h - found
-- Looking for link.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for link.h - found
-- Looking for malloc/malloc.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for malloc/malloc.h - not found
-- Looking for pthread.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread.h - found
-- Looking for signal.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/time.h - found
-- Looking for sys/types.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/types.h - found
-- Looking for termios.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for termios.h - found
-- Looking for unistd.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for zlib.h - found
-- Looking for fenv.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for CrashReporterClient.h - not found
-- Looking for pthread_create in pthread
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for dlopen in dl - found
-- Looking for clock_gettime in rt
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for clock_gettime in rt - found
-- Looking for pfm_initialize in pfm
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pfm_initialize in pfm - not found
-- Looking for pthread.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread.h - found
-- Looking for pthread_create
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Looking for compress2 in z
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for compress2 in z - found
-- Looking for setupterm in terminfo
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for setupterm in terminfo - not found
-- Looking for setupterm in tinfo
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for setupterm in tinfo - found
-- Looking for xar_open in xar
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for xar_open in xar - not found
-- Looking for arc4random
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for arc4random - not found
-- Looking for backtrace
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Could NOT find Backtrace (missing: Backtrace_INCLUDE_DIR)
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Looking for _Unwind_Backtrace
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for getpagesize - found
-- Looking for sysconf
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sysconf - found
-- Looking for getrusage
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for getrusage - found
-- Looking for setrlimit
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for setrlimit - found
-- Looking for isatty
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for isatty - found
-- Looking for futimens
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for futimens - found
-- Looking for futimes
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for futimes - found
-- Looking for posix_fallocate
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for posix_fallocate - found
-- Looking for sigaltstack
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sigaltstack - found
-- Looking for lseek64
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for lseek64 - found
-- Looking for mallctl
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for mallctl - not found
-- Looking for mallinfo
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for mallinfo - found
-- Looking for malloc_zone_statistics
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for malloc_zone_statistics - not found
-- Looking for getrlimit
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for getrlimit - found
-- Looking for posix_spawn
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for posix_spawn - found
-- Looking for pread
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pread - found
-- Looking for sbrk
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sbrk - found
-- Looking for strerror
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for strerror - found
-- Looking for strerror_r
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for strerror_r - found
-- Looking for strerror_s
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for strerror_s - not found
-- Looking for setenv
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for setenv - found
-- Looking for dlopen
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for dlopen - found
-- Looking for dladdr
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for dladdr - not found
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Success
-- Looking for __GLIBC__
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for __GLIBC__ - found
-- Looking for sched_getaffinity
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sched_getaffinity - found
-- Looking for CPU_COUNT
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for CPU_COUNT - found
-- Looking for pthread_getname_np
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread_getname_np - found
-- Looking for pthread_setname_np
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for pthread_setname_np - found
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Success
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: native
CMake Error at cmake/modules/HandleLLVMOptions.cmake:120 (MESSAGE):
Unable to determine platform
Call Stack (most recent call first):
CMakeLists.txt:648 (include)
-- Performing Test C_SUPPORTS_FPIC
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR - Success
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FDATA_SECTIONS
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test C_SUPPORTS_FDATA_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success
-- Looking for os_signpost_interval_begin
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for os_signpost_interval_begin - not found
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9")
-- Constructing LLVMBuild project information
-- Found Git: /usr/bin/git (found version "2.17.1")
-- Linker detection: unknown
-- Setting native build dir to /home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/build-llvm-native/NATIVE
-- Linker detection: unknown
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Targeting AVR
-- Looking for sys/resource.h
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for sys/resource.h - found
-- Clang version: 10.0.0
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
System is unknown to cmake, create:
Platform/Native to use this system, please send your config file to [email protected] so it can be added to cmake
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Success
-- LLD version: 10.0.0
-- Configuring incomplete, errors occurred!
See also "/home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/build-llvm-native/CMakeFiles/CMakeOutput.log".
See also "/home/heidezomp/Downloads/zig-bootstrap-0.6.0/out/build-llvm-native/CMakeFiles/CMakeError.log".
heidezomp@acerola:~/Downloads/zig-bootstrap-0.6.0$
My cmake is version 3.10.2.
This is pretty big issue, because for example when you first build a zig compiler for arm-linux-musleabi
with -mcpu being arm1176jzf_s
and then build a zig compiler for arm-linux-musleabi
with -mcpu being baseline
, it does not rebuild LLVM.
The problem is that make
does not know that the cpu features have been updated and thus it will not rebuild LLVM. The solution would be to create a llvm directory name including the cpu features.
According to the readme, I should be able to build zig for RPi 1 using this command:
./build -j4 arm-linux-musleabi generic+v6kz
However, it gives me the following error:
[ 99%] Building self-hosted component /home/grav/repo/zig-bootstrap/out/build-zig-host/zig1.o [ 99%] Building CXX object CMakeFiles/zig.dir/src/stage1/empty.cpp.o [100%] Linking CXX executable zig [100%] Built target zig Install the project... -- Install configuration: "Release" -- Installing: /home/grav/repo/zig-bootstrap/out/host/bin/zig -- Set runtime path of "/home/grav/repo/zig-bootstrap/out/host/bin/zig" to "" -- Installing: /home/grav/repo/zig-bootstrap/out/host/lib CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. -- Installing: /home/grav/repo/zig-bootstrap/out/host/include/clang/ARCMigrate/ARCMT.h Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- Installing: /home/grav/repo/zig-bootstrap/out/host/include/clang/ARCMigrate/FileRem apper.h -- The C compiler identification is Clang 13.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: /home/grav/repo/zig-bootstrap/out/host/bin/zig -- Check for working C compiler: /home/grav/repo/zig-bootstrap/out/host/bin/zig - broken CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message): The C compiler -- Installing: /home/grav/repo/zig-bootstrap/out/host/include/clang/Rewrite/Core/Delta "/home/grav/repo/zig-bootstrap/out/host/bin/zig" -- Installing: /home/grav/repo/zig-bootstrap/out/host/include/clang/Rewrite/Core/Rewri is not able to compile a simple test program. -- Installing: /home/grav/repo/zig-bootstrap/out/host/include/clang/Rewrite/Core/Rewri It fails with the following output: -- Installing: /home/grav/repo/zig-bootstrap/out/host/include/clang/Rewrite/Frontend Change Dir: /home/grav/repo/zig-bootstrap/out/build-zlib-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/make -f Makefile cmTC_afa55/fast && /usr/bin/make -f CMakeFiles/cmTC_afa55.dir/build.make CMakeFiles/cmTC_afa55.dir/build make[1]: Entering directory '/home/grav/repo/zig-bootstrap/out/build-zlib-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_afa55.dir/testCCompiler.c.o /home/grav/repo/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -target arm-linux-musleabi -mcpu=generic+v6kz -MD -MT CMakeFiles/cmTC_afa55.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_afa55.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_afa55.dir/testCCompiler.c.o -c /home/grav/repo/zig-bootstrap/out/build-zlib-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_afa55 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_afa55.dir/link.txt --verbose=1 /home/grav/repo/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -target arm-linux-musleabi -mcpu=generic+v6kz -rdynamic CMakeFiles/cmTC_afa55.dir/testCCompiler.c.o -o cmTC_afa55 zig: error: clang frontend command failed with exit code 132 (use -v to see invocation) clang version 13.0.1 ([email protected]:ziglang/zig-bootstrap.git 623481199fe17f4311cbdbbf050b6dbd2c230a02) Target: arm-unknown-linux-musleabi Thread model: posix InstalledDir: /usr/bin zig: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: zig: note: diagnostic msg: /tmp/sqrtf-31fb1e.c zig: note: diagnostic msg: /tmp/sqrtf-31fb1e.sh zig: note: diagnostic msg: ******************** make[1]: *** [CMakeFiles/cmTC_afa55.dir/build.make:100: cmTC_afa55] Error 132 make[1]: Leaving directory '/home/grav/repo/zig-bootstrap/out/build-zlib-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeTmp' make: *** [Makefile:127: cmTC_afa55/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)-- Configuring incomplete, errors occurred!
See also "/home/grav/repo/zig-bootstrap/out/build-zlib-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeOutput.log".
See also "/home/grav/repo/zig-bootstrap/out/build-zlib-arm-linux-musleabi-generic+v6kz/CMakeFiles/CMakeError.log".Mentioed logfiles attached:
grav-bugreport.zipARCMT dependency
I came across this on the second zig compile using
native-linux-gnu native
[ 99%] Linking CXX executable zig0 lld: error: unable to find library -lclangARCMigrate
explicitly disables ARCMT, switching it ON fixes the issueLine 73 in 517a507
OpenBSD 7.0 build error
Attempting to build on OpenBSD 7.0 and ran into the following errors.
Configuring zig version 0.9.0-dev.1249+210ef5af8 -- Configuring done -- Generating done -- Build files have been written to: /home/user/repos/ziglang/zig-bootstrap/out/build-zig-host Consolidate compiler generated dependencies of target embedded_softfloat [ 77%] Built target embedded_softfloat Consolidate compiler generated dependencies of target zigcpp [ 82%] Built target zigcpp Consolidate compiler generated dependencies of target opt_c_util [ 83%] Built target opt_c_util Consolidate compiler generated dependencies of target zigstage1 [ 97%] Built target zigstage1 Consolidate compiler generated dependencies of target zig0 [ 97%] Linking CXX executable zig0 ld: error: unable to find library -lz.so.6.0 ld: error: unable to find library -lcurses.so.14.0 ld: error: unable to find library -lz.so.6.0 ld: error: unable to find library -lcurses.so.14.0 c++: error: linker command failed with exit code 1 (use -v to see invocation) *** Error 1 in . (CMakeFiles/zig0.dir/build.make:140 'zig0') *** Error 2 in . (CMakeFiles/Makefile2:232 'CMakeFiles/zig0.dir/all') *** Error 2 in /home/user/repos/ziglang/zig-bootstrap/out/build-zig-host (Makefile:136 'all': make -s -f CMakeFiles/Makefile2 all)
Has anyone had any luck building this on OpenBSD?
x86_64-linux-gnu
aarch64-macos-gnu
The first problem is a codesigning issue which I worked around by running
codesign -s -
but then I hit a second error:-- Check for working CXX compiler: /Users/andy/dev/zig-bootstrap/out/host/bin/zig -- Check for working CXX compiler: /Users/andy/dev/zig-bootstrap/out/host/bin/zig - broken CMake Error at /Users/andy/local/share/cmake-3.19/Modules/CMakeTestCXXCompiler.cmake:59 (message): The C++ compiler "/Users/andy/dev/zig-bootstrap/out/host/bin/zig" is not able to compile a simple test program. It fails with the following output: Change Dir: /Users/andy/dev/zig-bootstrap/out/build-llvm-aarch64-macos-gnu-native/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/make cmTC_9f6ec/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_9f6ec.dir/build.make CMakeFiles/cmTC_9f6ec.dir/build Building CXX object CMakeFiles/cmTC_9f6ec.dir/testCXXCompiler.cxx.o /Users/andy/dev/zig-bootstrap/out/host/bin/zig c++ -fno-sanitize=all -target aarch64-macos-gnu -mcpu=native -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -o CMakeFiles/cmTC_9f6ec.dir/testCXXCompiler.cxx.o -c /Users/andy/dev/zig-bootstrap/out/build-llvm-aarch64-macos-gnu-native/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTC_9f6ec /Users/andy/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9f6ec.dir/link.txt --verbose=1 /Users/andy/dev/zig-bootstrap/out/host/bin/zig c++ -fno-sanitize=all -target aarch64-macos-gnu -mcpu=native -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -Wl,-headerpad_max_install_names CMakeFiles/cmTC_9f6ec.dir/testCXXCompiler.cxx.o -o cmTC_9f6ec warning: unsupported linker arg: -headerpad_max_install_names In file included from /Users/andy/dev/zig-bootstrap/out/host/lib/zig/libcxx/src/algorithm.cpp:9: In file included from /Users/andy/dev/zig-bootstrap/out/host/lib/zig/libcxx/include/algorithm:641: In file included from /Users/andy/dev/zig-bootstrap/out/host/lib/zig/libcxx/include/cstring:60: /Users/andy/dev/zig-bootstrap/out/host/lib/zig/libcxx/include/string.h:60:15: fatal error: 'string.h' file not found #include_next <string.h> ^~~~~~~~~~ 1 error generated. make[1]: *** [cmTC_9f6ec] Error 1 make: *** [cmTC_9f6ec/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:57 (project) -- Configuring incomplete, errors occurred! See also "/Users/andy/dev/zig-bootstrap/out/build-llvm-aarch64-macos-gnu-native/CMakeFiles/CMakeOutput.log". See also "/Users/andy/dev/zig-bootstrap/out/build-llvm-aarch64-macos-gnu-native/CMakeFiles/CMakeError.log". andy@Andrews-Air zig-bootstrap %
Not sure why cmake isn't respecting the
cc
arg like normal here.x86_64-linux-gnux32 is broken
Here's the error:
Install the project... -- Install configuration: "Release" -- Installing: /home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig -- Set runtime path of "/home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig" to "" -- Installing: /home/vincent/dev/devtools/zig-bootstrap/out/host/lib -- The C compiler identification is Clang 10.0.0 -- The CXX compiler identification is Clang 10.0.0 -- The ASM compiler identification is unknown -- Found assembler: /home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig -- Check for working C compiler: /home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig -- Check for working C compiler: /home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig - broken CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "/home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/vincent/dev/devtools/zig-bootstrap/out/build-llvm-x86_64-linux-gnux32/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_56a8e/fast && /usr/bin/gmake -f CMakeFiles/cmTC_56a8e.dir/build.make CMakeFiles/cmTC_56a8e.dir/build gmake[1]: Entering directory '/home/vincent/dev/devtools/zig-bootstrap/out/build-llvm-x86_64-linux-gnux32/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_56a8e.dir/testCCompiler.c.o /home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig cc -target x86_64-linux-gnux32 -o CMakeFiles/cmTC_56a8e.dir/testCCompiler.c.o -c /home/vincent/dev/devtools/zig-bootstrap/out/build-llvm-x86_64-linux-gnux32/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_56a8e /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_56a8e.dir/link.txt --verbose=1 /home/vincent/dev/devtools/zig-bootstrap/out/host/bin/zig cc -target x86_64-linux-gnux32 CMakeFiles/cmTC_56a8e.dir/testCCompiler.c.o -o cmTC_56a8e Assertion failed at /home/vincent/dev/devtools/zig-bootstrap/zig/src/codegen.cpp:9059 in init. This is a bug in the Zig compiler. Unable to dump stack trace: debug info stripped Error running link command: Child aborted gmake[1]: *** [CMakeFiles/cmTC_56a8e.dir/build.make:104: cmTC_56a8e] Error 1 gmake[1]: Leaving directory '/home/vincent/dev/devtools/zig-bootstrap/out/build-llvm-x86_64-linux-gnux32/CMakeFiles/CMakeTmp' gmake: *** [Makefile:138: cmTC_56a8e/fast] Error 2
Tested on Fedora 32 beta.
armv6kz-linux-musleabihf
This is the architecture of raspberry pi zero:I think this is happening because it should be soft float not hard float../build -j1 arm-linux-musleabihf -mcpu=generic+v6kz
It fails when configuring cross LLVM with:
-- Check for working C compiler: /home/andy/dev/bootstrap-zig/out/host/bin/zig -- broken CMake Error at /nix/store/qbn4f7k7yj5dj8ay292hr2nv0q8854vq-cmake-3.16.3/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "/home/andy/dev/bootstrap-zig/out/host/bin/zig" is not able to compile a simple test program.
Clang is segfaulting with:
Stack dump: 0. Program arguments: /home/andy/dev/bootstrap-zig/out/host/bin/zig clang -c -nostdinc -fno-spell-checking -target arm-unknown-linux-musleabihf -isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/include -Xclang -target-cpu -Xclang generic -Xclang -target-feature -Xclang -32bit,-8msecext,-a76,-aclass,-acquire-release,-aes,-avoid-movs-shop,-avoid-partial-cpsr,-cheap-predicable-cpsr,-crc,-crypto,-d32,-db,-dfb,-disable-postra-scheduler,-dont-widen-vmovs,-dotprod,-dsp,-execute-only,-expand-fp-mlx,-exynos,-fp16,-fp16fml,-fp64,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fpao,-fpregs,-fpregs16,-fpregs64,-fullfp16,-fuse-aes,-fuse-literals,+v4t,+v5t,+v5te,+v6,+v6k,-v6m,-v6t2,-v7,-v7clrex,-v8.1a,-v8.1m.main,-v8.2a,-v8.3a,-v8.4a,-v8.5a,-v8,-v8m,-v8m.main,-hwdiv,-hwdiv-arm,-iwmmxt,-iwmmxt2,-lob,-long-calls,-loop-align,-m3,-mclass,-mp,-muxed-units,-mve,-mve.fp,-mve1beat,-mve2beat,-mve4beat,-nacl-trap,-neon,-neon-fpmovs,-neonfp,-no-branch-predictor,-no-movt,-no-neg-immediates,-noarm,-nonpipelined-vfp,-perfmon,-prefer-ishst,-prefer-vmovsr,-prof-unpr,-r4,-ras,-rclass,-read-tp-hard,-reserve-r9,-ret-addr-stack,-sb,-sha2,-slow-fp-brcc,-slow-load-D-subreg,-slow-odd-reg,-slow-vdup32,-slow-vgetlni32,-slowfpvfmx,-slowfpvmlx,-soft-float,-splat-vfp-neon,-strict-align,-swift,-thumb2,-thumb-mode,+trustzone,-use-misched,-armv2,-armv2a,-armv3,-armv3m,-armv4,-armv4t,-armv5t,-armv5te,-armv5tej,-armv6,-armv6j,-armv6k,+armv6kz,-armv6-m,-armv6s-m,-armv6t2,-armv7-a,-armv7e-m,-armv7k,-armv7-m,-armv7-r,-armv7s,-armv7ve,-armv8-a,-armv8-m.base,-armv8-m.main,-armv8-r,-armv8.1-a,-armv8.1-m.main,-armv8.2-a,-armv8.3-a,-armv8.4-a,-armv8.5-a,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp,-virtualization,-vldn-align,-vmlx-forwarding,-vmlx-hazards,-wide-stride-vfp,-xscale,-zcz -MD -MV -MF /home/andy/.cache/zig/stage1/tmp/TSq5fbxbQZxZ-fabsf.o.d -fno-omit-frame-pointer -D_DEBUG -Og -fno-stack-protector -o /home/andy/.cache/zig/stage1/tmp/TSq5fbxbQZxZ-fabsf.o /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/musl/src/math/arm/fabsf.c -std=c99 -ffreestanding -Wa,--noexecstack -D_XOPEN_SOURCE=700 -I /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/musl/arch/arm -I /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/musl/arch/generic -I /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/musl/src/include -I /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/musl/src/internal -I /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/musl/include -I /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/arm-linux-musl -I /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/generic-musl -Os -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -Qunused-arguments -w 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module '/home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/musl/src/math/arm/fabsf.c'. 4. Running pass 'ARM Instruction Selection' on function '@fabsf' Segmentation fault (core dumped)
armv6kz-linux-musleabi
This is the architecture the raspberry pi zero uses.
Blocking on ziglang/zig#4887:
-- Looking for __atomic_fetch_add_4 in atomic - not found CMake Error at cmake/modules/CheckAtomic.cmake:53 (message): Host compiler appears to require libatomic, but cannot find it.
lld: error: undefined symbol: __atomic_load_4 lld: error: undefined symbol: __atomic_fetch_add_4 lld: error: undefined symbol: __atomic_exchange_4
POSIX hosted i386-windows-gnu
This gets pretty far through building LLVM, Clang, LLD and runs into this problem:
[100%] Linking CXX executable ../../../../bin/lld.exe warning: unsupported linker arg: --stack warning: unsupported linker arg: 16777216 warning: unsupported linker arg: --whole-archive warning: unsupported linker arg: --no-whole-archive warning: unsupported linker arg: --out-implib warning: unsupported linker arg: ../../../../lib/liblld.dll.a warning: unsupported linker arg: --major-image-version warning: unsupported linker arg: 0 warning: unsupported linker arg: --minor-image-version warning: unsupported linker arg: 0 lld: error: undefined symbol: ____mb_cur_max_func >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/wcstof.c:29 >>> libmingwex.a(wcstof.o):(_wcstof) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/wcstof.c:45 >>> libmingwex.a(wcstof.o):(_wcstof) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/wcstold.c:37 >>> libmingwex.a(wcstold.o):(_wcstold) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/wcstold.c:53 >>> libmingwex.a(wcstold.o):(_wcstold) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/mbrtowc.c:104 >>> libmingwex.a(mbrtowc.o):(_mbrtowc) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/mbrtowc.c:117 >>> libmingwex.a(mbrtowc.o):(_mbsrtowcs) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/mbrtowc.c:155 >>> libmingwex.a(mbrtowc.o):(_mbrlen) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/wcrtomb.c:53 >>> libmingwex.a(wcrtomb.o):(_wcrtomb) >>> referenced by /home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/mingw/misc/wcrtomb.c:62 >>> libmingwex.a(wcrtomb.o):(_wcsrtombs) lld: error: undefined symbol: __declspec(dllimport) ____mb_cur_max_func >>> referenced by libc++.a(locale_win32.o):(MB_CUR_MAX_L(locale_t))
POSIX hosted x86_64-windows-gnu
CMake Error at cmake/modules/CheckAtomic.cmake:53 (message): Host compiler appears to require libatomic, but cannot find it. Call Stack (most recent call first): cmake/config-ix.cmake:348 (include) CMakeLists.txt:623 (include)
mipsel-linux-musl
/home/andy/dev/bootstrap-zig/out/host/bin/zig c++ -target mipsel-linux-musl -DHAVE_CXX_ATOMICS64_WITHOUT_LIB -std=c++11 -Werror=unguarded-availability-new -static CMakeFiles/cmTC_52428.dir/src.cxx.o -o cmTC_52428 -lm
#include <atomic> #include <cstdint> std::atomic<uint64_t> x (0); int main() { uint64_t i = x.load(std::memory_order_relaxed); return 0; }lld: error: undefined symbol: __atomic_load_8 >>> referenced by src.cxx >>> CMakeFiles/cmTC_52428.dir/src.cxx.o:(unsigned long long std::__1::__cxx_atomic_load<unsigned long long>(std::__1::__cxx_atomic_base_impl<unsigned long long> const*, std::__1::memory_order)) >>> referenced by src.cxx >>> CMakeFiles/cmTC_52428.dir/src.cxx.o:(unsigned long long std::__1::__cxx_atomic_load<unsigned long long>(std::__1::__cxx_atomic_base_impl<unsigned long long> const*, std::__1::memory_order))
Looks like a missing compiler-rt function.
Bootstrap script fails with /bin/sh -> dash
Trying out Zig 0.6.0 (Congratulations on the release! ๐), the bootstrap tarball fails to run by default on my Ubuntu 18.04 laptop, which apparently uses
dash
as its/bin/sh
by default:heidezomp@falafel% ./build -j1 native native ./build: 13: ./build: Bad substitution heidezomp@falafel% ls -l /bin/sh lrwxrwxrwx 1 root root 4 okt 2 2019 /bin/sh -> dash*
Changing the shebang to use
/bin/bash
works.Not sure if this is actually a bug, but the README states this script requires a POSIX shell, which according to dash's man page, it is.
s390x: container 'std.os.linux.arch_bits' has no member called 'ino_t'
Attempting to compile on s390x with the triple s390x-linux-musl. Here is the end of the output where it bails.
make[2]: Entering directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' [ 79%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_llvm.cpp.o [ 79%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_llvm-ar.cpp.o [ 80%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_clang.cpp.o [ 81%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_clang_driver.cpp.o [ 82%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_clang_cc1_main.cpp.o [ 82%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_clang_cc1as_main.cpp.o [ 82%] Building CXX object CMakeFiles/zigcpp.dir/src/windows_sdk.cpp.o [ 83%] Linking CXX static library zigcpp/libzigcpp.a make[2]: Leaving directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' [ 83%] Built target zigcpp make[2]: Entering directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' Scanning dependencies of target zigstage1 make[2]: Leaving directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' make[2]: Entering directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' [ 83%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/astgen.cpp.o [ 84%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/bigfloat.cpp.o [ 85%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/bigint.cpp.o [ 86%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/analyze.cpp.o [ 86%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/buffer.cpp.o [ 87%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/codegen.cpp.o [ 87%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/dump_analysis.cpp.o [ 88%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/errmsg.cpp.o [ 89%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/error.cpp.o [ 89%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/heap.cpp.o [ 90%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/ir.cpp.o [ 90%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/ir_print.cpp.o [ 91%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/mem.cpp.o [ 92%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/os.cpp.o [ 92%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/parser.cpp.o [ 93%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/range_set.cpp.o [ 93%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/softfloat_ext.cpp.o [ 94%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/stage1.cpp.o [ 95%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/target.cpp.o [ 95%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/tokenizer.cpp.o [ 96%] Building CXX object CMakeFiles/zigstage1.dir/src/stage1/util.cpp.o [ 97%] Linking CXX static library zigcpp/libzigstage1.a make[2]: Leaving directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' [ 97%] Built target zigstage1 make[2]: Entering directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' Scanning dependencies of target zig0 make[2]: Leaving directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' make[2]: Entering directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' [ 98%] Building CXX object CMakeFiles/zig0.dir/src/stage1/zig0.cpp.o [ 98%] Linking CXX executable zig0 make[2]: Leaving directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' [ 98%] Built target zig0 make[2]: Entering directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' [ 99%] Building self-hosted component /home/ubuntu/zig-bootstrap.git/out/build-zig-host/zig1.o ./lib/std/os/linux.zig:77:28: error: container 'std.os.linux.arch_bits' has no member called 'ino_t' pub const ino_t = arch_bits.ino_t; ^ ./lib/std/c/linux.zig:75:24: note: referenced here pub const ino_t = linux.ino_t; ^ ./lib/std/os.zig:139:25: note: referenced here pub const ino_t = system.ino_t; ^ ./lib/std/fs/file.zig:33:25: note: referenced here pub const INode = os.ino_t; ^ ./src/Module.zig:1403:28: note: referenced here stat_inode: std.fs.File.INode, ^ ./src/Module.zig:1262:5: note: while checking this field file_scope: *File, ^ ./src/Module.zig:362:5: note: while checking this field src_namespace: *Namespace, ^ ./src/Module.zig:258:5: note: while checking this field owner_decl: *Decl, ^ ./src/Module.zig:52:52: note: referenced here decl_exports: std.AutoArrayHashMapUnmanaged(*Decl, []*Export) = .{}, ^ ./src/Module.zig:52:44: note: referenced here decl_exports: std.AutoArrayHashMapUnmanaged(*Decl, []*Export) = .{}, ^ ./src/link.zig:60:5: note: while checking this field module: ?*Module, ^ ./src/link.zig:170:5: note: while checking this field options: Options, ^ ./src/Compilation.zig:42:1: note: while checking this field bin_file: *link.File, ^ ./src/main.zig:2396:29: note: referenced here const comp = Compilation.create(gpa, .{ ^ ./src/stage1.zig:50:43: note: referenced here stage2.mainArgs(gpa, arena, args) catch |err| fatal("{s}", .{@errorName(err)}); ^ ./lib/std/os/linux.zig:79:29: error: container 'std.os.linux.arch_bits' has no member called 'mode_t' pub const mode_t = arch_bits.mode_t; ^ ./lib/std/c/linux.zig:77:25: note: referenced here pub const mode_t = linux.mode_t; ^ ./lib/std/os.zig:142:26: note: referenced here pub const mode_t = system.mode_t; ^ ./lib/std/fs/file.zig:32:24: note: referenced here pub const Mode = os.mode_t; ^ ./lib/std/fs/file.zig:172:15: note: referenced here mode: Mode = default_mode, ^ ./lib/std/fs.zig:2018:28: note: referenced here var file = try self.createFile(sub_path, .{}); ^ ./src/main.zig:3228:5: note: referenced here try src_dir.writeFile("main.zig", main_zig_contents); ^ ./lib/std/os/linux.zig:128:33: error: container 'std.os.linux.arch_bits' has no member called 'O' pub usingnamespace arch_bits.O; ^ ./lib/std/fs.zig:1496:60: error: container 'std.os.linux.O' has no member called 'NOFOLLOW' const symlink_flags: u32 = if (args.no_follow) os.O.NOFOLLOW else 0x0; ^ ./lib/std/fs.zig:968:33: error: container 'std.os.linux.O' has no member called 'CLOEXEC' var os_flags: u32 = os.O.CLOEXEC; ^ ./lib/std/os/linux.zig:47:34: error: container 'std.os.linux.arch_bits' has no member called 'syscall0' pub const syscall0 = syscall_bits.syscall0; ^ ./lib/std/os/linux.zig:1040:43: note: referenced here return @bitCast(pid_t, @truncate(u32, syscall0(.gettid))); ^ ./lib/std/os/linux.zig:51:34: error: container 'std.os.linux.arch_bits' has no member called 'syscall4' pub const syscall4 = syscall_bits.syscall4; ^ ./lib/std/os/linux.zig:288:12: note: referenced here return syscall4(.futex, @ptrToInt(uaddr), futex_op, @bitCast(u32, val), @ptrToInt(timeout)); ^ make[2]: *** [CMakeFiles/zig.dir/build.make:335: zig1.o] Error 1 make[2]: Leaving directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' make[1]: *** [CMakeFiles/Makefile2:119: CMakeFiles/zig.dir/all] Error 2 make[1]: Leaving directory '/home/ubuntu/zig-bootstrap.git/out/build-zig-host' make: *** [Makefile:130: all] Error 2
llvm should be built with zlib support as lld needs it
currently we disable zlib support here:
Line 66 in fc78f17
However, this may be necessary when linking against system libraries including libc, which current fails on void linux using the static zig tarballs from ziglang.org/download which are built using this repo:
ld.lld: error: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/crti.o: contains a compressed section, but zlib is not available
To fix this I guess we need to build zlib as well as part of this repo, I don't really see an alternative option unfortunately.
x86_64-macos-gnu
This is failing because of ziglang/zig#5828. The workaround is to use
native
instead ofmacos
.s390x-linux-musl baseline
Aborts with "TODO implement mapping for c_longdouble" which appears to come from src/stage1/codegen.cpp:8736
the cmake platform name for freebsd is "FreeBSD" not "Freebsd"
Line 13 in c581efa
This logic is not correct for freebsd. It results in "Freebsd" but cmake expects "FreeBSD".
The simplest solution would be to require this field in the input CLI parameters. We should be able to derive the information with essentially a switch case statement but the question is what additional system dependencies or complexities into the build script will that drag in?
make is a dependency
Not mentioned in the readme.
Recommend Projects
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TensorFlow
An Open Source Machine Learning Framework for Everyone
Django
The Web framework for perfectionists with deadlines.
Laravel
A PHP framework for web artisans
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
Recommend Topics
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
web
Some thing interesting about web. New door for the world.
server
A server is a program made to process requests and deliver data to clients.
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Visualization
Some thing interesting about visualization, use data art
Game
Some thing interesting about game, make everyone happy.
Recommend Org
We are working to build community through open source technology. NB: members must have two-factor auth.
Microsoft
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba
Alibaba Open Source for everyone
D3
Data-Driven Documents codes.
Tencent
China tencent open source team.
Jobs
Jooble