public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: systemtap@sourceware.org
Subject: Re: error to run systemtap in an ARM platform
Date: Fri, 15 Jul 2011 20:46:00 -0000	[thread overview]
Message-ID: <4E20A6EF.9010003@redhat.com> (raw)
In-Reply-To: <4E209C3F.6060806@gmail.com>

On 07/15/2011 03:59 PM, Da Zheng wrote:
> 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

Hi Da,

I have been doing cross compiles for the fedora arm kernel this week. You might try setting the PATH to include the path to the cross compiler if it isn't part of the normal path and then try something like:

export ARCH=arm
export CROSS_COMPILE=armv5tel-redhat-linux-gnueabi-
make

CROSS_COMPILE should be the prefix of the copmiler used for all the cross compile commands.

I have made a quick wiki page at (still need to format it properly):

http://sourceware.org/systemtap/wiki/SystemtapOnFedoraArm

-Will

  parent reply	other threads:[~2011-07-15 20:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-15  0:58 Da Zheng
2011-07-15  9:43 ` Mark Wielaard
2011-07-15 20:00   ` Da Zheng
2011-07-15 20:15     ` Frank Ch. Eigler
     [not found]       ` <4E20A714.9020404@gmail.com>
2011-07-15 20:50         ` Frank Ch. Eigler
2011-07-15 20:46     ` William Cohen [this message]
2011-07-15 21:29       ` Da Zheng
2011-07-16  0:23         ` Turgis, Frederic
2011-07-18 14:13           ` William Cohen
2011-07-18 19:02             ` Da Zheng
2011-07-18 20:10               ` William Cohen
2011-07-18 20:18                 ` William Cohen
2011-07-18 20:41                 ` Da Zheng
2011-07-23 22:56                   ` Zheng Da
2011-07-24  1:57                     ` Frank Ch. Eigler
2011-07-24 16:10                       ` Frank Ch. Eigler
2011-07-25 10:04                     ` Mark Wielaard
2011-07-25 19:34                       ` Da Zheng
2011-07-25 15:46                     ` William Cohen
2011-07-25 19:36                       ` Da Zheng
2011-07-25 20:46                         ` Mark Wielaard
2011-07-25 17:17                     ` William Cohen
2011-07-25 19:56                       ` Da Zheng
2011-07-26 14:03                         ` William Cohen
2011-07-26 17:47                           ` Da Zheng
2011-07-19 11:38             ` Turgis, Frederic
2011-07-18 14:00         ` William Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E20A6EF.9010003@redhat.com \
    --to=wcohen@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).