[coreboot] Problem in building the toolchain with gcc-8.1

Akendo akendo at akendo.eu
Tue Jun 5 12:58:20 CEST 2018


Hello everyone,

I currently having a problem build the toolchain from a freshly checkout
coreboot repository. I've tried to build with different options: For
example with all platforms and only with i386 support. Multi core
(CPUS=4) and with a single core. Here an example build:

Building toolchain using 1 thread(s).

Target architecture is i386-elf

Found compatible Ada compiler, enabling Ada support by default.

Downloading and verifing tarballs ...
 * gmp-6.1.2.tar.xz (cached)... hash verified
(9dc6981197a7d92f339192eea974f5eca48fcffe)

 * mpfr-3.1.5.tar.xz (cached)... hash verified
(c0fab77c6da4cb710c81cc04092fb9bea11a9403)

 * mpc-1.0.3.tar.gz (cached)... hash verified
(b8be66396c726fdc36ebb0f692ed8a8cca3bcc66)

 * binutils-2.29.1.tar.xz (cached)... hash verified
(172244a349d07ec205c39c0321cbc354c125e78e)

 * gcc-6.3.0.tar.bz2 (cached)... hash verified
(928ab552666ee08eed645ff20ceb49d139205dea)

Downloaded tarballs ... ok
Unpacking and patching ...
 * gmp-6.1.2.tar.xz
   o gmp-6.1.2_freebsd-configure.patch
 * mpfr-3.1.5.tar.xz
 * mpc-1.0.3.tar.gz
 * binutils-2.29.1.tar.xz
   o binutils-2.29.1_mips-gold.patch
   o binutils-2.29.1_no-bfd-doc.patch
 * gcc-6.3.0.tar.bz2
   o gcc-6.3.0_ada-musl_workaround.patch
   o gcc-6.3.0_ada-raise.patch
   o gcc-6.3.0_elf_biarch.patch
   o gcc-6.3.0_gnat.patch
   o gcc-6.3.0_libgcc.patch
   o gcc-6.3.0_memmodel.patch
   o gcc-6.3.0_nds32_ite.patch
   o gcc-6.3.0_no-p-var.patch
   o gcc-6.3.0_pointer_integer.patch
   o gcc-6.3.0_riscv.patch
Unpacked and patched ... ok
Building packages ...
Building GMP v6.1.2 for host ... ok
Building MPFR v3.1.5 for host ... ok
Building MPC v1.0.3 for host ... ok
Building BINUTILS v2.29.1 for target ... ok
Building GCC v6.3.0 for target ... failed. Check
'build-i386-elf-GCC/build.log'.

make[3]: *** [Makefile:26: build_gcc] Error 1
make[2]: *** [Makefile:48: build-i386] Error 2
make[1]: *** [Makefile:16: all_without_gdb] Error 2
make: *** [util/crossgcc/Makefile.inc:37: crossgcc] Error 2



I also tried to do this with clang, with similar result.

Here is the log from clang:

[ 52%] Building CXX object
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cc.o

/home/akendo/src/coreboot/util/crossgcc/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:
In function 'int __s$
nitizer::TracerThread(void*)':
/home/akendo/src/coreboot/util/crossgcc/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:278:22:
error: aggreg$
te 'sigaltstack handler_stack' has incomplete type and cannot be defined
   struct sigaltstack handler_stack;
                      ^~~~~~~~~~~~~
make[2]: ***
[projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/build.make:255:
projects/compiler-rt/lib/sanitizer_common/$
MakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cc.o]
Error 1
make[1]: *** [CMakeFiles/Makefile2:14006:
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/all]
Error 2
make: *** [Makefile:152: all] Error 2
./buildgcc: line 840: cd:
/home/akendo/src/coreboot/util/crossgcc/xgcc/lib/clang/4.0.0/lib: No
such file or directory




A look into the build log from GCC seems to disclose a similar error:

make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
'/home/akendo/src/coreboot/util/crossgcc/build-i386-elf-GCC/libdecnumber'
make[1]: Entering directory
'/home/akendo/src/coreboot/util/crossgcc/build-i386-elf-GCC/fixincludes'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
'/home/akendo/src/coreboot/util/crossgcc/build-i386-elf-GCC/fixincludes'
make[1]: Entering directory
'/home/akendo/src/coreboot/util/crossgcc/build-i386-elf-GCC/gcc'
gnatgcc -c -O2  -fomit-frame-pointer -m64   -gnatpg -gnatwG  -W -Wall
-nostdinc -I- -I. -Iada/generated -Iada -I../../gcc-6.3.0/gcc/ada
-I../../gcc-6.3.0/gcc/ada/gcc-interface
../../gcc-6.3.0/gcc/ada/aspects.adb -o ada/aspects.o
aspects.adb:38:29: warning: use clause for package "HTable" has no effect
make[1]: *** [../../gcc-6.3.0/gcc/ada/gcc-interface/Make-lang.in:119:
ada/aspects.o] Error 1
make[1]: Leaving directory
'/home/akendo/src/coreboot/util/crossgcc/build-i386-elf-GCC/gcc'
make: *** [Makefile:4108: all-gcc] Error 2
/bin/sh ../gcc-6.3.0/mkinstalldirs
/home/akendo/src/coreboot/util/crossgcc/xgcc
/home/akendo/src/coreboot/util/crossgcc/xgcc
/bin/sh: line 3: cd: i386-elf/libgcc: No such file or directory
make: *** [Makefile:10796: install-target-libgcc] Error 1




I'm using ArchLinux with a Linux kernel 4.16.13-1 and gcc 8.1.0-1,
gcc-ada 8.1.0-1


I checkout the git code in different version (4.8, 4.8.1, latest master
commit). I quite sure that's the problem is the compiler. However I do
not know how to fix this in the moment.

I added the compressed logs from the  i386-elf build. Hope this can
help. Thank you for reading.



best regards,
akendo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-i386-elf-GCC_build.log.7z
Type: application/x-7z-compressed
Size: 81436 bytes
Desc: not available
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180605/5687bd40/attachment-0001.7z>


More information about the coreboot mailing list