Discussion:
Builded gem5 just fine but run into trouble when executing simple helloworld program...
(too old to reply)
mehmet basaran
2013-02-25 10:56:25 UTC
Permalink
Hi all,

My computer messed up and I had to re-install gem5. I have been performing
the same steps. I could build the system but for some reason I cannot run
the simplest example. I am using ubuntu. Here is my command line;

build/X86/gem5.opt configs/example/se.py
--cmd="tests/test-progs/hello/bin/x86/linux/hello"

And the output I get;

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in
<module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
class Event(m5.internal.serialize.Serializable):
AttributeError: 'module' object has no attribute 'internal'

I added new environment variables in .bashrc file as follows;

export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"

------------------------------------------------------------------------------------------------------------------------------------------------

My first reaction was to install modules that come as missing in normal
python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python. Didn't
work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both 32bit and
64bit machines, but got the same result.

And so passed 1 week. Don't know what is the problem but I successfully
installed gem5 once without this much effort. I have also seen a ticket on
gem5-dev maillist about python2.7 compatibility. But have no idea if this
is it.

Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet
mehmet basaran
2013-02-26 13:35:02 UTC
Permalink
Hi all,

I have found the problem. I was trying to install all dependencies from the
source code. Unfortunately I had either one or more of the following cases;

1. my python was not compatible with libc
2. my gcc was incompatible with swig
3. or any combination of those 4...

source: http://www.mail-archive.com/gem5-***@gem5.org/msg06380.html

So, I have reinstalled using sudo apt-get install ... with the help of
another gem5 struggler and it worked.

Thanks for the... oh wait a minute...

take care
Post by mehmet basaran
Hi all,
My computer messed up and I had to re-install gem5. I have been performing
the same steps. I could build the system but for some reason I cannot run
the simplest example. I am using ubuntu. Here is my command line;
build/X86/gem5.opt configs/example/se.py
--cmd="tests/test-progs/hello/bin/x86/linux/hello"
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in
<module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
AttributeError: 'module' object has no attribute 'internal'
I added new environment variables in .bashrc file as follows;
export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"
------------------------------------------------------------------------------------------------------------------------------------------------
My first reaction was to install modules that come as missing in normal
python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python. Didn't
work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both 32bit
and 64bit machines, but got the same result.
And so passed 1 week. Don't know what is the problem but I successfully
installed gem5 once without this much effort. I have also seen a ticket on
gem5-dev maillist about python2.7 compatibility. But have no idea if this
is it.
Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet
ef
2013-02-28 01:36:25 UTC
Permalink
Any ideas on how to fix this without using apt-get? The email you sent
didn't really solve the problem.

Thanks in advance!

I have gcc 4.7.1
python 2.7.3
Scons 2.2.0
Swig 2.0.9

And the output I get;

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in
<module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
class Event(m5.internal.serialize.Serializable):
AttributeError: 'module' object has no attribute 'internal'


