Skip to content

rust-1.88.0 fails to build with glibc 2.42 #144904

@tgurr

Description

@tgurr

rust 1.88.0 fails to build with glibc 2.42 due to compiler-rt errors:

FAILED: [code=1] lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_posix.cpp.o 
/usr/host/bin/x86_64-pc-linux-gnu-c++ -DHAVE_RPC_XDR_H=0 -I/var/tmp/paludis/build/dev-lang-rust-1.88.0/work/rustc-1.88.0-src/src/llvm-project/compiler-rt/lib/sanitizer_common/.. -ffunction-sections -fdata-sections -fPIC -m64 -march=native -pipe -march=native -O2 -pipe -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_posix.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_posix.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_posix.cpp.o -c /var/tmp/paludis/build/dev-lang-rust-1.88.0/work/rustc-1.88.0-src/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
/var/tmp/paludis/build/dev-lang-rust-1.88.0/work/rustc-1.88.0-src/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:489:31: error: invalid application of 'sizeof' to incomplete type '__sanitizer::termio'
  489 |   unsigned struct_termio_sz = sizeof(struct termio);
      |                               ^~~~~~~~~~~~~~~~~~~~~

Relevant part of build log: rust-1.88.0-build-glibc-2.42.log

Meta

The bundled compiler-rt is missing following recent upstream commits:

llvm/llvm-project@59978b2
llvm/llvm-project@0a17483
llvm/llvm-project@c99b1bc

Applying them allows the build of rust 1.88.0 with glibc 2.42 to succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions