ziglang / zig-bootstrap

take off every zig
368 stars 86 forks source link

arm-linux-musleabi #103

Open LinuxUserGD opened 2 years ago

LinuxUserGD commented 2 years ago

Host system: x86_64-gentoo-linux-musl

Might be a regression or host specific because README mentions target should be OK

[100%] Linking C static library libz.a
[100%] Built target z
Install the project...
-- Install configuration: "Release"
-- Installing: /home/user/zig-bootstrap/out/arm-linux-musleabi-baseline/lib/libz.a
-- Installing: /home/user/zig-bootstrap/out/arm-linux-musleabi-baseline/include/zconf.h
-- Installing: /home/user/zig-bootstrap/out/arm-linux-musleabi-baseline/include/zlib.h
-- The C compiler identification is Clang 14.0.6
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: /home/user/zig-bootstrap/out/host/bin/zig
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/user/zig-bootstrap/out/host/bin/zig - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /home/user/zig-bootstrap/out/host/bin/zig
-- Check for working CXX compiler: /home/user/zig-bootstrap/out/host/bin/zig - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:62 (message):
  The C++ compiler

    "/home/user/zig-bootstrap/out/host/bin/zig"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/user/zig-bootstrap/out/build-llvm-arm-linux-musleabi-baseline/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_605e7/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_605e7.dir/build.make CMakeFiles/cmTC_605e7.dir/build
    gmake[1]: Entering directory '/home/user/zig-bootstrap/out/build-llvm-arm-linux-musleabi-baseline/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_605e7.dir/testCXXCompiler.cxx.o
    /home/user/zig-bootstrap/out/host/bin/zig  c++ -fno-sanitize=all -s -target arm-linux-musleabi -mcpu=baseline    -o CMakeFiles/cmTC_605e7.dir/testCXXCompiler.cxx.o -c /home/user/zig-bootstrap/out/build-llvm-arm-linux-musleabi-baseline/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    warning(compilation): libc++ does not work on multi-threaded ARM yet.
    For more details: https://github.com/ziglang/zig/issues/6573
    error: unable to create compilation: TargetRequiresSingleThreaded
    gmake[1]: *** [CMakeFiles/cmTC_605e7.dir/build.make:78: CMakeFiles/cmTC_605e7.dir/testCXXCompiler.cxx.o] Error 1
    gmake[1]: Leaving directory '/home/user/zig-bootstrap/out/build-llvm-arm-linux-musleabi-baseline/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:127: cmTC_605e7/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:49 (project)

-- Configuring incomplete, errors occurred!
See also "/home/user/zig-bootstrap/out/build-llvm-arm-linux-musleabi-baseline/CMakeFiles/CMakeOutput.log".
See also "/home/user/zig-bootstrap/out/build-llvm-arm-linux-musleabi-baseline/CMakeFiles/CMakeError.log".
Kuratius commented 1 year ago
[100%] Building stage3
[100%] Built target stage3
Install the project...
-- Install configuration: "Release"
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.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The C compiler identification is unknown
System is unknown to cmake, create:
Platform/j to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please post that file on discourse.cmake.org.
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/j to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/user/zig-bootstrap/out/host/bin/zig
System is unknown to cmake, create:
Platform/j 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/zig-bootstrap/out/host/bin/zig - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/home/user/zig-bootstrap/out/host/bin/zig"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/user/zig-bootstrap/out/build-zlib--j-1/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_62757/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_62757.dir/build.make CMakeFiles/cmTC_62757.dir/build
    gmake[1]: Entering directory '/home/dk/zig-bootstrap/out/build-zlib--j-1/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_62757.dir/testCCompiler.c.obj
    /home/dk/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -s -target -j -mcpu=1    -o CMakeFiles/cmTC_62757.dir/testCCompiler.c.obj -c /home/dk/zig-bootstrap/out/build-zlib--j-1/CMakeFiles/CMakeTmp/testCCompiler.c
    error: UnknownArchitecture
    gmake[1]: *** [CMakeFiles/cmTC_62757.dir/build.make:78: CMakeFiles/cmTC_62757.dir/testCCompiler.c.obj] Error 1
    gmake[1]: Leaving directory '/home/dk/zig-bootstrap/out/build-zlib--j-1/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:127: cmTC_62757/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/zig-bootstrap/out/build-zlib--j-1/CMakeFiles/CMakeOutput.log".
See also "/home/user/zig-bootstrap/out/build-zlib--j-1/CMakeFiles/CMakeError.log".

Similar issue for me. Trying to build on x86 64 bit with 16 GB ram. I've compiled zig itself fine before on this machine, so it's a bit weird that it complains about the host failing and not the target.

./build arm-linux-musleabi baseline

is what I used to build. The system zig is 0.11.0-dev.1366+c70a3d902, but according to the error it's trying to use the newly compiled zig anyway. Are there any log files that would be helpful?

alexrp commented 3 weeks ago

Hits the same issue described in https://github.com/ziglang/zig-bootstrap/issues/101#issuecomment-2303151451.