On Tue, Feb 26, 2013 at 7:35 AM, mehmet basaran
Post by mehmet basaran
Hi all,
I have found the problem. I was trying to install all dependencies from
the source code. Unfortunately I had either one or more of the following
cases;
1. my python was not compatible with libc
2. my gcc was incompatible with swig
3. or any combination of those 4...
So, I have reinstalled using sudo apt-get install ... with the help of
another gem5 struggler and it worked.
Thanks for the... oh wait a minute...
take care
Post by mehmet basaran
Hi all,
My computer messed up and I had to re-install gem5. I have been
performing the same steps. I could build the system but for some reason I
cannot run the simplest example. I am using ubuntu. Here is my command line;
build/X86/gem5.opt configs/example/se.py
--cmd="tests/test-progs/hello/bin/x86/linux/hello"
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31,
in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
AttributeError: 'module' object has no attribute 'internal'
I added new environment variables in .bashrc file as follows;
export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"
------------------------------------------------------------------------------------------------------------------------------------------------
My first reaction was to install modules that come as missing in normal
python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python. Didn't
work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both 32bit
and 64bit machines, but got the same result.
And so passed 1 week. Don't know what is the problem but I successfully
installed gem5 once without this much effort. I have also seen a ticket on
gem5-dev maillist about python2.7 compatibility. But have no idea if this
is it.
Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
mehmet basaran
2013-02-28 08:51:32 UTC
Permalink
I do not know the cause of this problem as well. I was just speculating
from the link I provided. If you don't have much time, I recommend using
apt-get. At least, it leaves you something to work with.
Post by ef
Any ideas on how to fix this without using apt-get? The email you sent
didn't really solve the problem.
Thanks in advance!
I have gcc 4.7.1
python 2.7.3
Scons 2.2.0
Swig 2.0.9
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31,
in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
AttributeError: 'module' object has no attribute 'internal'
Post by mehmet basaran
Hi all,
I have found the problem. I was trying to install all dependencies from
the source code. Unfortunately I had either one or more of the following
cases;
1. my python was not compatible with libc
2. my gcc was incompatible with swig
3. or any combination of those 4...
So, I have reinstalled using sudo apt-get install ... with the help of
another gem5 struggler and it worked.
Thanks for the... oh wait a minute...
take care
Post by mehmet basaran
Hi all,
My computer messed up and I had to re-install gem5. I have been
performing the same steps. I could build the system but for some reason I
cannot run the simplest example. I am using ubuntu. Here is my command line;
build/X86/gem5.opt configs/example/se.py
--cmd="tests/test-progs/hello/bin/x86/linux/hello"
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31,
in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
AttributeError: 'module' object has no attribute 'internal'
I added new environment variables in .bashrc file as follows;
export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"
------------------------------------------------------------------------------------------------------------------------------------------------
My first reaction was to install modules that come as missing in normal
python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python.
Didn't work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both 32bit
and 64bit machines, but got the same result.
And so passed 1 week. Don't know what is the problem but I successfully
installed gem5 once without this much effort. I have also seen a ticket on
gem5-dev maillist about python2.7 compatibility. But have no idea if this
is it.
Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Maxime Chéramy
2013-03-01 12:46:31 UTC
Permalink
Hello,

I had the bad idea of updating and rebuilding this morning and now I am
facing the exact same problem than you. Do you have any idea on how I could
solve this problem?

Debian Wheezy:

gcc 4.7.2
python 2.7.3
scons 2.1.0
swig 2.0.9

Thank you,

