hey it worked fine now. I follow the link
http://www.mail-archive.com/gem5-users@m5sim.org/msg02886.html
and did:

1)set LD_LIBRARY_PATH" environment variable as:
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH /my_path

2) rebuild Python2.4:
$ ./configure --enable-shared --prefix=my_path ;
$ make ;
$ make install

3) rebuild m5:
$ scons -c ;  this is just to clean existing build folder
$ scons build/ARM/gem5.opt

On Fri, Jun 22, 2012 at 1:09 PM, Steve Reinhardt <ste...@gmail.com> wrote:

> The build warning is just a warning, and can be ignored.
>
> The runtime error about _Py_ZeroStruct has been seen before, and is likely
> a symptom of having two different python versions and having some parts of
> the build using one version and other parts using a different one.  Try
> doing a build from scratch (e.g., start by deleting the build directory)
> and make sure that you're running scons with the same python version you're
> linking with.
>
> You can also look through the mailing list archives for other situations
> where people have had this same _Py_ZeroStruct problem.
>
> Steve
>
>
> On Thu, Jun 21, 2012 at 2:14 PM, Nyunyi Tshibangu <nmtsh...@ncsu.edu>wrote:
>
>> Hello ,
>> I was able to build the simulator with SWIG 1.3.40 which is included in
>> python, so I removed the 2.0.7 version and it worked. but there is some
>> type of warning which I believe prevented my compiled process to run. here
>> is some screenshot if you can help me figure it out. I tried both python2.7
>> and 2.4 still the same warnings
>>
>> 1) log message at the end of build (warnings)
>>
>> /local/home/nmtshiba/M5/usr/local/lib/python2.4/config/libpython2.4.a(posixmodule.o):
>> In function `posix_tmpnam':
>> /home/nmtshiba/M5/python2.X/Python-2.4/./Modules/posixmodule.c:6158:
>> warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
>> /local/home/nmtshiba/M5/usr/local/lib/python2.4/config/libpython2.4.a(posixmodule.o):
>> In function `posix_tempnam':
>> /home/nmtshiba/M5/python2.X/Python-2.4/./Modules/posixmodule.c:6113:
>> warning: the use of `tempnam' is dangerous, better use `mkstemp'
>> scons: done building targets.
>> ece%
>>
>> 2)log message while running (error)
>>
>> ece% build/ARM/gem5.opt configs/example/se.py -c
>> tests/test-progs/hello/bin/arm/linux/hello
>> Traceback (most recent call last):
>>   File "<string>", line 1, in ?
>>   File "/local/home/nmtshiba/M5/gem5/src/python/importer.py", line 73, in
>> load_module
>>     exec code in mod.__dict__
>>   File "/local/home/nmtshiba/M5/gem5/src/python/m5/__init__.py", line 44,
>> in ?
>>     import SimObject
>>   File "/local/home/nmtshiba/M5/gem5/src/python/importer.py", line 73, in
>> load_module
>>     exec code in mod.__dict__
>>   File "/local/home/nmtshiba/M5/gem5/src/python/m5/SimObject.py", line
>> 53, in ?
>>     from m5.params import *
>>   File "/local/home/nmtshiba/M5/gem5/src/python/importer.py", line 73, in
>> load_module
>>     exec code in mod.__dict__
>>   File "/local/home/nmtshiba/M5/gem5/src/python/m5/params.py", line 63,
>> in ?
>>     import datetime
>> ImportError:
>> /local/home/nmtshiba/M5/usr/local/lib/python2.4/lib-dynload/datetime.so:
>> undefined symbol: _Py_ZeroStruct
>> ece%
>>
>>
>>
>> On Wed, Jun 20, 2012 at 7:46 PM, Andreas Hansson <andreas.hans...@arm.com
>> > wrote:
>>
>>>  The patch is pushed. Please make sure that you either set SWIG using
>>> export/setenv etc or specify SWIG = .. on the scons command line.****
>>>
>>> ** **
>>>
>>> Andreas****
>>>
>>> ** **
>>>
>>> *From:* gem5-users-boun...@gem5.org [mailto:gem5-users-boun...@gem5.org]
>>> *On Behalf Of *Nyunyi Tshibangu
>>> *Sent:* 20 June 2012 18:15
>>> *To:* gem5 users mailing list
>>> *Subject:* Re: [gem5-users] Error determining SWIG version****
>>>
>>> ** **
>>>
>>> Hello Andreas,****
>>>
>>> the SWIG is in my path. the same path all other dependency are install.
>>> I can verify this with echo $PATH command. are you gonna fix SConstruct? or
>>> give me a fix for it I can do it myself.****
>>>
>>> ** **
>>>
>>> Thanks****
>>>
>>> On Wed, Jun 20, 2012 at 7:08 PM, Andreas Hansson <
>>> andreas.hans...@arm.com> wrote:****
>>>
>>> Hi Nyunyi,****
>>>
>>>  ****
>>>
>>> Is your local swig in your path? Alternatively you can specify the path
>>> using SWIG = ...****
>>>
>>>  ****
>>>
>>> As a side note, I noticed when looking at the SConstruct file that we
>>> always execute ‘swig’ rather than what is specified by the SWIG environment
>>> variable for determining the version. I’ll fix this.****
>>>
>>>  ****
>>>
>>> Andreas****
>>>
>>>  ****
>>>
>>>  ****
>>>
>>> *From:* gem5-users-boun...@gem5.org [mailto:gem5-users-boun...@gem5.org]
>>> *On Behalf Of *Nyunyi Tshibangu
>>> *Sent:* 20 June 2012 17:58
>>> *To:* gem5-users@gem5.org
>>> *Subject:* [gem5-users] Error determining SWIG version****
>>>
>>>  ****
>>>
>>> I am  trying to build M5 with:  *scons build/ARM/gem5.opt*****
>>>
>>> but I am getting the error: Error determining SWIG version. I change
>>> swig 2.07 to 2.02 but still the same. I dont have root permisssion but I
>>> install all dependencies on my local directory on Red Hat Enterprise Linux
>>> Workstation release 6.2 (Santiago)****
>>>
>>>  ****
>>>
>>> here are the version of all dependencies:****
>>>
>>> python2.7, ****
>>>
>>> m4-1.4.1, ****
>>>
>>> zlib-1.2.7, ****
>>>
>>> scons-2.1.0, ****
>>>
>>> pcre-8.30,****
>>>
>>> swig 2.07 ****
>>>
>>>  ****
>>>
>>> any idea?****
>>>
>>>  ****
>>>
>>>
>>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>>> confidential and may also be privileged. If you are not the intended
>>> recipient, please notify the sender immediately and do not disclose the
>>> contents to any other person, use it for any purpose, or store or copy the
>>> information in any medium. Thank you.****
>>>
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users****
>>>
>>> ** **
>>>
>>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>>> confidential and may also be privileged. If you are not the intended
>>> recipient, please notify the sender immediately and do not disclose the
>>> contents to any other person, use it for any purpose, or store or copy the
>>> information in any medium. Thank you.
>>>
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to