On Fri, 28 Oct 2011, Steve Reinhardt wrote:

It's come to my attention that gem5 doesn't work with Python 2.7.  (Now that
I know to look for it, I see that others on the mailing list have discovered
this already, but I hadn't noticed before.)  The python initialization dies
before we even get to the user script:

diff --git a/src/python/m5/internal/__init__.py b/src/python/m5/internal/__init__.py
--- a/src/python/m5/internal/__init__.py
+++ b/src/python/m5/internal/__init__.py
@@ -29,6 +29,5 @@
 import core
 import debug
 import event
-import random
 import stats
 import trace


Removing the line 'import random' helps in making more progress, but still
not quite there. I get the following error --

Traceback (most recent call last):
  File "<string>", line 1, in <module>
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/importer.py", line 73, in load_module
    exec code in mod.__dict__
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/m5/__init__.py", line 44, in <module>
    import SimObject
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/importer.py", line 73, in load_module
    exec code in mod.__dict__
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/m5/SimObject.py", line 40, in <module>
    from m5.util import *
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/importer.py", line 73, in load_module
    exec code in mod.__dict__
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/m5/util/__init__.py", line 38, in <module>
    from code_formatter import code_formatter
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/importer.py", line 73, in load_module
    exec code in mod.__dict__
File "/afs/cs.wisc.edu/u/n/i/nilay/private/Architecture/GEM5/m5/src/python/m5/util/code_formatter.py", line 28, in <module>
    import inspect
File "/afs/.cs/s/python-2.7.1/amd64_rhel5/lib/python2.7/inspect.py", line 41, in <module>
    from operator import attrgetter
ImportError: /afs/.cs/s/python-2.7.1/amd64_rhel5/lib/python2.7/lib-dynload/operator.so: undefined symbol: _Py_ZeroStruct


Searching online revealed that Steve suggested to some one on m5-users list this might be because difference in python used in compilation and that used while execution. I am not sure how to check whether or not the two versions are different.

--
Nilay
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to