Hi, I am building gem5 as shown here in python==3.7, scons==4.0.1 to build scons. Following (http://learning.gem5.org/book/part1/building.html), but I ran into the error as below:
$ scons build/X86/gem5.opt -j8
scons: Reading SConscript files ...
Checking for linker -Wl,--as-needed support... yes
Checking for pkg-config package protobuf... yes
Checking for compiler -gz support... no
Warning: Can't enable object file debug section compression
Checking for linker -gz support... no
Warning: Can't enable executable debug section compression
Info: Using Python config: python3-config
Checking for C header file Python.h... yes
Checking for C library python3.7m... 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
Seems like the py_version
(https://github.com/gem5/gem5/blob/ea7d012c00e5555857ef999b88a8ec2bde801a1f/SConstruct#L560) stays false. I wonder how do I make gem5 detect the python in my current anaconda env, while I can directly run by python
?
Hello,
I wonder how do I make gem5 detect the python in my current anaconda env,
while I can directly run by python
?
This is difficult, and I've really struggled to get this to work with gem5.
You need to make sure that scons picks up the correct python3-config
binary. It might work to specify the python3-config binary with
--python-config=<path to anaconda bin>/python3-config
Cheers,
Jason
On Fri, Mar 26, 2021 at 8:56 AM haurunis--- via gem5-users <
gem5-users(a)gem5.org> wrote:
Hi, I am building gem5 as shown here in python==3.7, scons==4.0.1 to build
scons. Following (http://learning.gem5.org/book/part1/building.html), but
I ran into the error as below:
$ scons build/X86/gem5.opt -j8
scons: Reading SConscript files ...
Checking for linker -Wl,--as-needed support... yes
Checking for pkg-config package protobuf... yes
Checking for compiler -gz support... no
Warning: Can't enable object file debug section compression
Checking for linker -gz support... no
Warning: Can't enable executable debug section compression
Info: Using Python config: python3-config
Checking for C header file Python.h... yes
Checking for C library python3.7m... 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
Seems like the py_version
(
https://github.com/gem5/gem5/blob/ea7d012c00e5555857ef999b88a8ec2bde801a1f/SConstruct#L560)
stays false. I wonder how do I make gem5 detect the python in my current
anaconda env, while I can directly run by python
?
gem5-users mailing list -- gem5-users(a)gem5.org
To unsubscribe send an email to gem5-users-leave(a)gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Hi Jason,
Thank you for your reply.
Does it mean for now, [gem5 build] (http://learning.gem5.org/book/part1/building.html#:~:text=To%20build%20gem5%2C%20we%20will,build%20directory%20when%20first%20executed.) has to be done with python3 & scons installed in the system, rather than the anaconda environment?
What I can say confidently is that I've never been able to get a virtual
environment to work with gem5. It will 100% definitely work with python3
and scons installed on the system.
Jason
On Fri, Mar 26, 2021 at 10:18 PM haurunis--- via gem5-users <
gem5-users(a)gem5.org> wrote:
Hi Jason,
Thank you for your reply.
Does it mean for now, [gem5 build] (
http://learning.gem5.org/book/part1/building.html#:~:text=To%20build%20gem5%2C%20we%20will,build%20directory%20when%20first%20executed.)
has to be done with python3 & scons installed in the system, rather than
the anaconda environment?
gem5-users mailing list -- gem5-users(a)gem5.org
To unsubscribe send an email to gem5-users-leave(a)gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Hi Haurunis,
I use the python virtual environment for running gem5.
If you are using virtual environment for your gem5 make sure all the
dependency libraries are installed within the virtual environment. Also
make sure your scons' s engine path points to the scons installation within
the virtual environment.
I am using python version 2.7, scons version 3.0. and gem5 version 20.0.
Regards,
Vipi
On Fri, Mar 26, 2021, 21:26 haurunis--- via gem5-users <gem5-users(a)gem5.org>
wrote:
Hi, I am building gem5 as shown here in python==3.7, scons==4.0.1 to build
scons. Following (http://learning.gem5.org/book/part1/building.html), but
I ran into the error as below:
$ scons build/X86/gem5.opt -j8
scons: Reading SConscript files ...
Checking for linker -Wl,--as-needed support... yes
Checking for pkg-config package protobuf... yes
Checking for compiler -gz support... no
Warning: Can't enable object file debug section compression
Checking for linker -gz support... no
Warning: Can't enable executable debug section compression
Info: Using Python config: python3-config
Checking for C header file Python.h... yes
Checking for C library python3.7m... 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
Seems like the py_version
(
https://github.com/gem5/gem5/blob/ea7d012c00e5555857ef999b88a8ec2bde801a1f/SConstruct#L560)
stays false. I wonder how do I make gem5 detect the python in my current
anaconda env, while I can directly run by python
?
gem5-users mailing list -- gem5-users(a)gem5.org
To unsubscribe send an email to gem5-users-leave(a)gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Hi Vipi,
Thanks for your help. Sorry that I don't understand how to make sure all the dependency libraries are installed within the virtual environment
. I am referring to [https://scons.org/doc/0.98.5/HTML/scons-user/x166.html] and all the packages here are installed with apt-get which will be hardcoded and installed to /usr/share. Meanwhile, I cannot install those pkgs with pip/conda install to the conda environment path. May I know how did you do it?
I also found this issues. Are you suggesting a symbolic link like this?
Thank you very much!
Best,
haurunis