Maxime.
Post by mehmet basaran
I do not know the cause of this problem as well. I was just speculating
from the link I provided. If you don't have much time, I recommend using
apt-get. At least, it leaves you something to work with.
Post by ef
Any ideas on how to fix this without using apt-get? The email you sent
didn't really solve the problem.
Thanks in advance!
I have gcc 4.7.1
python 2.7.3
Scons 2.2.0
Swig 2.0.9
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31,
in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
AttributeError: 'module' object has no attribute 'internal'
On Tue, Feb 26, 2013 at 7:35 AM, mehmet basaran <
Post by mehmet basaran
Hi all,
I have found the problem. I was trying to install all dependencies from
the source code. Unfortunately I had either one or more of the following
cases;
1. my python was not compatible with libc
2. my gcc was incompatible with swig
3. or any combination of those 4...
So, I have reinstalled using sudo apt-get install ... with the help of
another gem5 struggler and it worked.
Thanks for the... oh wait a minute...
take care
Post by mehmet basaran
Hi all,
My computer messed up and I had to re-install gem5. I have been
performing the same steps. I could build the system but for some reason I
cannot run the simplest example. I am using ubuntu. Here is my command line;
build/X86/gem5.opt configs/example/se.py
--cmd="tests/test-progs/hello/bin/x86/linux/hello"
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31,
in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
AttributeError: 'module' object has no attribute 'internal'
I added new environment variables in .bashrc file as follows;
export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"
------------------------------------------------------------------------------------------------------------------------------------------------
My first reaction was to install modules that come as missing in normal
python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python.
Didn't work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both 32bit
and 64bit machines, but got the same result.
And so passed 1 week. Don't know what is the problem but I successfully
installed gem5 once without this much effort. I have also seen a ticket on
gem5-dev maillist about python2.7 compatibility. But have no idea if this
is it.
Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Maxime Chéramy
2013-03-01 14:10:35 UTC
Permalink
Problem apparently fixed using swig 2.0.7 (swig was updated on debian sid
this week...).
Post by Maxime Chéramy
Hello,
I had the bad idea of updating and rebuilding this morning and now I am
facing the exact same problem than you. Do you have any idea on how I could
solve this problem?
gcc 4.7.2
python 2.7.3
scons 2.1.0
swig 2.0.9
Thank you,
Maxime.
Post by mehmet basaran
I do not know the cause of this problem as well. I was just speculating
from the link I provided. If you don't have much time, I recommend using
apt-get. At least, it leaves you something to work with.
Post by ef
Any ideas on how to fix this without using apt-get? The email you sent
didn't really solve the problem.
Thanks in advance!
I have gcc 4.7.1
python 2.7.3
Scons 2.2.0
Swig 2.0.9
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31,
in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in
<module>
AttributeError: 'module' object has no attribute 'internal'
On Tue, Feb 26, 2013 at 7:35 AM, mehmet basaran <
Post by mehmet basaran
Hi all,
I have found the problem. I was trying to install all dependencies from
the source code. Unfortunately I had either one or more of the following
cases;
1. my python was not compatible with libc
2. my gcc was incompatible with swig
3. or any combination of those 4...
So, I have reinstalled using sudo apt-get install ... with the help of
another gem5 struggler and it worked.
Thanks for the... oh wait a minute...
take care
Post by mehmet basaran
Hi all,
My computer messed up and I had to re-install gem5. I have been
performing the same steps. I could build the system but for some reason I
cannot run the simplest example. I am using ubuntu. Here is my command line;
build/X86/gem5.opt configs/example/se.py
--cmd="tests/test-progs/hello/bin/x86/linux/hello"
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line
31, in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107,
in <module>
AttributeError: 'module' object has no attribute 'internal'
I added new environment variables in .bashrc file as follows;
export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"
------------------------------------------------------------------------------------------------------------------------------------------------
My first reaction was to install modules that come as missing in
normal python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python.
Didn't work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both
32bit and 64bit machines, but got the same result.
And so passed 1 week. Don't know what is the problem but I
successfully installed gem5 once without this much effort. I have also seen
a ticket on gem5-dev maillist about python2.7 compatibility. But have no
idea if this is it.
Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Andreas Hansson
2013-03-01 14:14:53 UTC
Permalink
I just did a clean build on OpenSuse 12.3 with:

Gcc 4.7.2
Python 2.7.3
Scons 2.2.0
Swig 2.0.9

Works without any issues.

Have a look at http://www.mail-archive.com/gem5-***@gem5.org/msg06475.html as well.

Andreas

From: Maxime Chéramy <***@gmail.com<mailto:***@gmail.com>>
Reply-To: gem5 users mailing list <gem5-***@gem5.org<mailto:gem5-***@gem5.org>>
Date: Friday, 1 March 2013 12:46
To: gem5 users mailing list <gem5-***@gem5.org<mailto:gem5-***@gem5.org>>
Subject: Re: [gem5-users] Builded gem5 just fine but run into trouble when executing simple helloworld program...

Hello,

I had the bad idea of updating and rebuilding this morning and now I am facing the exact same problem than you. Do you have any idea on how I could solve this problem?

Debian Wheezy:

gcc 4.7.2
python 2.7.3
scons 2.1.0
swig 2.0.9

Thank you,

Maxime.

2013/2/28 mehmet basaran <***@gmail.com<mailto:***@gmail.com>>
I do not know the cause of this problem as well. I was just speculating from the link I provided. If you don't have much time, I recommend using apt-get. At least, it leaves you something to work with.


2013/2/28 ef <***@gmail.com<mailto:***@gmail.com>>
Any ideas on how to fix this without using apt-get? The email you sent didn't really solve the problem.

Thanks in advance!

I have gcc 4.7.1
python 2.7.3
Scons 2.2.0
Swig 2.0.9

And the output I get;

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in <module>
class Event(m5.internal.serialize.Serializable):
AttributeError: 'module' object has no attribute 'internal'


On Tue, Feb 26, 2013 at 7:35 AM, mehmet basaran <***@gmail.com<mailto:***@gmail.com>> wrote:
Hi all,

