I was unable to get M5 2.0 b1 building after downloading it (on a Linux
2.6.9 box with SWIG 1.3.29, scons 0.96.92, and Python 2.4).  I added the
following to the SConstruct script (right under "Other default libraries")
in order to make M5 build:
-----------
# Added by Adam to work
env.Append(LIBS = ['dl'])
env.Append(LIBS = ['util'])
env.Append(LIBS = ['pthread'])
# In the following, /path/to/local/python means the path to my local
# Python 2.4 installation
env.Append(LIBPATH = ['/path/to/local/python/lib/python2.4/config'])
-----------

Note: on this system, my PATH is set up to find the local python
installation first.

With the above additional libs and libpath, I was able to get M5 built,
but the remaining tests generated by the command
  $ scons build/ALPHA_SE/tests/debug/quick"
did not work:
-----------
build/ALPHA_SE/m5.debug -d
build/ALPHA_SE/tests/debug/quick/00.hello/alpha/linux/simple-atomic
tests/run.py quick/00.hello/alpha/linux/simple-atomic >
build/ALPHA_SE/tests/debug/quick/00.hello/alpha/linux/simple-atomic/stdout
2>
build/ALPHA_SE/tests/debug/quick/00.hello/alpha/linux/simple-atomic/stderr
***** build/ALPHA_SE/tests/debug/quick/00.hello/alpha/linux/simple-atomic
FAILED!
...
***** build/ALPHA_SE/tests/debug/quick/00.hello/alpha/linux/simple-timing
FAILED!
...
build/ALPHA_SE/tests/debug/quick/20.eio-short/alpha/eio/simple-atomic
FAILED!
...
*****
build/ALPHA_SE/tests/debug/quick/20.eio-short/alpha/eio/simple-timing
FAILED!
-----------

To see why this was the case, I executed
  $ build/ALPHA_SE/m5.debug
and saw the following (with the actual path to Python replaced by
/path/to/local/python):

-----------
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "build/ALPHA_SE/python/m5/__init__.py", line 79, in ?
    from main import options, arguments, main
  File "build/ALPHA_SE/python/m5/main.py", line 30, in ?
    import code, optparse, os, socket, sys
  File "/path/to/local/python/lib/python2.4/optparse.py", line 72, in ?
    from gettext import gettext as _
  File "/path/to/local/python/lib/python2.4/gettext.py", line 49, in ?
    import locale, copy, os, re, struct, sys
ImportError: /path/to/local/python/lib/python2.4/lib-dynload/struct.so:
undefined symbol: PyString_Type
Traceback (most recent call last):
  File "<string>", line 1, in ?
NameError: name 'm5' is not defined
-----------

The symbol PyString_Type should be defined inside libpython2.4.a, I
believe.  This library resides in
/path/to/local/python/lib/python2.4/config.  After playing around with
this a bit, I am unable to figure out a solution.  Do you have any idea
what might be happening?

Thanks!
        -Adam Kaplan
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to