Hi Steve, Thanks a lot ! :-) I just fixed the problem by referring the link you gave.
I summarized how to fix the problem as follows. Hope it would be be helpful to other M5 total beginners like me. 8^) 1. The error happened when I ran: $ build/ALPHA_SE/m5.debug configs/example/se.py 2. Error looked like: *********************************************************************************************************************** Traceback (most recent call last): File "<string>", line 1, in <module> File " ../m5-stable/src/python/importer.py", line 67, in load_module exec code in mod.__dict__ File "../m5-stable/src/python/m5/__init__.py", line 116, in <module> from simulate import * File "../m5-stable/src/python/importer.py", line 67, in load_module exec code in mod.__dict__ File "../m5-stable/src/python/m5/simulate.py", line 38, in <module> from main import options File "../m5-stable/src/python/importer.py", line 67, in load_module exec code in mod.__dict__ File "../m5-stable/src/python/m5/main.py", line 30, in <module> import datetime ImportError: ../lib/python2.6/lib-dynload/datetime.so: undefined symbol: _Py_ZeroStruct *********************************************************************************************************************** 3. Reason: I upgraded the python from 2.4 to 2.6.4, and installed it in my local directory. I added the local directory to the "PATH" and "LD_LIBRARY_PATH" environment variables. But, I didn't add the "--enable-shared" argument when I configured python installation. 4. Solution: Following this link: http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation And the detailed steps I used are: 1) rebuild Python: $ ./configure --enable-shared --prefix=$HOME ; $ make ; $ make install (make sure you have changed your "PATH" and "LD_LIBRARY_PATH" environment variables.) 2) rebuild m5: I'm using the example in the package, so the commands are: $ scons -c ; $ scons build/ALPHA_FS/m5.debug Now you could ran your program with no errors. :-) Here is another small tip: * If you got some error saying "cannot find Python.h", it probably because of your python version is old. * I don't know exactly what caused that error, but I upgraded python from 2.4 to 2.6.4, and it fixed. Thanks again steven! It may look like a very basic question for most people here, but it really solved a big problem to me. Best, Jie On Jan 20, 2010, at 1:25 AM, Steve Reinhardt wrote: > Are you sure you're compiling m5 with the same python install you're > running it with? See > http://m5sim.org/wiki/index.php/Using_a_non-default_Python_installation. > > Steve > > On Tue, Jan 19, 2010 at 9:46 PM, Jie Meng <jiemeng...@gmail.com> wrote: >> Hi, >> >> I'm very new to M5. I tried to installed M5 and ran the "se.py" example in >> M5's package and got the following errors: >> >> $ build/ALPHA_SE/m5.debug configs/example/se.py >> >> >> *********************************************************************************************************************** >> >> Traceback (most recent call last): >> File "<string>", line 1, in <module> >> File "../m5-stable/src/python/importer.py", line 67, in load_module >> exec code in mod.__dict__ >> File "../m5-stable/src/python/m5/__init__.py", line 116, in <module> >> from simulate import * >> File "../m5-stable/src/python/importer.py", line 67, in load_module >> exec code in mod.__dict__ >> File "../m5-stable/src/python/m5/simulate.py", line 38, in <module> >> from main import options >> File "../m5-stable/src/python/importer.py", line 67, in load_module >> exec code in mod.__dict__ >> File "../m5-stable/src/python/m5/main.py", line 30, in <module> >> import datetime >> >> ImportError: ../lib/python2.6/lib-dynload/datetime.so: undefined symbol: >> _Py_ZeroStruct >> >> >> *********************************************************************************************************************** >> >> >> Does anybody have this problem before? Any suggestion would be appreciated! >> >> Best, >> Jie >> _______________________________________________ >> m5-users mailing list >> m5-users@m5sim.org >> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users >> > _______________________________________________ > m5-users mailing list > m5-users@m5sim.org > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
_______________________________________________ m5-users mailing list m5-users@m5sim.org http://m5sim.org/cgi-bin/mailman/listinfo/m5-users