I have found the problem. I was trying to install all dependencies from the source code. Unfortunately I had either one or more of the following cases;

1. my python was not compatible with libc
2. my gcc was incompatible with swig
3. or any combination of those 4...

source: http://www.mail-archive.com/gem5-***@gem5.org/msg06380.html

So, I have reinstalled using sudo apt-get install ... with the help of another gem5 struggler and it worked.

Thanks for the... oh wait a minute...

take care


2013/2/25 mehmet basaran <***@gmail.com<mailto:***@gmail.com>>
Hi all,

My computer messed up and I had to re-install gem5. I have been performing the same steps. I could build the system but for some reason I cannot run the simplest example. I am using ubuntu. Here is my command line;

build/X86/gem5.opt configs/example/se.py --cmd="tests/test-progs/hello/bin/x86/linux/hello"

And the output I get;

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in <module>
class Event(m5.internal.serialize.Serializable):
AttributeError: 'module' object has no attribute 'internal'

I added new environment variables in .bashrc file as follows;

export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"

------------------------------------------------------------------------------------------------------------------------------------------------

My first reaction was to install modules that come as missing in normal python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python. Didn't work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both 32bit and 64bit machines, but got the same result.

And so passed 1 week. Don't know what is the problem but I successfully installed gem5 once without this much effort. I have also seen a ticket on gem5-dev maillist about python2.7 compatibility. But have no idea if this is it.

Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet


_______________________________________________
gem5-users mailing list
gem5-***@gem5.org<mailto:gem5-***@gem5.org>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users


_______________________________________________
gem5-users mailing list
gem5-***@gem5.org<mailto:gem5-***@gem5.org>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users


_______________________________________________
gem5-users mailing list
gem5-***@gem5.org<mailto:gem5-***@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.
Maxime Chéramy
2013-03-01 14:26:49 UTC
Permalink
That's weird if it works for you with swig 2.0.9. On my side, I only
downgraded swig to 2.0.7 in order to have a working build.

Here's the diff between the event.py file generated with both versions:

% diff /home/max/gem5_/build/X86/python/swig/event.py
/home/max/gem5/build/X86/python/swig/event.py
2c2
< # Version 2.0.7
---
# Version 2.0.9
80c80
< import serialize
---
import m5.internal.serialize
107c107
< class Event(serialize.Serializable):
---
143c143
< class EventQueue(serialize.Serializable):
---
Gcc 4.7.2
Python 2.7.3
Scons 2.2.0
Swig 2.0.9
Works without any issues.
Have a look at
Andreas
Date: Friday, 1 March 2013 12:46
Subject: Re: [gem5-users] Builded gem5 just fine but run into trouble
when executing simple helloworld program...
Hello,
I had the bad idea of updating and rebuilding this morning and now I am
facing the exact same problem than you. Do you have any idea on how I could
solve this problem?
gcc 4.7.2
python 2.7.3
scons 2.1.0
swig 2.0.9
Thank you,
Maxime.
Post by mehmet basaran
I do not know the cause of this problem as well. I was just speculating
from the link I provided. If you don't have much time, I recommend using
apt-get. At least, it leaves you something to work with.
Post by ef
Any ideas on how to fix this without using apt-get? The email you sent
didn't really solve the problem.
Thanks in advance!
I have gcc 4.7.1
python 2.7.3
Scons 2.2.0
Swig 2.0.9
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in <module>
AttributeError: 'module' object has no attribute 'internal'
On Tue, Feb 26, 2013 at 7:35 AM, mehmet basaran <
Post by mehmet basaran
Hi all,
I have found the problem. I was trying to install all dependencies from
the source code. Unfortunately I had either one or more of the following
cases;
1. my python was not compatible with libc
2. my gcc was incompatible with swig
3. or any combination of those 4...
So, I have reinstalled using sudo apt-get install ... with the help of
another gem5 struggler and it worked.
Thanks for the... oh wait a minute...
take care
Post by mehmet basaran
Hi all,
My computer messed up and I had to re-install gem5. I have been
performing the same steps. I could build the system but for some reason I
cannot run the simplest example. I am using ubuntu. Here is my command line;
build/X86/gem5.opt configs/example/se.py
--cmd="tests/test-progs/hello/bin/x86/linux/hello"
And the output I get;
File "<string>", line 1, in <module>
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/__init__.py", line 35, in <module>
import internal
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in <module>
import event
File "/home/matara/gem5/src/python/importer.py", line 73, in load_module
exec code in mod.__dict__
File "/home/matara/gem5/build/X86/python/swig/event.py", line 107, in <module>
AttributeError: 'module' object has no attribute 'internal'
I added new environment variables in .bashrc file as follows;
export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"
export SWIG="/home/matara/Tools/swig-2.0.9"
export BZ2="/home/matara/Tools/bzip2-1.0.6"
export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATH
export LIBRARY_PATH=$BZ2:$PYTHONPATH
export
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"
------------------------------------------------------------------------------------------------------------------------------------------------
My first reaction was to install modules that come as missing in
normal python. But that didn't work.
I tried to run scons-local, in case it is using a built-in python.
Didn't work either.
I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both
32bit and 64bit machines, but got the same result.
And so passed 1 week. Don't know what is the problem but I
successfully installed gem5 once without this much effort. I have also seen
a ticket on gem5-dev maillist about python2.7 compatibility. But have no
idea if this is it.
Any help, pointers, questions are welcome as usual. Thanks in advance.
Mehmet
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
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
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
David
2013-03-14 02:36:57 UTC
Permalink
Hi all,My computer messed up and I had to re-install gem5. I have been
performing the same steps. I could build the system but for some reason I cannot
run the simplest example. I am using ubuntu. Here is my command
line;build/X86/gem5.opt configs/example/se.py --cmd="tests/test-
progs/hello/bin/x86/linux/hello"And the output I get;Traceback (most recent call
last):  File "<string>", line 1, in <module>
  File "/home/matara/gem5/src/python/importer.py", line 73, in load_module   
