gem-5 installation error: Can't find a working Python installation

4,236 views
Skip to first unread message

Harsh Vardhan Kumar

unread,
Apr 28, 2021, 2:18:56 PM4/28/21
to gem5-gpu Developers List
System description:

Ubuntu 16.04
Python 3.8.5
scons 4.1.0
gcc 9.3.0

Followed all the instructions given at here .

(base) harsh@isaac:~/gem5$ scons build/X86/gem5.opt -j 65
scons: Reading SConscript files ...
Checking for linker -Wl,--as-needed support... yes
Checking for pkg-config package protobuf... yes
Checking for compiler -gz support... yes
Checking for linker -gz support... yes
Info: Using Python config: python3-config
Checking for C header file Python.h... yes
Checking for C library python3.8... yes
Checking for C library crypt... yes
Checking for C library pthread... yes
Checking for C library dl... yes
Checking for C library util... yes
Checking for C library rt... yes
Checking for C library m... yes
Checking Python version... no
Error: Can't find a working Python installation

Any help would be appreciated. Thank you!

Harsh

Jason Lowe-Power

unread,
Apr 28, 2021, 4:00:52 PM4/28/21
to Harsh Vardhan Kumar, gem5-gpu Developers List
Hi Harsh,

This error is because python3-config is not in your path. This could be because you haven't installed the python-dev package or your python3-config binary path is different than normal. You can specify the python config binary with PYTHON_CONFIG=<path> on the same line as the scons command (e.g., ` scons build/X86/gem5.fast PYTHON_CONFIG=/usr/bin/python3-config`)

Cheers,
Jason


--
You received this message because you are subscribed to the Google Groups "gem5-gpu Developers List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gem5-gpu-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gem5-gpu-dev/8e73d198-47ed-4a2c-ae45-9beee990bd7cn%40googlegroups.com.

Harsh Vardhan Kumar

unread,
Apr 29, 2021, 4:10:09 AM4/29/21
to gem5-gpu Developers List
Hi,

I'm afraid, there is an error in the build process.

cc1plus: out of memory allocating 8168 bytes after a total of 55078912 bytes
scons: *** [build/X86/arch/x86/generated/inst-constrs.o] Error 1
scons: building terminated because of errors.

The installation was tried on a cloud machine (Intel DevCloud). I checked the memory usage. Only 8.5 GB out of 15GB is used. Such is the case with swap file. I checked for potential solutions, this solution by Intel  talks about windows machine. The cloud machine I'm working on, is ubuntu 18.04

Please let me know if any fixes are needed?

Regards,
Harsh

Jason Lowe-Power

unread,
Apr 29, 2021, 10:35:27 AM4/29/21
to Harsh Vardhan Kumar, gem5-gpu Developers List
Hi Harsh,

You're running out of memory. There isn't exactly a solution. You can do a few things to try to get around this issue:
1. Run on a machine with more memory.
2. Compile with less concurrency (e.g., -j1 instead of -j4)
3. Disable LTO (--no-lto, IIRC)

Cheers,
Jason


Harsh Vardhan Kumar

unread,
May 1, 2021, 4:25:58 PM5/1/21
to gem5-gpu Developers List
Hey, thanks again. I moved to another system and the installation was successful.

However, I was wondering whether a python script can be provided in the gem5.opt --cmd option (where we provide pre-compiled binaries). I tried doing --cmd=/usr/bin/python3 -o script.py, however, it did not produce any stats.

Harsh

Reply all
Reply to author
Forward
0 new messages