[gem5-users] Re: Gem5 with pydot

2023-06-28 Thread Aaron Vose via gem5-users
The last email with my solution wrapped the lines in an odd way, here it is (hopefully) better formatted: cd /tools/Python/python3.8.16/bin/python3 -m venv pyenv3816-base cp -r /tools/Python/python3.8.16/ pyenv3816-manual cd pyenv3816-manual/lib/pkgconfig/ # Edit "python-3.8-embed.pc" to set "pre

[gem5-users] Re: Gem5 with pydot

2023-06-28 Thread Aaron Vose via gem5-users
Boris, I have been able to fix the issue with the following commands. They're a little specific to my system, but the overall idea might be helpful to others who are having issues with getting the correct Python version to be used to build Gem5, especially in light of the fact that the "python3

[gem5-users] Re: Gem5 with pydot

2023-06-28 Thread Aaron Vose via gem5-users
Boris, You have found exactly what my issue is! I'm running out of a python3 virtual environment created / activated with: "/tools/Python/python3.9.6/bin/python3 -m venv ~/pyenv396" "source ~/pyenv396/bin/activate" The issue is that the virtual environment created in this way does not contain "

[gem5-users] Re: Gem5 with pydot

2023-06-28 Thread Boris Shingarov via gem5-users
Which Python interpreter to embed is a compile-time decision, generally controlled by python3-config / python-config. What does python3-config --ldflags say? Also, what does 'ldd -r gem5.opt' say about libpython? You may also want to search for PYTHON_CONFIG in SConstruct to understand how sco

[gem5-users] Re: Gem5 with pydot

2023-06-27 Thread Aaron Vose via gem5-users
It does look like the python environment doesn't seem to contain "pydot"; this is from running gem5: *** ModuleNotFoundError: No module named 'pydot' (Pdb) import sys (Pdb) sys.version_info sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0) It seems like the Python enviro

[gem5-users] Re: Gem5 with pydot

2023-06-27 Thread Aaron Vose via gem5-users
> Have you rebuilt gem5? After rebuilding Gem5, the changes to the "dot_writer.py" are activated. I'll poke around here and see what I can find.. not sure what's wrong with it yet. Thanks much, ~Aaron Vose -Original Message- From: Aaron Vose Sent: Tuesday, June 27, 2023 7:01 PM To: Bor

[gem5-users] Re: Gem5 with pydot

2023-06-27 Thread Aaron Vose via gem5-users
> Have you rebuilt gem5? I have rebuilt after installing pydot, but I don't remember if I did after changing the "dot_writer.py" file. I will rebuild again just to be sure. Thanks much for your help with this. Cheers, ~Aaron Vose -Original Message- From: Boris Shingarov Sent: Tuesday,

[gem5-users] Re: Gem5 with pydot

2023-06-27 Thread Boris Shingarov via gem5-users
Have you rebuilt gem5? On 6/27/23 18:52, Aaron Vose wrote: Boris, Thanks much for your suggestion! It's very interesting, because I've done as you suggested, and it doesn't seem to drop me into a debug shell at all. I even changed those lines in "dot_writer.py" to be the following, and I don'

[gem5-users] Re: Gem5 with pydot

2023-06-27 Thread Aaron Vose via gem5-users
Boris, Thanks much for your suggestion! It's very interesting, because I've done as you suggested, and it doesn't seem to drop me into a debug shell at all. I even changed those lines in "dot_writer.py" to be the following, and I don't see any of the print messages I added. It doesn't print any

[gem5-users] Re: Gem5 with pydot

2023-06-26 Thread Boris Shingarov via gem5-users
I would debug it like this: Near the beginning of dot_writer.py, there is: try: import pydot except: pydot = False Replace the "pydot = False" with "import pdb; pdb.set_trace()". This will drop you into a debug shell where you can investigate why "import pydot" failed. On 6/26/23 14:30