This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error to run systemtap in an ARM platform


Hello Mark,

On 07/15/11 02:42, Mark Wielaard wrote:
Hi Da,

On Thu, 2011-07-14 at 17:58 -0700, Da Zheng wrote:
I cross-compiled systemtap and tried to run it on an ARM platform, but
got the following error:
chronos@localhost ~ $ sudo stap --vp 01 syscalls_by_pid.stp
semantic error: unresolved arity-4 function: identifier
'_arch_ptrace_argstr' at /usr/share/systemtap/tapset/aux_syscalls.stp:2234:9
          source:     retval=_arch_ptrace_argstr(request, pid, addr, data)
                             ^
Pass 2: analyzed script: 285 probe(s), 1528 function(s), 21 embed(s), 1
global(s) using 112076virt/96408res/46364shr kb, in
3690usr/190sys/4041real ms.
Pass 2: analysis failed.  Try again with another '--vp 01' option.
We don't yet have a tapset/arm/aux_syscalls.stp version.
Look at one of the existing tapset/*/aux_syscalls.stp
(i386,ia64,powerpc,s390,x86_64) ones for examples how to write one.
Thanks. This has been fixed. But I got another problem.
However, my target machine doesn't have a C compiler, so I have to cross compile it.
I tried to compile my script with
$ stap -v syscalls_by_pid.stp -a arm -r /build/tegra2_seaboard/tmp/portage/sys-kernel/chromeos-kernel-9999/work/chromeos-kernel-9999/build/tegra2_seaboard -p 4 -k


But I got the following error:

Pass 1: parsed user script and 73 library script(s) using 38656virt/20388res/1712shr kb, in 100usr/10sys/105real ms.
Pass 2: analyzed script: 285 probe(s), 18 function(s), 23 embed(s), 1 global(s) using 159984virt/84836res/2544shr kb, in 14160usr/1890sys/4383real ms.
Pass 3: translated to C into "/tmp/stapsWo8wq/stap_23913.c" using 159984virt/87692res/5400shr kb, in 240usr/0sys/237real ms.
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mabi=aapcs-linux"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
/tmp/stapsWo8wq/stap_23913.c:1: error: bad value (armv5t) for -march= switch
/tmp/stapsWo8wq/stap_23913.c:1: error: bad value (armv5t) for -mtune= switch
make[3]: *** [/tmp/stapsWo8wq/stap_23913.o] Error 1
make[2]: *** [_module_/tmp/stapsWo8wq] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
Pass 4: compiled C into "stap_23913.ko" in 1770usr/190sys/417real ms.
Pass 4: compilation failed. Try again with another '--vp 0001' option.
Keeping temporary directory "/tmp/stapsWo8wq"


I use armv7a-cros-linux-gnueabi-gcc to cross compile the kernel and other software. How can I specify the compiler for cross compile? I tried to set the environment variable CC, but it doesn't work.
Any ideas?


Thanks,
Da


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]