Hi Sanchayan,

I'm not sure what the problem is when you're running hello. I believe
you've compiled it correctly. The error indicates that the application is
trying to read an address that was never allocated.
To figure out the issue, I would follow these steps:
1. Make sure the binary executes correctly on the native system
2. Using some debug flags to try to track down the issue. I would start
with SyscallBase and then SyscallVerbose (or SyscallAll which is compound
debug flag including both of these).
3. Figuring out exactly which instructions and where in the source is
causing the issue. For this, you may have to use the Exec debug flag then
trace it back to the code with objdump.

It's probably something simple, but it's hard to tell just by the error
message what the problem is. Let us know if you can't figure it out with
the above suggestions.

For the protobuf compile error: gem5 is very sensitive to external
dependencies. If you've updated one of the dependencies, I would try
recompiling gem5 from scratch (e.g., deleting the build/ directory and
recompiling).

Containers may be helpful in this situation. I've played around with
containers and with docker, specifically, some, but I haven't developed a
reasonable workflow for myself, yet. You can search around on dockerhub for
some example gem5 dockerfiles written by me and others.

Cheers,
Jason

On Thu, Jan 19, 2017 at 5:23 AM <maitysancha...@gmail.com> wrote:

> Hello,
>
> I am using gem5 compiled from source with the last commit at
>
> commit 1738a7d2601ba757ae6ab36f0549a50396d73e45
> Author: Andreas Sandberg <andreas.sandb...@arm.com>
> Date:   Tue Jan 3 17:31:39 2017 +0000
>
>     sim: Remove declaration of unused CountedDrainEvent
>
> on Arch Linux with gcc 6.3.1.
>
> Am trying to use a hello world program compiled externally as follows
>
> gcc -static hello.c -O2 -o hello -lm
>
> file hello
> hello: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux),
> statically linked,
> for GNU/Linux 2.6.32,
> BuildID[sha1]=85a8107f82fcc766f604b2e015d130c8dfd07490, not
> stripped
>
> Trying to run a syscall emulation as below
> build/X86/gem5.opt configs/learning_gem5/part1/two_level.py
> /home/sanchayan/gemapp/hello
>
> results in a stack trace.
>
> gem5 Simulator System.  http://gem5.org
> gem5 is copyrighted software; use the --copyright option for details.
>
> gem5 compiled Jan 18 2017 17:20:15
> gem5 started Jan 19 2017 15:52:58
> gem5 executing on Sanchayan-Arch, pid 16357
> command line: build/X86/gem5.opt configs/learning_gem5/part1/two_level.py
> /home/sanchayan/IIT/CS570/hello
>
> Global frequency set at 1000000000000 ticks per second
> warn: DRAM device capacity (8192 Mbytes) does not match the address range
> assigned (512 Mbytes)
> 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
> warn: ClockedObject: More than one power state change request encountered
> within the same simulation tick
> Beginning simulation!
> info: Entering event queue @ 0.  Starting simulation...
> panic: Tried to write unmapped address 0xffffee28.
>  @ tick 450000
> [invoke:build/X86/arch/x86/faults.cc, line 163]
> Memory Usage: 681232 KBytes
> Program aborted at tick 450000
>
> The same if compiled for ARM works. I guess it's something to do with
> AddrRange specified to system.mem_ranges
> somehow and the memory mapping for ARM and x86 being different?
>
> Also how sensitive is gem5 to external dependencies?. Just updated the
> system and protobuf was updated
> but in the process gem5 stopped working.
>
> build/X86/gem5.opt: error while loading shared libraries:
> libprotobuf.so.10: cannot open shared object file: No such file or directory
>
> Does the gem5 community recommend containers or such when using rolling
> release distros?
>
> Thanks & Regards,
> Sanchayan.
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

-- 

Jason
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to