zig-bootstrap
zig-bootstrap copied to clipboard
C compiler identification of `build-zig-host` is unknown on Ubuntu 20.04. multiarch
Arguments were ./build -j8 linux-x86_64-musl native. Notably, the package manager configuration was needed to be set up as there is something like a multiarch setup on the system.
It looks like the option native breaks TARGET_OS_CMAKE and in turn zlib creation, because manually setting TARGET_OS_CMAKE=Linux just works.
Would be nice to document that native doesnt work in these cases.
Relevant log
nstall the project...
-- Install configuration: "Release"
-- Installing: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig
-- Set runtime path of "/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig" to ""
-- Installing: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/lib
-- The C compiler identification is unknown
System is unknown to cmake, create:
Platform/x86_64 to use this system, please post your config file on discourse.cmake.org so it can
be added to cmake
-- Check for working C compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig
System is unknown to cmake, create:
Platform/x86_64 to use this system, please post your config file on discourse.cmake.org so it can
be added to cmake
-- Check for working C compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig
-- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-
native/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_a349c/fast && /usr/bin/make -f CMakeFiles/cmTC_a349c.d
ir/build.make CMakeFiles/cmTC_a349c.dir/build
make[1]: Entering directory '/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-l
inux-x86_64-musl-native/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a349c.dir/testCCompiler.c.obj
/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc -fno-sanitize=all -s -ta
rget linux-x86_64-musl -mcpu=native -o CMakeFiles/cmTC_a349c.dir/testCCompiler.c.obj -c /home
/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-native/CMakeFiles/CMa
keTmp/testCCompiler.c
error: UnknownArchitecture
make[1]: *** [CMakeFiles/cmTC_a349c.dir/build.make:66: CMakeFiles/cmTC_a349c.dir/testCCompiler
.c.obj] Error 1
make[1]: Leaving directory '/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-li
nux-x86_64-musl-native/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a349c/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/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-native
/CMakeFiles/CMakeOutput.log".
See also "/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-native
/CMakeFiles/CMakeError.log".
CMakeError.log:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags:
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: -c
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: -Aa
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: -D__CLASSIC_C__
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
error: UnknownOperatingSystem
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags:
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: -c
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: -Aa
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: -D__CLASSIC_C__
The output was:
1
error: UnknownArchitecture
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc;-fno-sanitize=all;-s;-target;linux-x86_64-musl;-mcpu=native
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
1
error: UnknownOperatingSystem
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
zig: error: no input files
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
zig: error: no input files
Determining if the C compiler works failed with the following output:
Change Dir: /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-native/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_a349c/fast && /usr/bin/make -f CMakeFiles/cmTC_a349c.dir/build.make CMakeFiles/cmTC_a349c.dir/build
make[1]: Entering directory '/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-native/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a349c.dir/testCCompiler.c.obj
/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig cc -fno-sanitize=all -s -target linux-x86_64-musl -mcpu=native -o CMakeFiles/cmTC_a349c.dir/testCCompiler.c.obj -c /home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-native/CMakeFiles/CMakeTmp/testCCompiler.c
error: UnknownArchitecture
make[1]: *** [CMakeFiles/cmTC_a349c.dir/build.make:66: CMakeFiles/cmTC_a349c.dir/testCCompiler.c.obj] Error 1
make[1]: Leaving directory '/home/user/dev/git/bootstrap/zig-bootstrap/musl/out/build-zlib-linux-x86_64-musl-native/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a349c/fast] Error 2
Install the project... -- Install configuration: "Release" -- Installing: /home/hafer/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig -- Set runtime path of "/home/hafer/dev/git/bootstrap/zig-bootstrap/musl/out/host/bin/zig" to "" -- Installing: /home/hafer/dev/git/bootstrap/zig-bootstrap/musl/out/host/lib -- The C compiler identification is unknown System is unknown to cmake, create:
Sidenode: The warnings could be updated.
LLD Link... warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varar
gs'? [-Wunknown-warning-option]
[ 40%] Building CXX object lib/Target/RISCV/Disassembler/CMakeFiles/LLVMRISCVDisassembler.dir/RISC
VDisassembler.cpp.o
[ 40%] Linking CXX static library ../../../libLLVMAArch64AsmParser.a
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunkn
own-warning-option]
[ 40%] Built target LLVMAArch64AsmParser
Scanning dependencies of target LLVMSparcAsmParser
[ 40%] Building CXX object lib/Target/Sparc/AsmParser/CMakeFiles/LLVMSparcAsmParser.dir/SparcAsmPa
rser.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunkn
own-warning-option]
1 warning generated.
LLD Link... 1 warning generated.
[ 40%] Linking CXX static library ../../../libLLVMMSP430AsmParser.a
[ 40%] Linking CXX static library ../../../libLLVMARMDisassembler.a
[ 40%] Built target LLVMMSP430AsmParser
Scanning dependencies of target LLVMSystemZAsmParser
[ 40%] Built target LLVMARMDisassembler
[ 40%] Building CXX object lib/Target/SystemZ/AsmParser/CMakeFiles/LLVMSystemZAsmParser.dir/System
ZAsmParser.cpp.o
Scanning dependencies of target LLVMSystemZDisassembler
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunkn
own-warning-option]
Never mind my stupid mistake.