exec code in mod.__dict__  File "/home/matara/gem5/src/python/m5/__init__.py",
line 35, in <module>    import internal
  File "/home/matara/gem5/src/python/importer.py", line 73, in load_module   
exec code in mod.__dict__  File
"/home/matara/gem5/src/python/m5/internal/__init__.py", line 31, in <module>
    import event  File "/home/matara/gem5/src/python/importer.py", line 73, in
load_module    exec code in mod.__dict__  File
"/home/matara/gem5/build/X86/python/swig/event.py", line 107, in <module>
    class Event(m5.internal.serialize.Serializable):AttributeError: 'module'
object has no attribute 'internal'I added new environment variables in .bashrc
file as follows;export JAVA_HOME="/home/matara/Tools/jdk1.7.0"
export PYTHONPATH="/home/matara/Tools/Python-2.7.3"export
SWIG="/home/matara/Tools/swig-2.0.9"export BZ2="/home/matara/Tools/bzip2-
1.0.6"export MYSCONS="/home/matara/Tools/scons-src-2.2.0"
export LD_LIBRARY_PATH=$BZ2:$PYTHONPATHexport
LIBRARY_PATH=$BZ2:$PYTHONPATHexport
PATH="$PATH:$PYTHONPATH:$PYTHONPATH/scripts:SWIG:$BZ2:$JAVA_HOME/jre/bin"-------
--------------------------------------------------------------------------------
---------------------------------------------------------My first reaction was
to install modules that come as missing in normal python. But that didn't work.I
tried to run scons-local, in case it is using a built-in python. Didn't work
either.I have tried re-installing stable and dev versions but still no progress.
Other than that I have tried reinstalling countless times on both 32bit and
64bit machines, but got the same result. And so passed 1 week. Don't know what
is the problem but I successfully installed gem5 once without this much effort.
I have also seen a ticket on gem5-dev maillist about python2.7 compatibility.
But have no idea if this is it.Any help, pointers, questions are welcome as
usual. Thanks in advance.Mehmet
_______________________________________________
gem5-users mailing list
gem5-users <at> gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Hi,

This problem has kept me from merging my code with the newest repository. My
code was based on a clone I got around August 2012. Today, I downgraded my swig
to 2.0.7 and it compiles with the newest version from the repository.

If you haven't please try compiling gem5 with swig version 2.0.7. It might fix
the problem.

David

Loading...