Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Failed to build llvm 8.0.0 after upgrade gcc to 9.1.0 #41235

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR42265
Status NEW
Importance P enhancement
Reported by Mingli (mingli.yu@windriver.com)
Reported on 2019-06-12 18:51:28 -0700
Last modified on 2019-06-13 23:23:43 -0700
Version 8.0
Hardware PC Linux
CC anton@korobeynikov.info, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
I encounter a build error for llvm 8.0.0(git://github.com/llvm/llvm-
project.git) on ppc after upgrade gcc to 9.1.0
 | collect2: fatal error: ld terminated with signal 11 [Segmentation fault]

The linker used here is powerpc-poky-linux-g++.

# powerpc-poky-linux-g++ -v
Using built-in specs.
COLLECT_GCC=powerpc-poky-linux-g++
COLLECT_LTO_WRAPPER=//yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-r0/recipe-sysroot-native/usr/bin/powerpc-poky-linux/../../libexec/powerpc-poky-linux/gcc/powerpc-poky-linux/9.1.0/lto-wrapper
Target: powerpc-poky-linux
Configured with: ../../../../../../work-shared/gcc-9.1.0-r0/gcc-9.1.0/configure
--build=x86_64-linux --host=x86_64-linux --target=powerpc-poky-linux --
prefix=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native/usr --
exec_prefix=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot-native/usr --
bindir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native/usr/bin/powerpc-poky-linux --
sbindir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native/usr/bin/powerpc-poky-linux --
libexecdir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot-native/usr/libexec/powerpc-poky-linux --
datadir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native/usr/share --
sysconfdir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot-native/etc --
sharedstatedir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot-native/com --
localstatedir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot-native/var --
libdir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native/usr/lib/powerpc-poky-linux --
includedir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot-native/usr/include --
oldincludedir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot-native/usr/include --
infodir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native/usr/share/info --
mandir=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native/usr/share/man --disable-silent-rules --disable-
dependency-tracking --with-libtool-
sysroot=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-powerpc/9.1.0-
r0/recipe-sysroot-native --enable-clocale=generic --with-gnu-ld --enable-shared
--enable-languages=c,c++ --enable-threads=posix --disable-multilib --enable-c99
--enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-
prefix=powerpc-poky-linux- --without-local-prefix --enable-lto --disable-libssp
--enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --
with-linker-hash-style=sysv --enable-linker-build-id --with-ppl=no --with-
cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --
with-gxx-include-dir=/not/exist/usr/include/c++/9.1.0 --with-sysroot=/not/exist
--with-build-sysroot=//yocto/builds/upgrade6/tmp/work/x86_64-linux/gcc-cross-
powerpc/9.1.0-r0/recipe-sysroot --enable-secureplt --with-long-double-128 --
enable-targets=powerpc64 --enable-poison-system-directories --with-system-zlib -
-disable-static --disable-nls --with-glibc-version=2.28 --enable-initfini-array
--enable-__cxa_atexit
Thread model: posix
gcc version 9.1.0 (GCC)

BTW, it builds successfully with gcc 8.3.0.
Quuxplusone commented 5 years ago

Looks like binutils bug. Could you try to upgrade binutils to the latest release?

Quuxplusone commented 5 years ago

The linker used here is powerpc-poky-linux-g++ which belongs to gcc.

BTW, I only upgrade gcc from 9.1.0 and didn't do any change to binutils.

Before upgrade gcc to 9.1.0, I used gcc 8.3.0 and can build llvm 8.0.0 successfully.

