Re: Scons Trouble while building gem5.opt

674 views
Skip to first unread message

Sam Xi

unread,
Nov 20, 2020, 4:19:11 PM11/20/20
to Aditya Saini, gem5-Aladdin users
You're likely running out of memory in your Docker volume and/or host machine. I'd suggest trying to build with -j1 instead of -j4 and increasing the memory allocation to your Docker volume.

Sam Xi
Google Inc., Software Engineer
http://www.samxi.org



On Thu, Nov 19, 2020 at 12:39 AM Aditya Saini <adity...@iiitd.ac.in> wrote:
Greetings

I have been using gem5-aladdin for a while now. Because of the dependencies of my project I have been using the llvm-3.4 version of the docker image.

I recently installed Ubuntu 20.04 on my system and decided to install gem5-aladdin on it. After pulling the same docker image using docker pull xyzsam/gem5-aladdin:llvm-3.4,
I started building the gem5.opt file. After numerous tries, the following error keeps recurring:

root:/workspace/gem5-aladdin# scons build/X86/gem5.opt -j4
scons: Reading SConscript files ...
Warning: Your compiler doesn't support incremental linking and lto at the same time, so lto is being disabled. To force lto on anyway, use the --force-lto option. That will disable partial linking.
Checking for C header file Python.h... (cached) yes
Checking for C library python2.7... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... (cached) yes
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... (cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... (cached) yes
Checking for C library tcmalloc... (cached) no
Checking for C library tcmalloc_minimal... (cached) no
You can get a 12% performance improvement by installing tcmalloc (libgoogle-perftools-dev package on Ubuntu or RedHat).
Checking for C library readline... (cached) yes
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None... (cached) no
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library execinfo... (cached) no
Checking for C library sqlite3... (cached) yes
No suitable back trace implementation found.
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) no
Warning: Header file <png.h> not found.
         This host has no libpng library.
         Disabling support for PNG framebuffers.
Checking for C header file linux/kvm.h... (cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /workspace/gem5-aladdin/build/X86
Using saved variables file /workspace/gem5-aladdin/build/variables/X86
scons: done reading SConscript files.
scons: Building targets ...
 [VER TAGS]  -> X86/sim/tags.cc
 [    LINK]  -> X86/arch/riscv/insts/lib.o.partial
 [    LINK]  -> X86/mem/ruby/slicc_interface/lib.o.partial
 [ TRACING]  -> X86/debug/HWPrefetch.hh
 [     CXX] X86/mem/cache/prefetch/tagged.cc -> .o
 [     CXX] X86/mem/cache/prefetch/queued.cc -> .o
 [     CXX] X86/mem/cache/prefetch/stride.cc -> .o
 [     CXX] X86/arch/generic/decode_cache.cc -> .o
 [     CXX] X86/arch/generic/mmapped_ipr.cc -> .o
/usr/bin/ld: final link failed: Input/output error
collect2: error: ld returned 1 exit status
scons: *** [build/X86/arch/riscv/insts/lib.o.partial] Error 1
scons: building terminated because of errors.


Can anyone please help me with this?

Thanks

--
You received this message because you are subscribed to the Google Groups "gem5-Aladdin users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gem5-aladdin-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gem5-aladdin-users/30ce7b7e-686f-4560-8600-e333aec28f10n%40googlegroups.com.

travis day

unread,
Nov 22, 2020, 11:07:11 PM11/22/20
to gem5-Aladdin users
I also have this error before and solve it by setting a small number of cores. It seems that the gem5 depends on the physical machine a lot.
Any chance to setup many cores simulations in the gem5 when you only have a 6 or 8 cores CPU?

Cheers,
Travis

Sam Xi

unread,
Nov 23, 2020, 1:17:25 AM11/23/20
to travis day, gem5-Aladdin users
gem5 is a single threaded simulator so you can simulate as many cores as you want, regardless of how many physical cores you have.

Building gem5 is a compute and memory intensive task, so naturally how fast it builds will depend on your host machine.

Reply all
Reply to author
Forward
0 new messages