Issue 130271
Summary [20.1.0] Build failure when trying to build an i386 compiler-rt on x86_64
Labels new issue
Assignees
Reporter berolinux
    Building LLVM 20.1.0 with
```
cmake [...] -DLLVM_ENABLE_PROJECTS='llvm;bolt;clang;clang-tools-extra;polly;mlir;flang;lldb;lld;libclc' -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR:BOOL=ON -DLLVM_ENABLE_RUNTIMES='libunwind;openmp;pstl;libcxx;libcxxabi;libc;compiler-rt;offload' -DCOMPILER_RT_USE_BUILTINS_LIBRARY:BOOL=ON -DCOMPILER_RT_ENABLE_SOFTWARE_INT128:BOOL=ON -DLLVM_TARGETS_TO_BUILD=all -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD='ARC;CSKY;M68k;SPIRV;Xtensa' -DLLVM_BUILD_RUNTIME:BOOL=ON -DLLVM_TOOL_COMPILER_RT_BUILD:BOOL=ON -DCOMPILER_RT_BUILD_BUILTINS:BOOL=ON -DCOMPILER_RT_BUILD_CRT:BOOL=ON -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON -DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DCLANG_LINK_CLANG_DYLIB:BOOL=ON -DMLIR_BUILD_MLIR_C_DYLIB:BOOL=ON -DSPIRV_HEADERS_ENABLE_INSTALL:BOOL=ON -DSPIRV_TOOLS_BUILD_STATIC:BOOL=OFF -G Ninja ../llvm ; ninja
```
fails near the end when trying to build the i386 compiler-rt runtimes:
```
Performing configure step for 'runtimes'
Not searching for unused variables given on the command line.
loading initial cache file /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/build/projects/runtimes/tmp/runtimes-cache-RelWithDebInfo.cmake
-- Performing bootstrapping runtimes build.
CMake Deprecation Warning at /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:18 (include)


-- Building with -fPIC
-- LLVM host triple: x86_64-pc-linux-gnu
-- LLVM default target triple: x86_64-pc-linux-gnu
CMake Deprecation Warning at /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
 /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/libc/CMakeLists.txt:14 (include)


-- Setting LIBC_NAMESPACE namespace to '__llvm_libc_20_1_0_'
-- Set COMPILER_RESOURCE_DIR to /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/build/lib64/clang/20 using --print-resource-dir
-- Building libc for x86_64 on linux with
 LIBC_COMPILE_OPTIONS_DEFAULT: 
-- LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR: ON
-- LIBC_CONF_KEEP_FRAME_POINTER: ON
-- LIBC_CONF_ERRNO_MODE: LIBC_ERRNO_MODE_DEFAULT
-- LIBC_ADD_NULL_CHECKS: ON
-- LIBC_CONF_FREXP_INF_NAN_EXPONENT: 
-- LIBC_CONF_MATH_OPTIMIZATIONS: 0
-- LIBC_CONF_PRINTF_DISABLE_FIXED_POINT: OFF
-- LIBC_CONF_PRINTF_DISABLE_FLOAT: OFF
-- LIBC_CONF_PRINTF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_PRINTF_DISABLE_STRERROR: OFF
-- LIBC_CONF_PRINTF_DISABLE_WRITE_INT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE: OFF
-- LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY: ON
-- LIBC_CONF_QSORT_IMPL: LIBC_QSORT_QUICK_SORT
-- LIBC_CONF_SCANF_DISABLE_FLOAT: OFF
-- LIBC_CONF_SCANF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER: ON
-- LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING: OFF
-- LIBC_CONF_STRING_UNSAFE_WIDE_READ: OFF
-- LIBC_CONF_TIME_64BIT: OFF
-- Writing config doc to /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/libc/docs/configure.rst
-- Set CPU features: AVX;AVX2;FMA;SSE2;SSE4_2
-- Compiler features available: cfloat128;cfloat16;fixed_point;float128;float16
-- Using getrandom for hashtable randomness
CMake Warning (dev) at /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/libc/test/src/__support/CMakeLists.txt:272 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Using libunwind testing configuration: /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/libunwind/test/configs/llvm-libunwind-shared.cfg.in
-- Using libc++abi testing configuration: /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in
-- Parallel STL uses the omp backend
-- Using libc++ testing configuration: /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/libcxx/test/configs/llvm-libc++-shared.cfg.in
-- Found system-installed LLVM 20.1.0 with headers in /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/llvm/include;/home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/build/include
-- Clang-tidy tests are enabled.
-- ABI list file not generated for configuration x86_64-pc-linux-gnu.libcxxabi.v1.stable.exceptions.nonew, `check-cxx-abilist` will not be available.
CMake Deprecation Warning at /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
 /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/compiler-rt/CMakeLists.txt:12 (include)


-- Compiler-RT supported architectures: x86_64;i386
-- Builtin supported architectures: i386;x86_64
-- Performing additional configure checks with target flags: -m32 -Werror=array-bounds;-Werror=uninitialized;-Werror=shadow;-Werror=empty-body;-Werror=sizeof-pointer-memaccess;-Werror=sizeof-array-argument;-Werror=suspicious-memaccess;-Werror=builtin-memcpy-chk-size;-Werror=array-bounds-pointer-arithmetic;-Werror=return-stack-address;-Werror=sizeof-array-decay;-Werror=format-insufficient-args;-Wformat;-std=c11;-fPIC;-fno-builtin;-fvisibility=hidden;-fomit-frame-pointer
-- For i386 builtins preferring i386/fp_mode.c to fp_mode.c
-- For i386 builtins preferring i386/ashldi3.S to ashldi3.c
-- For i386 builtins preferring i386/ashrdi3.S to ashrdi3.c
-- For i386 builtins preferring i386/divdi3.S to divdi3.c
-- For i386 builtins preferring i386/floatdidf.S to floatdidf.c
-- For i386 builtins preferring i386/floatdisf.S to floatdisf.c
-- For i386 builtins preferring i386/floatundidf.S to floatundidf.c
-- For i386 builtins preferring i386/floatundisf.S to floatundisf.c
-- For i386 builtins preferring i386/lshrdi3.S to lshrdi3.c
-- For i386 builtins preferring i386/moddi3.S to moddi3.c
-- For i386 builtins preferring i386/muldi3.S to muldi3.c
-- For i386 builtins preferring i386/udivdi3.S to udivdi3.c
-- For i386 builtins preferring i386/umoddi3.S to umoddi3.c
-- For i386 builtins preferring i386/floatdixf.S to floatdixf.c
-- For i386 builtins preferring i386/floatundixf.S to floatundixf.c
-- Performing additional configure checks with target flags: -m64 -Werror=array-bounds;-Werror=uninitialized;-Werror=shadow;-Werror=empty-body;-Werror=sizeof-pointer-memaccess;-Werror=sizeof-array-argument;-Werror=suspicious-memaccess;-Werror=builtin-memcpy-chk-size;-Werror=array-bounds-pointer-arithmetic;-Werror=return-stack-address;-Werror=sizeof-array-decay;-Werror=format-insufficient-args;-Wformat;-std=c11;-fPIC;-fno-builtin;-fvisibility=hidden;-fomit-frame-pointer
-- For x86_64 builtins preferring i386/fp_mode.c to fp_mode.c
-- For x86_64 builtins preferring x86_64/floatdidf.c to floatdidf.c
-- For x86_64 builtins preferring x86_64/floatdisf.c to floatdisf.c
-- For x86_64 builtins preferring x86_64/floatundidf.S to floatundidf.c
-- For x86_64 builtins preferring x86_64/floatundisf.S to floatundisf.c
-- For x86_64 builtins preferring x86_64/floatdixf.c to floatdixf.c
-- For x86_64 builtins preferring x86_64/floatundixf.S to floatundixf.c
CMake Error at /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/compiler-rt/cmake/Modules/AddCompilerRT.cmake:277 (message):
  Cannot find builtins library for the target architecture: arch: i386
  target: i386-pc-linux-gnu libname: clang_rt.stats-i386
Call Stack (most recent call first):
 /home/bero/abf/llvm/BUILD/llvm-20.1.0-build/llvm-project-llvmorg-20.1.0/compiler-rt/lib/stats/CMakeLists.txt:23 (add_compiler_rt_runtime)


-- Configuring incomplete, errors occurred!
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to