But after upgrade gcc to 9.1.0, it fails to build llvm on ppc, but can build successfully other package such as kea 1.5.0(https://github.com/isc-projects/kea.git) on ppc.

Quuxplusone commented 5 years ago
(In reply to Anton Korobeynikov from comment #1)
> Looks like binutils bug. Could you try to upgrade binutils to the latest
> release?

The detailed failure message in the build log as below:

[527/1795] : && /yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-
r0/recipe-sysroot-native/usr/bin/powerpc-poky-linux/powerpc-poky-linux-g++  -
m32 -mhard-float -mcpu=7400 -mno-spe -fstack-protector-strong    -Wformat -
Wformat-security -Werror=format-security  --
sysroot=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-r0/recipe-
sysroot  -Og -g -feliminate-unused-debug-types -fmacro-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-
r0=/usr/src/debug/llvm/8.0.0-r0                      -fdebug-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-
r0=/usr/src/debug/llvm/8.0.0-r0                      -fdebug-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-r0/recipe-
sysroot=                      -fdebug-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-r0/recipe-
sysroot-native=  -pipe -fvisibility-inlines-hidden  -m32 -mhard-float -
mcpu=7400 -mno-spe -fstack-protector-strong    -Wformat -Wformat-security -
Werror=format-security  --sysroot=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-
linux/llvm/8.0.0-r0/recipe-sysroot -mlongcall -fPIC -fvisibility-inlines-hidden
-Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-
strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -
Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-
noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -g  -
m32 -mhard-float -mcpu=7400 -mno-spe -fstack-protector-strong    -Wformat -
Wformat-security -Werror=format-security  --
sysroot=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-r0/recipe-
sysroot  -Og -g -feliminate-unused-debug-types -fmacro-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-
r0=/usr/src/debug/llvm/8.0.0-r0                      -fdebug-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-
r0=/usr/src/debug/llvm/8.0.0-r0                      -fdebug-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-r0/recipe-
sysroot=                      -fdebug-prefix-
map=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-r0/recipe-
sysroot-native=  -pipe -fvisibility-inlines-hidden  -m32 -mhard-float -
mcpu=7400 -mno-spe -fstack-protector-strong    -Wformat -Wformat-security -
Werror=format-security  --sysroot=/yocto/builds/upgrade6/tmp/work/ppc7400-poky-
linux/llvm/8.0.0-r0/recipe-sysroot -mlongcall -Wl,-O1 -Wl,--hash-style=gnu -Wl,-
-as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,-O1 -Wl,--hash-
style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,-
allow-shlib-undefined    -Wl,-rpath-
link,/yocto/builds/upgrade6/tmp/work/ppc7400-poky-linux/llvm/8.0.0-
r0/build/./lib utils/TableGen/CMakeFiles/llvm-
tblgen.dir/AsmMatcherEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/AsmWriterEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/AsmWriterInst.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/Attributes.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CallingConvEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeEmitterGen.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeGenDAGPatterns.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeGenHwModes.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeGenInstruction.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeGenMapTable.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeGenRegisters.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeGenSchedule.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/CodeGenTarget.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/DAGISelEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/DAGISelMatcherEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/DAGISelMatcherGen.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/DAGISelMatcherOpt.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/DAGISelMatcher.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/DFAPacketizerEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/DisassemblerEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/ExegesisEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/FastISelEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/FixedLenDecoderEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/GlobalISelEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/InfoByHwMode.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/InstrInfoEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/InstrDocsEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/IntrinsicEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/OptParserEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/PredicateExpander.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/PseudoLoweringEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/RISCVCompressInstEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/RegisterBankEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/RegisterInfoEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/SDNodeProperties.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/SearchableTableEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/SubtargetEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/SubtargetFeatureInfo.cpp.o utils/TableGen/CMakeFiles/llvm-
tblgen.dir/TableGen.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/Types.cpp.o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86DisassemblerTables.cpp.o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86EVEX2VEXTablesEmitter.cpp.o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86ModRMFilters.cpp.o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86RecognizableInstr.cpp.o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o
utils/TableGen/CMakeFiles/llvm-tblgen.dir/CTagsEmitter.cpp.o  -o bin/llvm-
tblgen  -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMSupport.a lib/libLLVMTableGen.a
-lpthread lib/libLLVMSupport.a -lz -lrt -ldl -ltinfo -lpthread -lm
lib/libLLVMDemangle.a && :
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
Quuxplusone commented 5 years ago
> collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
So, linker bug.