sld-columbia / esp

Embedded Scalable Platforms: Heterogeneous SoC architecture and IP integration made easy
Other
344 stars 107 forks source link

Internal compiler error when trying to build risc-v toolchain for ariane processor #204

Open HelpDesperatelyNeeded opened 1 year ago

HelpDesperatelyNeeded commented 1 year ago

Describe the bug When following the tutorial at https://esp.cs.columbia.edu/docs/setup/setup-guide/ I got an error during the stage where it asked me "Skip riscv-gnu-toolchain [y|n]? n:". It ran for a while, then had the following error:

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual  -fno-common  -DHAVE_CONFIG_H -I. -Icommon -I../.././riscv-gcc/gcc -I../.././riscv-gcc/gcc/common -I../.././riscv-gcc/gcc/../include -I../.././riscv-gcc/gcc/../libcpp/include  -I../.././riscv-gcc/gcc/../libdecnumber -I../.././riscv-gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../.././riscv-gcc/gcc/../libbacktrace   -o common/common-targhooks.o -MT common/common-targhooks.o -MMD -MP -MF common/.deps/common-targhooks.TPo ../.././riscv-gcc/gcc/common/common-targhooks.c
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[3]: *** [Makefile:1110: c-family/c-common.o] Error 4
make[3]: *** Waiting for unfinished jobs....
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[3]: *** [Makefile:1110: dwarf2out.o] Error 4
config.status: creating Makefile
config.status: creating cc1plugin-config.h
config.status: executing depfiles commands
config.status: executing libtool commands
rm gcov.pod fsf-funding.pod gcov-tool.pod gpl.pod cpp.pod gcov-dump.pod gfdl.pod gcc.pod
make[3]: Leaving directory '/home/vboxuser/esp/_riscv_build/riscv-gnu-toolchain/build-gcc-newlib-stage2/gcc'
make[2]: *** [Makefile:4261: all-gcc] Error 2
make[2]: Leaving directory '/home/vboxuser/esp/_riscv_build/riscv-gnu-toolchain/build-gcc-newlib-stage2'
make[1]: *** [Makefile:899: all] Error 2
make[1]: Leaving directory '/home/vboxuser/esp/_riscv_build/riscv-gnu-toolchain/build-gcc-newlib-stage2'
make: *** [Makefile:534: stamps/build-gcc-newlib-stage2] Error 2

How do I fix this?

To Reproduce I followed the tutorial until the point where it says

# RISC-V 64-bit toolchain (for the Ariane processor)
./utils/toolchain/build_riscv_toolchain.sh

I then ran this command and entered the default options up to and including the stage where it says "Skip riscv-gnu-toolchain [y|n]? n:", where it then spat out the error above.

Out of the listed CAD tools I only installed ModelSim (2019.4) and Vivado (2019.2).

Expected behavior I expected it to successfully build the toolchain like it did for the leon3 processor.

Desktop: