Skip to content

compiler-rt: relocatable linking with relocations from format elf64-x86-64 to format elf32-i386 (fuzzer.o) is not supported #43022

@llvmbot

Description

@llvmbot
Bugzilla Link 43677
Version 9.0
OS Linux
Blocks #43541
Reporter LLVM Bugzilla Contributor
CC @devincoughlin,@LebedevRI,@zygoloid,@sylvestre

Extended Description

Hi,

We are using RHEL7 machine to build llvm - 9.0.0.

we are using option to enable both 32 and 64 bit library.
please find below command which we are using to build llvm:


cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_WITH_INSTALL_RPATH=1
-DCMAKE_C_COMPILER=/opt/gcc/x86_64/9.2.0a/bin/gcc
-DCMAKE_CXX_COMPILER=/opt/gcc/x86_64/9.2.0a/bin/g++
-DGCC_INSTALL_PREFIX=/opt/gcc/x86_64/9.2.0a/
-DCMAKE_CXX_LINK_FLAGS="-L/opt/gcc/x86_64/9.2.0a/lib"
-DCMAKE_INSTALL_RPATH=$ORIGIN/../lib:%{gccpath}/lib
-DCMAKE_CROSSCOMPILING=True -DCMAKE_BUILD_TYPE=Release
-Wno-dev --enable-zlib -DCMAKE_BUILD_TYPE=Release
--enable-gold --enable-plugins
-DLLVM_TARGETS_TO_BUILD="X86"
--with-termlib
-DLLVM_ENABLE_ZLIB:BOOL=ON ..

make

make install

And the gcc version we are using is,


[root@abinaya-test rpmbuild]$ gcc --version
gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Facing below build issue:

[ 33%] Linking CXX static library ../../../../lib/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a
/opt/binutils/x86_64/2.32/bin/ld: relocatable linking with relocations from format elf64-x86-64 (/root/rpmbuild/BUILD/llvm-9.0.0.src/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(algorithm.cpp.o)) to format elf32-i386 (fuzzer.o) is not supported
make[2]: *** [lib/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a] Error 1
make[2]: *** Deleting file `lib/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a'
make[1]: *** [projects/compiler-rt/lib/fuzzer/CMakeFiles/clang_rt.fuzzer-i386.dir/all] Error 2
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.8Bs8vE (%build)

Please anyone help us here, we have been investigate lot and couldn't get any idea about this issue.

Regards,
Abinaya

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions