I think these workarounds are fine, but the problem should not
exist... Nate's our python guru, so I'll give him the first
opportunity respond, but I wanted to confirm that there is a problem
and these workarounds should not be necessary.

Steve

On Tue, Mar 9, 2010 at 11:43 PM, Joel Hestness <[email protected]> wrote:
> Hi guys,
>   I just ran into this one myself.  I had to install the lex/yacc package
> for python.  If you are using debian/ubuntu, its in the python-ply package
> (sudo apt-get install python-ply).
>   Looks like you could download the library and build it yourself if you
> don't have root access: http://packages.ubuntu.com/hardy/python/python-ply .
>   Hope that helps,
>   Joel
> On Wed, Mar 10, 2010 at 1:32 AM, Philip Jagielski
> <[email protected]> wrote:
>>
>> I am getting this error as well.  If you look in the m5 base directory for
>> ext/ply/ the python code (lex and yacc) is in a subdirectory there. Perhaps
>> you need to run sudo python ext/ply/setup.py install ?
>> Due to me currently lacking sudo privileges I do not know if this works
>> but I will get back to you when I figure it out.
>> -Philip
>>
>> On Wed, Mar 10, 2010 at 1:23 AM, arup de <[email protected]> wrote:
>>>
>>> Hi,
>>>    I'm getting below error with latest version of code from m5 repo.
>>> It seems to me some python files are missing.
>>>
>>>
>>> $ scons build/ALPHA_SE/m5.fast
>>> scons: Reading SConscript files ...
>>> Checking for leading underscore in global variables...no
>>> Checking for C header file Python.h... yes
>>> Checking for C library pthread... yes
>>> Checking for C library dl... yes
>>> Checking for C library util... yes
>>> Checking for C library m... yes
>>> Checking for C library python2.6... yes
>>> Checking for accept(0,0,0) in C++ library None... yes
>>> Checking for zlibVersion() in C++ library z... yes
>>> Checking for C header file fenv.h... yes
>>> Reading /home/ade/M5/m5/src/mem/ruby/SConsopts
>>> Reading /home/ade/M5/m5/src/mem/protocol/SConsopts
>>> Reading /home/ade/M5/m5/src/cpu/checker/SConsopts
>>> Reading /home/ade/M5/m5/src/cpu/inorder/SConsopts
>>> Reading /home/ade/M5/m5/src/cpu/ozone/SConsopts
>>> Reading /home/ade/M5/m5/src/cpu/o3/SConsopts
>>> Reading /home/ade/M5/m5/src/cpu/simple/SConsopts
>>> Reading /home/ade/M5/m5/src/arch/arm/SConsopts
>>> Reading /home/ade/M5/m5/src/arch/alpha/SConsopts
>>> Reading /home/ade/M5/m5/src/arch/power/SConsopts
>>> Reading /home/ade/M5/m5/src/arch/mips/SConsopts
>>> Reading /home/ade/M5/m5/src/arch/sparc/SConsopts
>>> Reading /home/ade/M5/m5/src/arch/x86/SConsopts
>>> Building in /home/ade/M5/m5/build/ALPHA_SE
>>> Variables file /home/ade/M5/m5/build/variables/ALPHA_SE not found,
>>>   using defaults in build_opts/ALPHA_SE
>>> scons: done reading SConscript files.
>>> scons: Building targets ...
>>> g++ -o build/ALPHA_SE/sim/main.fo -c -Wno-deprecated -pipe
>>> -fno-strict-aliasing -Wall -Wno-sign-compare -Wundef -O3 -Werror -DNDEBUG
>>> -DTRACING_ON=0 -Ibuild/gzstream -Ibuild/libelf -Iext
>>> -I/usr/include/python2.6 -Ibuild/ALPHA_SE build/ALPHA_SE/sim/main.cc
>>> traceFlagsHH(["build/ALPHA_SE/base/traceflags.hh"], [('Quiesce', (),
>>> None), ('IICMore', (), None), ('ExecEffAddr', (), None), ('LSQUnit', (),
>>> None), ('ExecResult', (), None), ('MiscRegs', (), None), ('AnnotateAll',
>>> ('Annotate', 'AnnotateQ', 'AnnotateVerbose'), 'All Annotation flags'),
>>> ('BusBridge', (), None), ('Exec', ('ExecEnable', 'ExecTicks', 'ExecOpClass',
>>> 'ExecThread', 'ExecEffAddr', 'ExecResult', 'ExecSymbol', 'ExecMicro',
>>> 'ExecFaulting'), None), ('InOrderBPred', (), None), ('AnnotateQ', (), 'State
>>> machine annotation queue debugging'), ('ExecCPSeq', (), None),
>>> ('InOrderCachePort', (), None), ('Interrupt', (), None), ('ExecOpClass', (),
>>> None), ('ExecTicks', (), None), ('O3CPUAll', ('Fetch', 'Decode', 'Rename',
>>> 'IEW', 'Commit', 'IQ', 'ROB', 'FreeList', 'LSQ', 'LSQUnit', 'StoreSet',
>>> 'MemDepUnit', 'DynInst', 'O3CPU', 'Activity', 'Scoreboard', 'Writeback'),
>>> None), ('Thread', (), None), ('InOrderStage', (), None), ('InOrderCPUAll',
>>> ('InOrderStage', 'InOrderStall', 'InOrderCPU', 'InOrderMDU', 'InOrderAGEN',
>>> 'InOrderFetchSeq', 'InOrderTLB', 'InOrderBPred', 'InOrderDecode',
>>> 'InOrderExecute', 'InOrderInstBuffer', 'InOrderUseDef', 'InOrderGraduation',
>>> 'InOrderCachePort', 'RegDepMap', 'Resource', 'ThreadModel'), None),
>>> ('StoreSet', (), None), ('Commit', (), None), ('InOrderTLB', (), None),
>>> ('AddrDep', (), None), ('IPI', (), None), ('Loader', (), None), ('IPR', (),
>>> None), ('SQL', (), 'SQL queries sent to the server'), ('Event', (), None),
>>> ('MemoryAccess', (), None), ('O3CPU', (), None), ('ExecFaulting', (), 'Trace
>>> faulting instructions'), ('InOrderAGEN', (), None), ('LLSC', (), None),
>>> ('DynInst', (), None), ('RefCount', (), None), ('MemDepUnit', (), None),
>>> ('GDBAcc', (), 'Remote debugger accesses'), ('CommitRate', (), None),
>>> ('InOrderDecode', (), None), ('ROB', (), None), ('VtoPhys', (), None),
>>> ('IQ', (), None), ('InOrderDynInst', (), None), ('LSQ', (), None), ('Ruby',
>>> (), None), ('Timer', (), None), ('GDBAll', ('GDBMisc', 'GDBAcc', 'GDBRead',
>>> 'GDBWrite', 'GDBSend', 'GDBRecv', 'GDBExtra'), 'All Remote debugging
>>> flags'), ('ResReqCount', (), None), ('InOrderFetchSeq', (), None),
>>> ('Rename', (), None), ('IntRegs', (), None), ('StatEvents', (), 'Statistics
>>> event tracking'), ('ExecNoTicks', ('ExecEnable', 'ExecOpClass',
>>> 'ExecThread', 'ExecEffAddr', 'ExecResult', 'ExecMicro', 'ExecFaulting'),
>>> None), ('ExecSymbol', (), None), ('SyscallVerbose', (), None), ('Cache', (),
>>> None), ('AnnotateVerbose', (), 'Dump all state machine annotation details'),
>>> ('Config', (), None), ('GDBRead', (), 'Reads to the remote address space'),
>>> ('Bus', (), None), ('GDBExtra', (), 'Dump extra information on reads and
>>> writes'), ('SimpleCPU', (), None), ('GDBSend', (), 'Messages sent to the
>>> remote application'), ('GDBRecv', (), 'Messages received from the remote
>>> application'), ('ExecMicro', (), None), ('IntrControl', (), None),
>>> ('InOrderInstBuffer', (), None), ('Flow', (), None), ('InOrderCPU', (),
>>> None), ('IEW', (), None), ('TLB', (), None), ('Fetch', (), None),
>>> ('RegDepMap', (), None), ('MMU', (), None), ('Scoreboard', (), None),
>>> ('Annotate', (), 'State machine annotation debugging'), ('MemTest', (),
>>> None), ('InOrderGraduation', (), None), ('Decode', (), None),
>>> ('ThreadModel', (), None), ('FreeList', (), None), ('FloatRegs', (), None),
>>> ('ExecRegDelta', (), None), ('Writeback', (), None), ('InOrderStall', (),
>>> None), ('ExecFetchSeq', (), None), ('CachePort', (), None),
>>> ('BusAddrRanges', (), None), ('IIC', (), None), ('Stack', (), None),
>>> ('InOrderExecute', (), None), ('Resource', (), None), ('PCEvent', (), None),
>>> ('InOrderUseDef', (), None), ('Fault', (), None), ('GDBWrite', (), 'Writes
>>> to the remote address space'), ('ExecSpeculative', (), None), ('HWPrefetch',
>>> (), None), ('InOrderMDU', (), None), ('ExecEnable', (), None), ('Context',
>>> (), None), ('Activity', (), None), ('GDBMisc', (), 'Breakpoints, traps,
>>> watchpoints, etc.'), ('ExecMacro', (), None), ('CacheRepl', (), None),
>>> ('ExecThread', (), None), ('Registers', ('IntRegs', 'FloatRegs',
>>> 'MiscRegs'), None)])
>>> g++ -o build/ALPHA_SE/cpu/pred/2bit_local.fo -c -Wno-deprecated -pipe
>>> -fno-strict-aliasing -Wall -Wno-sign-compare -Wundef -O3 -Werror -DNDEBUG
>>> -DTRACING_ON=0 -Ibuild/gzstream -Ibuild/libelf -Iext
>>> -I/usr/include/python2.6 -Ibuild/ALPHA_SE
>>> build/ALPHA_SE/cpu/pred/2bit_local.cc
>>> g++ -o build/ALPHA_SE/cpu/activity.fo -c -Wno-deprecated -pipe
>>> -fno-strict-aliasing -Wall -Wno-sign-compare -Wundef -O3 -Werror -DNDEBUG
>>> -DTRACING_ON=0 -Ibuild/gzstream -Ibuild/libelf -Iext
>>> -I/usr/include/python2.6 -Ibuild/ALPHA_SE build/ALPHA_SE/cpu/activity.cc
>>> objectifyPyFile(["build/ALPHA_SE/arch/alpha/AlphaTLB.py.s"],
>>> ["build/ALPHA_SE/arch/alpha/AlphaTLB.py"])
>>> as -o build/ALPHA_SE/arch/alpha/AlphaTLB.py.fo
>>> build/ALPHA_SE/arch/alpha/AlphaTLB.py.s
>>> g++ -o build/ALPHA_SE/sim/async.fo -c -Wno-deprecated -pipe
>>> -fno-strict-aliasing -Wall -Wno-sign-compare -Wundef -O3 -Werror -DNDEBUG
>>> -DTRACING_ON=0 -Ibuild/gzstream -Ibuild/libelf -Iext
>>> -I/usr/include/python2.6 -Ibuild/ALPHA_SE build/ALPHA_SE/sim/async.cc
>>> Generating switch header build/ALPHA_SE/arch/locked_mem.hh
>>> Generating switch header build/ALPHA_SE/arch/mmaped_ipr.hh
>>> Generating switch header build/ALPHA_SE/arch/utility.hh
>>> makeTheISA(["build/ALPHA_SE/config/the_isa.hh"], ['alpha', 'arm', 'mips',
>>> 'power', 'sparc', 'x86'])
>>> createSimObjectParam(["build/ALPHA_SE/params/AtomicSimpleCPU.hh"],
>>> ['AtomicSimpleCPU'])
>>> createSimObjectParam(["build/ALPHA_SE/params/ExeTracer.hh"],
>>> ['ExeTracer'])
>>> Generating switch header build/ALPHA_SE/arch/isa_traits.hh
>>> Defining FULL_SYSTEM as 0 in build/ALPHA_SE/config/full_system.hh.
>>> createEnumParam(["build/ALPHA_SE/enums/MemoryMode.hh"], ['MemoryMode'])
>>> createSimObjectParam(["build/ALPHA_SE/params/System.hh"], ['System'])
>>> Generating static_inst_exec_sigs.hh: AtomicSimpleCPU, InOrderCPU, O3CPU,
>>> TimingSimpleCPU
>>> Generating switch header build/ALPHA_SE/arch/predecoder.hh
>>> Defining FAST_ALLOC_DEBUG as 0 in
>>> build/ALPHA_SE/config/fast_alloc_debug.hh.
>>> Defining FAST_ALLOC_STATS as 0 in
>>> build/ALPHA_SE/config/fast_alloc_stats.hh.
>>> Defining NO_FAST_ALLOC as 0 in build/ALPHA_SE/config/no_fast_alloc.hh.
>>> Generating switch header build/ALPHA_SE/arch/vtophys.hh
>>> createSimObjectParam(["build/ALPHA_SE/params/SimObject.hh"],
>>> ['SimObject'])
>>> createEnumParam(["build/ALPHA_SE/enums/OpClass.hh"], ['OpClass'])
>>> Generating switch header build/ALPHA_SE/arch/interrupts.hh
>>> Generating switch header build/ALPHA_SE/arch/microcode_rom.hh
>>> Generating switch header build/ALPHA_SE/arch/isa.hh
>>> Generating switch header build/ALPHA_SE/arch/registers.hh
>>> Generating switch header build/ALPHA_SE/arch/tlb.hh
>>> Generating switch header build/ALPHA_SE/arch/types.hh
>>> createSimObjectParam(["build/ALPHA_SE/params/MemObject.hh"],
>>> ['MemObject'])
>>> Generating switch header build/ALPHA_SE/arch/stacktrace.hh
>>> createSimObjectParam(["build/ALPHA_SE/params/BaseSimpleCPU.hh"],
>>> ['BaseSimpleCPU'])
>>> createSimObjectParam(["build/ALPHA_SE/params/InstTracer.hh"],
>>> ['InstTracer'])
>>> isa_desc_action(["build/ALPHA_SE/arch/alpha/decoder.cc",
>>> "build/ALPHA_SE/arch/alpha/decoder.hh",
>>> "build/ALPHA_SE/arch/alpha/max_inst_regs.hh",
>>> "build/ALPHA_SE/arch/alpha/atomic_simple_cpu_exec.cc",
>>> "build/ALPHA_SE/arch/alpha/inorder_cpu_exec.cc",
>>> "build/ALPHA_SE/arch/alpha/o3_cpu_exec.cc",
>>> "build/ALPHA_SE/arch/alpha/timing_simple_cpu_exec.cc"],
>>> ["build/ALPHA_SE/arch/alpha/isa/main.isa", 'AtomicSimpleCPU', 'InOrderCPU',
>>> 'O3CPU', 'TimingSimpleCPU'])
>>> scons: *** [build/ALPHA_SE/arch/alpha/decoder.cc] ImportError : No module
>>> named ply
>>> Traceback (most recent call last):
>>>   File "/usr/lib/scons/SCons/Action.py", line 961, in execute
>>>     result = self.execfunction(target=target, source=rsources, env=env)
>>>   File "/home/ade/M5/m5/build/ALPHA_SE/arch/SConscript", line 113, in
>>> isa_desc_action
>>>     import isa_parser
>>>   File "/home/ade/M5/m5/src/arch/isa_parser.py", line 37, in <module>
>>>     from m5.util.grammar import Grammar
>>>   File "/home/ade/M5/m5/src/python/m5/util/grammar.py", line 27, in
>>> <module>
>>>     from ply import lex, yacc
>>> ImportError: No module named ply
>>> scons: building terminated because of errors.
>>>  Could you please let me hoew to fix it.
>>> Thanks,
>>> -Arup
>>> _______________________________________________
>>> m5-users mailing list
>>> [email protected]
>>> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>>
>>
>> _______________________________________________
>> m5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>
>
>
> --
>  Joel Hestness
>  PhD Student, Computer Architecture
>  Dept. of Computer Science, University of Texas - Austin
>  http://www.cs.utexas.edu/~hestness
>
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to