Hey guys,
  I'm running into a strange issue trying to run the current gem5 mainline
repo on our cluster machines. After building with a few different revisions
of Python 2.7, I get the following Python error from gem5:

---------------------------
[joel@vein] (30)$ ../../../build/MOESI_hammer/gem5.opt
Traceback (most recent call last):
  File "/home/joel/research/gem5/gem5-gpu/gem5/src/python/importer.py",
line 93, in <module>
    sys.meta_path.append(importer)
TypeError: 'dict' object is not callable
Segmentation fault (core dumped)
---------------------------

  The code just before this in importer.py simply imports sys as in many
other parts of the codebase:

---------------------------
# Create an importer and add it to the meta_path so future imports can
# use it.  There's currently nothing in the importer, but calls to
# add_module can be used to add code.
import sys
importer = CodeImporter()
add_module = importer.add_module
sys.meta_path.append(importer)
---------------------------

  From what I can tell, the sys library is failing to import: after the
import line, sys is a bool with value = False.  I think Python then assumes
sys.meta_path is a dict instead of a list, which is triggering this error.

  I've tried the following with the different revisions of Python 2.7, but
the interpreter isn't having problems with this import, which suggests my
Python installations are okay:

---------------------------
[joel@vein] (31)$ python
Python 2.7.3 (default, Jun 20 2012, 15:33:51)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.meta_path
[]
---------------------------

  I'm also unable to get gem5 to run in the Python interpreter mode, since
this happens during finalizing of Python setup.  I don't see anything
suspicious when running gem5 in gdb, but then, I'm not really sure what I
should be looking for.

  Any ideas for what I should do/try?

  Thanks!
  Joel


-- 
  Joel Hestness
  PhD Student, Computer Architecture
  Dept. of Computer Science, University of Wisconsin - Madison
  http://pages.cs.wisc.edu/~hestness/
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to